From 856ca86988e60784ae8688db9c4d76e7d5303363 Mon Sep 17 00:00:00 2001 From: garrytan Date: Sat, 17 Oct 2026 03:38:03 +0000 Subject: [PATCH] WTREE_UNAVAILABLE moves to lib/result-codes-release.ts (#3235 split; result-codes.ts stays at 796 of 800 lines); doctor fixture copies the release table; size pins follow #3235's review +1 Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --- bin/gstack-doctor-components.sh | 2 +- lib/result-codes-release.ts | 11 +++++++++-- lib/result-codes.ts | 6 ------ test/fixtures/skill-md-size-allowlist.json | 10 +++++----- test/gstack-doctor.test.ts | 2 +- 5 files changed, 16 insertions(+), 15 deletions(-) diff --git a/bin/gstack-doctor-components.sh b/bin/gstack-doctor-components.sh index 6df4e72d8..463567aae 100644 --- a/bin/gstack-doctor-components.sh +++ b/bin/gstack-doctor-components.sh @@ -253,7 +253,6 @@ gstack_result_anchor() { DX_CAPTURE_INTERRUPTED) printf '%s' 'dx-capture-interrupted' ;; DX_CAPTURE_REDACTION_FAILED) printf '%s' 'dx-capture-redaction-failed' ;; DX_CAPTURE_INTERNAL) printf '%s' 'dx-capture-internal' ;; - WTREE_UNAVAILABLE) printf '%s' 'wtree-unavailable' ;; POLICY_GSTACK_TOO_OLD) printf '%s' 'policy-gstack-too-old' ;; QUEUE_NOT_READY) printf '%s' 'queue-not-ready' ;; QUEUE_PROOF_MISSING) printf '%s' 'queue-proof-missing' ;; @@ -267,6 +266,7 @@ gstack_result_anchor() { APPROVAL_CITATION_MISSING) printf '%s' 'approval-citation-missing' ;; APPROVAL_SOURCE_UNAVAILABLE) printf '%s' 'approval-source-unavailable' ;; STATE_MATRIX_INCOMPLETE) printf '%s' 'state-matrix-incomplete' ;; + WTREE_UNAVAILABLE) printf '%s' 'wtree-unavailable' ;; *) return 1 ;; esac } diff --git a/lib/result-codes-release.ts b/lib/result-codes-release.ts index 1e929a5dc..19f291a69 100644 --- a/lib/result-codes-release.ts +++ b/lib/result-codes-release.ts @@ -1,7 +1,8 @@ /** * Result codes for the release path: gstack-ship-queue and the ship-policy - * floor, pregate timing, approval classes and the state-machine matrix. Kept - * beside lib/result-codes.ts (which spreads this table into RESULT_CODES) so + * floor, pregate timing and its working-tree fingerprint, approval classes and + * the state-machine matrix. Kept beside lib/result-codes.ts (which spreads + * this table into RESULT_CODES) so * the owner module stays within the module-size ratchet; the same rules apply: * one stable docs/troubleshooting.md anchor, a summary and a fix clause each. */ @@ -76,4 +77,10 @@ export const RELEASE_RESULT_CODES = { summary: 'the state-machines specialist output lacks a kind × owner action cell, maps a cell to a test that does not exist, or leaves an untested cell without a CRITICAL finding', fix: 'rerun the state-machines specialist on the same diff; its review coverage stays incomplete until gstack-state-matrix check passes', }, + // Fix wave 2026-10-15, PR 5 (item 10b, #3197). + WTREE_UNAVAILABLE: { + anchor: 'wtree-unavailable', + summary: 'cannot fingerprint the working tree: bin/gstack-wtree could not start (on Windows, no Git Bash was found) or it ran and failed', + fix: 'on Windows point GSTACK_GIT_BASH at Git Bash\'s bash.exe (Git Bash: export GSTACK_GIT_BASH=\'C:/Program Files/Git/bin/bash.exe\'; PowerShell: $env:GSTACK_GIT_BASH = \'C:\\Program Files\\Git\\bin\\bash.exe\'), or install Git for Windows (winget install --id Git.Git -e); elsewhere rerun ./setup so bin/gstack-wtree is present; then rerun gstack-pregate', + }, } as const satisfies Record; diff --git a/lib/result-codes.ts b/lib/result-codes.ts index 8e0c92a85..d7adaf05e 100644 --- a/lib/result-codes.ts +++ b/lib/result-codes.ts @@ -767,12 +767,6 @@ export const RESULT_CODES = { summary: 'unexpected helper failure; the line names the error class and its first stack frame', fix: 'rerun once; if it repeats, report the printed frame to the gstack maintainers', }, - // Fix wave 2026-10-15, PR 5 (item 10b, #3197). - WTREE_UNAVAILABLE: { - anchor: 'wtree-unavailable', - summary: 'cannot fingerprint the working tree: bin/gstack-wtree could not start (on Windows, no Git Bash was found) or it ran and failed', - fix: 'on Windows point GSTACK_GIT_BASH at Git Bash\'s bash.exe (Git Bash: export GSTACK_GIT_BASH=\'C:/Program Files/Git/bin/bash.exe\'; PowerShell: $env:GSTACK_GIT_BASH = \'C:\\Program Files\\Git\\bin\\bash.exe\'), or install Git for Windows (winget install --id Git.Git -e); elsewhere rerun ./setup so bin/gstack-wtree is present; then rerun gstack-pregate', - }, ...RELEASE_RESULT_CODES, } as const satisfies Record; diff --git a/test/fixtures/skill-md-size-allowlist.json b/test/fixtures/skill-md-size-allowlist.json index 395162c2b..9d0a40b57 100644 --- a/test/fixtures/skill-md-size-allowlist.json +++ b/test/fixtures/skill-md-size-allowlist.json @@ -37,7 +37,7 @@ "cursor/gstack-plan-design-review": 138935, "cursor/gstack-plan-devex-review": 134558, "cursor/gstack-plan-eng-review": 151533, - "cursor/gstack-review": 140685, + "cursor/gstack-review": 140686, "factory/gstack-autoplan": 131397, "factory/gstack-codex": 100523, "factory/gstack-design-consultation": 108523, @@ -47,7 +47,7 @@ "factory/gstack-plan-design-review": 141716, "factory/gstack-plan-devex-review": 137927, "factory/gstack-plan-eng-review": 154647, - "factory/gstack-review": 144464, + "factory/gstack-review": 144465, "gbrain/gstack-autoplan": 129650, "gbrain/gstack-design-review": 132733, "gbrain/gstack-land-and-deploy": 116059, @@ -67,7 +67,7 @@ "kiro/gstack-plan-design-review": 138775, "kiro/gstack-plan-devex-review": 134398, "kiro/gstack-plan-eng-review": 151383, - "kiro/gstack-review": 140497, + "kiro/gstack-review": 140498, "openclaw/gstack-autoplan": 129355, "openclaw/gstack-design-review": 131538, "openclaw/gstack-land-and-deploy": 115647, @@ -82,7 +82,7 @@ "opencode/gstack-plan-design-review": 140705, "opencode/gstack-plan-devex-review": 136779, "opencode/gstack-plan-eng-review": 153285, - "opencode/gstack-review": 142920, + "opencode/gstack-review": 142921, "slate/gstack-autoplan": 128994, "slate/gstack-design-consultation": 106996, "slate/gstack-design-review": 142272, @@ -90,6 +90,6 @@ "slate/gstack-plan-design-review": 138855, "slate/gstack-plan-devex-review": 134478, "slate/gstack-plan-eng-review": 151458, - "slate/gstack-review": 140591 + "slate/gstack-review": 140592 } } diff --git a/test/gstack-doctor.test.ts b/test/gstack-doctor.test.ts index becfd5d8e..ec1d0cc83 100644 --- a/test/gstack-doctor.test.ts +++ b/test/gstack-doctor.test.ts @@ -27,7 +27,7 @@ const COPIED = [ 'autoplan/SKILL.md', // its frontmatter registers the autoplan hook the hooks-row test breaks 'bin/gstack-launch-probe.sh', 'bin/gstack-doctor-check.sh', 'bin/gstack-doctor-components.sh', 'bin/gstack-runtime-pins.ts', 'lib/runtime-pins.ts', - 'bin/gstack-windows-bash.ts', 'lib/script-invocation.ts', 'lib/result-codes.ts', // the windows bash row + 'bin/gstack-windows-bash.ts', 'lib/script-invocation.ts', 'lib/result-codes.ts', 'lib/result-codes-release.ts', // the windows bash row ]; const bases: string[] = []; afterEach(() => { for (const b of bases.splice(0)) fs.rmSync(b, { recursive: true, force: true }); });