* fix(setup-gbrain): judge doctor health from brain checks only (#3790)
Step 5 and gstack-gbrain-detect's gbrain_doctor_ok read gbrain doctor's
overall status, so a failing skill check against a skills dir gbrain
auto-detected (~/.openclaw/workspace) stopped setup on a working brain.
Both now run doctor with --scope=brain and ignore category:skill failures
from gbrain versions that predate the flag. gbrain's 'healthy' status is
accepted too; only 'ok' and 'warnings' were before.
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
* fix(gbrain-detect): spawn doctor through spawnGbrain, fail closed with a cause
Review pass 1 batch: route the doctor spawn through lib/gbrain-exec so the
Windows gbrain.cmd shim works, report why doctor printed no JSON, raise
--doctor's timeout to 300 s, count skill failures only when doctor says
unhealthy, and cover the fail-closed paths and exit codes in tests.
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
* fix(gbrain-detect): a doctor spawn that throws fails closed instead of crashing detect
A JSON-null ~/.gbrain/config.json made spawnGbrain throw, which crashed
detect before Step 1.5's broken-config remediation could run. Step 5
prose now says skill checks never count, matching the code.
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
* fix(gbrain-detect): ignore doctor stderr so a chatty doctor cannot overflow the spawn buffer
stderr over spawnSync's 1 MB maxBuffer made the call fail with ENOBUFS and
dropped the stdout report, turning a healthy brain into a Step 5 STOP.
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
* fix(gbrain-detect): let --doctor's report drain before exit
process.exit() cut a large verdict off mid-pipe, so Step 5's jq read
truncated JSON and stopped on a healthy brain. Set exitCode instead.
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
* docs(gbrain-detect): say what gbrain_doctor_ok proves under --fast
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
* changelog: setup-gbrain doctor gate judges brain checks only (#3790)
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
* docs(gbrain): document gstack-gbrain-detect --doctor and gbrain doctor's status values
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
---------
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>