Skip to content

v1.91.109.0 fix: wave 5 — pregate secrets false negatives (#3211), Windows gstack-upgrade, env.kv schema keys (#3208), browse rule 3 (#3216), review summaries (#3219), CSO flake (#3207) - #3225

Merged
capy-ai[bot] merged 13 commits into
mainfrom
capy/wave5
Oct 17, 2026

Conversation

@garrytan

@garrytan garrytan commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner

Fix wave 5 (GSTA-37): user-reported bugs and community PRs that arrived after the Oct 15 waves. Main (v1.91.106.0, #3209) is merged in; main will be merged again after #3190 lands, before READY. Not stamped yet; GStack Minder (GSTA-36) assigns the slot.

Pregate secrets: two false negatives and the #3211 false positive (S1)

lib/pregate/checks/secrets.ts flattened every file's added lines into one added.txt, so it lost each file's identity. That caused three defects:

Added lines are now parsed per file and hunk by hunk, using the pre-push hook's collectAddedLines rules, with --no-ext-diff --no-textconv --src-prefix=a/ --dst-prefix=b/. Each file is scanned as <tmp>/<i>/<basename>, so its type survives, and each finding names its file. The new test/pregate-secrets-source-context.test.ts has 5 tests, which fail on main and pass here. The fixture repro, rerun on the merged tree, shows: before the fix, 2 env.kv false positives and no AWS finding; after it, the HIGH aws.access_key finding, with or without diff.external.

Windows Git Bash: gstack-upgrade stops refusing every install (S1)

bin/gstack-upgrade compared the output of git rev-parse --show-toplevel (C:/x on Git for Windows) with pwd -P (/c/x in Git Bash) as strings. So every Git Bash install was refused as "not a gstack checkout" (UPGRADE_REFUSED), and the doctor's Windows recovery line points at this exact command. It now compares the paths through gstack_path_same (bin/gstack-path-spelling.sh). A gstack tree nested inside another repository is still refused. test/gstack-upgrade-path-spelling.test.ts emulates MSYS with uname, cygpath and git shims. The git shim runs git with the unshimmed PATH, so a PATH-searching git wrapper can't find the shim again. The acceptance case fails on main and passes here.

Redact: a catalog schema field is not a credential (#3208, S2)

"input_key": "expected_media_rate_bits_per_second_ingress" failed the secrets check, which can't be downgraded, as MEDIUM env.kv [secret]. env.kv now skips an assignment only when both sides say it is a schema field:

  • the whole name is one data-model word plus _key (input, output, field, cache, sort, …);
  • the value is two or more lowercase identifier words.

Everything else still fires in .env, YAML, JSON and TOML: an entropic value, a longer or credential name (cosmosdb_primary_key, api_cache_key, primary_key), and ALL-CAPS env names.

Browse rule 3: two writes that read as LOOK (#3216, S2)

On a NON-LOCAL target, a wizard or dialog step (Next, Step N, a menu item that opens a dialog) now counts as mutating until its handler or network effect shows otherwise, and its Cancel proves nothing. Before any Save or Submit, each value set with fill, selectOption or setValue is read back, and a mismatch stops the run. The silent-failures list gains a check that the target path's precondition holds, so a green run can't be the skip path. To stay inside the parity caps, redundant wording in the other rules was trimmed; no rule's meaning changed.

Plan reviews: the report rewrite no longer deletes an earlier review's summary (#3219 item 1, S2)

Every plan review deletes ## GSTACK REVIEW REPORT up to the next ## heading and writes a fresh report. Two reviews had no rule keeping their summary out of that section, so the next review deleted it:

  • plan-design-review's Completion Summary now goes in its own ## Design Review Completion Summary section above the report;
  • plan-devex-review's DX Scorecard now goes in its own ## DX Review Scorecard section above the report.

CEO and Eng already keep their summaries in the plan body. A regression test simulates the next review's delete step and checks that the summary survives.

CSO test flake (#3207, by @scottgigante-hubflow)

Cherry-picked with the author's authorship. On a cold macOS runner, the five /usr/bin/git spawns in fixture() used up the first test's 5 s budget. A beforeAll now builds a template repo that each test copies.

Gate edits

  • bin/gstack-upgrade: the checkout-identity refusal now accepts a different spelling of the same path. The nested-tree negative control still refuses.
  • lib/redact-patterns.ts: env.kv skips a schema-field name only when it also has an identifier value. Negative controls keep secret-bearing names firing.
  • lib/pregate/checks/secrets.ts: tightened. It scans more lines and ignores diff drivers.
  • test/cso-git-hardening.test.ts: setup moves into a beforeAll with a 30 s timeout. The per-test budgets are unchanged.

Review

An outside-voice review (GPT-6.1 Sol) found one critical issue: the first #3208 version exempted names alone, which silenced cosmosdb_primary_key. It also found one medium issue: the shim recursed. Both are fixed in this PR.

Verification

garrytan and others added 3 commits October 16, 2026 21:15
bin/gstack-upgrade compared `git rev-parse --show-toplevel` (C:/x from Git
for Windows) with `pwd -P` (/c/x in Git Bash) as strings, so every Windows
Git Bash install was refused as "not a gstack checkout", and the doctor's
recovery line points at this command. Compare the two through
gstack_path_same (bin/gstack-path-spelling.sh); a tree nested inside another
repository is still refused.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ial (#3208)

env.kv accepted every separated name ending in _key, so a catalog entry
`"input_key": "expected_media_rate_bits_per_second_ingress"` failed
pregate's never-downgradable secrets check as MEDIUM env.kv [secret]. The
camelCase twins (cacheKey, sortKey, partitionKey, idempotencyKey) were already
rejected for having no credential prefix; the snake/kebab/dotted forms of
those data-model words now are too. ALL-CAPS env names (INPUT_KEY=) and
credential-word names (signing_key, stripe_key, input_secret) still fire.

Reported by @brentyates-swx.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Each test built its fixture repo with five /usr/bin/git spawns inside
its own 5 s budget. On macOS that binary is the Xcode shim, and on a cold
runner those spawns cost far more than the code under test: in run
38800592772 the first test timed out at 5 s before readGitMetadata got
past its first lstat, and afterEach then tore the fixture down under it.

Build the repo once in beforeAll, under the same 30 s bound each fixture
spawn already declares, and give every test a fresh copy. The assertions
and the code under test are unchanged, and each test keeps its full 5 s
for the code under test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@trunk-io

trunk-io Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

garrytan and others added 2 commits October 16, 2026 21:30
… before saving (#3216)

On a non-local target a wizard or dialog step (Next, Step N, a menu item
that opens a dialog) now counts as mutating until its handler or network
effect shows otherwise, and its Cancel proves nothing. Before any Save or
Submit, every programmatic set is read back and the flow stops on a
mismatch. The cookbook's silent-failures list adds the skip-path
precondition probe. Redundant clauses in rules 2, 3, 7, 8, 9, 10 and
READY are tightened so the shared setup grows by 3 bytes and every
browsing skill stays under its parity cap.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…erated report (#3219)

The design review saved its Completion Summary inside the terminal
GSTACK REVIEW REPORT section, which the next plan review deletes from
its heading to the next "## " heading. The summary, deferred list and
unresolved decisions now go in their own "## Design Review Completion
Summary" section above the report, and the template says everything
under the report heading is regenerated by the next review.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

E2E Evals: ✅ PASS

[test:paid] VERDICT GREEN — lane gate/pr, attempt 1
  rule 108/108 · behavior 0/0 · judge 24/24 · quarantined 0 (0 failing the lane)
  SKIPPED 0 · INFRA 0 · INCOMPLETE 0 · unattributed 0 · ACTION REQUIRED 0
  wall 8m23s · cost $89.83 known + 54 of 132 trial(s) cost unknown

121 executed, 0 reused rule/judge records | 0 manual accepted (unscored; no score-cache credit) | $89.83 rule/judge cost | reconcile exit: 0

Profile: pr / mode dependents; selected behaviors: 108, judges: 24. Deferred to scheduled/release coverage: 136 behaviors and 1 changed prompt files. Deferred checks did not run and receive no PR-pass credit.

Derived dependents (scripts/pr-dependencies.ts):

  • bin/gstack-upgrade: 244 case(s), 24 judge(s)
  • lib/pregate/checks/secrets.ts: 244 case(s), 24 judge(s)
Rule and judge shards
Shard Automated result Manual/unscored Executed Reused Status Cost
e2e/skill-e2e-workflow 4/4 0 4 0 ✅ $2.95
e2e-deploy/skill-e2e-deploy--land-and-deploy-workflow 1/1 0 1 0 ✅ $1.63
e2e-safety-codex-consult/skill-e2e-safety-codex-consult 1/1 0 1 0 ✅ $0.85
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-stale-before 1/1 0 1 0 ✅ $1.05
e2e-review-attribution/skill-e2e-review-attribution 3/3 0 3 0 ✅ $0.89
e2e/skill-e2e-shared-libs--shared-libs-review-lifecycle 1/1 0 1 0 ✅ $2.39
e2e-qa-workflow/skill-e2e-qa-workflow--qa-quick 1/1 0 1 0 ✅ $1.43
e2e/skill-e2e-shared-libs-paths--shared-libs-review-prior-coverage 1/1 0 1 0 ✅ $2.57
e2e/skill-e2e-ship-skip 1/1 0 1 0 ✅ $0.61
e2e-qa-callers/skill-e2e-qa-callers--review-exploratory-small-cli 1/1 0 1 0 ✅ $1.72
e2e/skill-e2e-test-value 3/3 0 3 0 ✅ $2.36
e2e-qa-workflow/skill-e2e-qa-workflow--qa-only-no-fix 1/1 0 1 0 ✅ $1.8
e2e-qa-callers/skill-e2e-qa-callers--ship-exploratory-plan-checks 1/1 0 1 0 ✅ $1.85
e2e/skill-e2e-shared-libs--shared-libs-review-revalidation 1/1 0 1 0 ✅ $4.87
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-recovery 1/1 0 1 0 ✅ $1.06
e2e-review/skill-e2e-review 2/2 0 2 0 ✅ $1.12
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-failure 1/1 0 1 0 ✅ $1.89
e2e-skillify/skill-e2e-skillify 3/3 0 3 0 ✅ $2.72
e2e/skill-e2e-shared-libs-paths--shared-libs-review-path-eligibility 1/1 0 1 0 ✅ $3.85
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-current 1/1 0 1 0 ✅ $3.02
llm-judge/skill-llm-eval 24/24 0 24 0 ✅ $1.44
e2e/skill-e2e-coverage-audit 2/2 0 2 0 ✅ $0.83
e2e-deploy/skill-e2e-deploy--setup-deploy-workflow 1/1 0 1 0 ✅ $0.38
e2e-review-army/skill-e2e-review-army--review-army-perf-n-plus-one 1/1 0 1 0 ✅ $0.98
e2e/skill-e2e-shared-libs-paths--shared-libs-review-index-flags 1/1 0 1 0 ✅ $2.48
e2e/skill-e2e-investigate-owned-completion 1/1 0 1 0 ✅ $0.2
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-late-result 1/1 0 1 0 ✅ $0.95
e2e-review-army/skill-e2e-review-army--review-army-json-findings 1/1 0 1 0 ✅ $0.22
e2e-deploy/skill-e2e-deploy--benchmark-workflow 1/1 0 1 0 ✅ $0.74
e2e-qa-callers/skill-e2e-qa-callers--ship-exploratory-small-cli 1/1 0 1 0 ✅ $1.78
e2e-learnings/skill-e2e-learnings 1/1 0 1 0 ✅ $0.34
e2e-deploy/skill-e2e-deploy--land-and-deploy-review-gate 1/1 0 1 0 ✅ $1.14
e2e-review-army/skill-e2e-review-army--review-army-migration-safety 1/1 0 1 0 ✅ $1.22
e2e/skill-e2e-shared-libs--shared-libs-read-only 1/1 0 1 0 ✅ $0.73
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-stale-after 1/1 0 1 0 ✅ $1.1
e2e-deploy/skill-e2e-deploy--land-and-deploy-first-run 1/1 0 1 0 ✅ $1.07
e2e-docsync-spawned/skill-e2e-docsync-spawned 1/1 0 1 0 ✅ $1.14
e2e-qa-functional-fix/skill-e2e-qa-functional-fix 2/2 0 2 0 ✅ $2.63
e2e/skill-e2e-plan--plan-review-report 1/1 0 1 0 ✅ $1.08
e2e-qa-callers/skill-e2e-qa-callers--ship-exploratory-unavailable 1/1 0 1 0 ✅ $2.05
e2e-retro/skill-e2e-retro 1/1 0 1 0 ✅ $1.08
e2e-qa-functional/skill-e2e-qa-functional 2/2 0 2 0 ✅ $2.45
e2e-qa-callers/skill-e2e-qa-callers--ship-exploratory-late-input 1/1 0 1 0 ✅ $2.14
e2e-cso/skill-e2e-cso 1/1 0 1 0 ✅ $1.53
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-store 1/1 0 1 0 ✅ $4.31
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-completion 1/1 0 1 0 ✅ $3.05
e2e-design/skill-e2e-design--design-review-detector-shim-dom 1/1 0 1 0 ✅ $0.68
e2e/skill-e2e-shared-libs--shared-libs-unsupported-git 1/1 0 1 0 ✅ $0.52
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-missing-asset 1/1 0 1 0 ✅ $1.37
e2e-review-army/skill-e2e-review-army--review-army-quality-score 1/1 0 1 0 ✅ $0.32
e2e-safety-ship-evidence/skill-e2e-safety-ship-evidence 1/1 0 1 0 ✅ $0.52
e2e-hermetic/skill-e2e-hermetic-canary 2/2 0 2 0 ✅ $0.04
e2e-design/skill-e2e-design--design-review-plugin-handoff 1/1 0 1 0 ✅ $0.48
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-missing-marker 1/1 0 1 0 ✅ $0.46
e2e-browse/skill-e2e-bws 6/6 0 6 0 ✅ $0.84
e2e-third-party-actions/skill-e2e-third-party-actions 5/5 0 5 0 ✅ $1.2
e2e-plan-tune/skill-e2e-plan-tune 1/1 0 1 0 ✅ $0.43
e2e-session-intelligence/skill-e2e-session-intelligence 4/4 0 4 0 ✅ $0.76
e2e-safety-pair-agent/skill-e2e-safety-pair-agent 1/1 0 1 0 ✅ $0.31
e2e-design/skill-e2e-design--design-review-detector-shim 1/1 0 1 0 ✅ $0.38
e2e-qa-workflow/skill-e2e-qa-workflow--qa-bootstrap 1/1 0 1 0 ✅ $0.22
e2e-triage/skill-e2e-triage 1/1 0 1 0 ✅ $0.47
e2e/skill-e2e-ship-hook-consent 2/2 0 2 0 ✅ $0.57
e2e-review-army/skill-e2e-review-army--review-army-delivery-audit 1/1 0 1 0 ✅ $0.35
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-timeout-unsettled 1/1 0 1 0 ✅ $0.52
e2e/skill-e2e-ship-hook-refresh 1/1 0 1 0 ✅ $0.27
e2e/skill-e2e-investigate-owned-termination 2/2 0 2 0 ✅ $0.39
e2e-ship-docsync/skill-e2e-ship-docsync--ship-docsync-launch-failure 1/1 0 1 0 ✅ $0.47
e2e-deploy/skill-e2e-deploy--canary-workflow 1/1 0 1 0 ✅ $0.28
e2e-design/skill-e2e-design--plan-design-review-no-ui-scope 1/1 0 1 0 ✅ $0.29
Fail-closed reconciliation
9s  test/skill-e2e-qa-callers.test.ts#ship-exploratory-small-cli
  slice 12  passed            144s  test/skill-e2e-shared-libs-paths.test.ts#shared-libs-review-index-flags
  slice 12  passed            138s  test/skill-e2e-ship-docsync.test.ts#ship-docsync-late-result
  slice 12  passed            107s  test/skill-e2e-deploy.test.ts#benchmark-workflow
  slice 12  passed            120s  test/skill-e2e-review-army.test.ts#review-army-perf-n-plus-one
  slice 12  passed            116s  test/skill-e2e-plan-ceo-plan-mode.test.ts
  slice 12  passed             40s  test/skill-e2e-investigate-owned-completion.test.ts
  slice 12  passed             27s  test/skill-e2e-review-army.test.ts#review-army-json-findings
  slice 13  passed            114s  test/skill-e2e-ship-docsync.test.ts#ship-docsync-missing-asset
  slice 13  passed             79s  test/skill-e2e-plan-devex-plan-mode.test.ts
  slice 13  passed             71s  test/skill-e2e-safety-ship-evidence.test.ts
  slice 13  passed             81s  test/skill-e2e-design.test.ts#design-review-detector-shim-dom
  slice 13  passed             78s  test/skill-e2e-shared-libs.test.ts#shared-libs-unsupported-git
  slice 13  passed             78s  test/skill-e2e-office-hours-auto-mode.test.ts
  slice 13  passed             70s  test/skill-e2e-design.test.ts#design-review-plugin-handoff
  slice 13  passed             59s  test/skill-e2e-bws.test.ts
  slice 13  passed             42s  test/skill-e2e-ship-docsync.test.ts#ship-docsync-missing-marker
  slice 13  passed             44s  test/skill-e2e-review-army.test.ts#review-army-quality-score
  slice 13  passed             10s  test/skill-e2e-hermetic-canary.test.ts
  slice 14  passed             65s  test/skill-e2e-third-party-actions.test.ts
  slice 14  passed             60s  test/skill-e2e-plan-tune.test.ts
  slice 14  passed             47s  test/skill-e2e-triage.test.ts
  slice 14  passed             66s  test/skill-e2e-ship-docsync.test.ts#ship-docsync-timeout-unsettled
  slice 14  passed             48s  test/skill-e2e-ask-user-question-format-compliance.test.ts
  slice 14  passed             46s  test/skill-e2e-ship-docsync.test.ts#ship-docsync-launch-failure
  slice 14  passed             54s  test/skill-e2e-session-intelligence.test.ts
  slice 14  passed             55s  test/skill-e2e-ship-hook-consent.test.ts
  slice 14  passed             41s  test/skill-e2e-investigate-owned-termination.test.ts
  slice 14  passed             34s  test/skill-e2e-design.test.ts#design-review-detector-shim
  slice 14  passed             26s  test/skill-e2e-deploy.test.ts#canary-workflow
  slice 14  passed             43s  test/skill-e2e-ship-hook-refresh.test.ts
  slice 14  passed             38s  test/skill-e2e-design.test.ts#plan-design-review-no-ui-scope
  slice 14  passed             35s  test/skill-e2e-review-army.test.ts#review-army-delivery-audit
  slice 14  passed             35s  test/skill-e2e-safety-pair-agent.test.ts
  slice 14  passed             34s  test/skill-e2e-qa-workflow.test.ts#qa-bootstrap
  slice 15  passed             20s  test/skill-e2e-learnings.test.ts
  slice 15  passed             29s  test/skill-e2e-diagram.test.ts
[test:paid] collector final outcomes: 121 executed, 0 reused; 121 passed, 0 failed, 0 manual accepted (unscored; no score-cache credit) (121 attempt records from 70 collectors; every record counts)
[test:paid] deselected testcases, zero credit (307):
[test:paid]    293  sibling case of a case shard (its own shard runs it)
[test:paid]      8  periodic-tier case (this lane runs gate)
[test:paid]      6  Bun hook placeholder of a skipped describe block (not a test)
[test:paid] VERDICT GREEN — lane gate/pr, attempt 1
  rule 108/108 · behavior 0/0 · judge 24/24 · quarantined 0 (0 failing the lane)
  SKIPPED 0 · INFRA 0 · INCOMPLETE 0 · unattributed 0 · ACTION REQUIRED 0
  wall 8m23s · cost $89.83 known + 54 of 132 trial(s) cost unknown
[test:paid] report: every planned shard accounted and passed

Sliced lane: planner → duration-packed executors → fail-closed report. Behavior cases run a pre-registered 3-trial panel (PASS at 2/3 with no contract violation); a PASS 2/3 is shown with its failed trial, never as a clean pass. Reused results retain their original provenance and expiry.

garrytan and others added 5 commits October 16, 2026 21:48
…say so (#3208)

Review (GPT-6.1 Sol outside voice): the name-only exemption also silenced
real secrets, e.g. Azure's cosmosdb_primary_key and any longer name such as
api_cache_key. Now the whole name must be one data-model word plus _key
(primary/secondary dropped) and the value two or more lowercase identifier
words; an entropic value, a longer name or a credential name still fires in
.env, YAML, JSON and TOML.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
A PATH-searching git wrapper found the shim again and recursed until the
test timed out. The shim now restores the host PATH before running git.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…n emptied diff as clean (#3211)

addedLines() flattened every file into one added.txt, so gstack-redact never
saw a .ts path and the #3048 source-expression exemption never ran: TS
properties such as `token: credentials.token,` failed the gate as MEDIUM
env.kv. Two false negatives predate this wave: the `+++` header filter
dropped added content lines that begin with "++", and `git diff` honoured
diff.external/textconv, so an external driver that prints nothing made a
branch carrying a real AWS key pass with "no added lines".

Added lines are now parsed hunk-aware per file (the pre-push hook's rules),
with --no-ext-diff --no-textconv, and each file is scanned as
<tmp>/<i>/<basename> so its type survives; findings name the file.

Reported by @brentyates-swx.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…report (#3219)

The DX Scorecard had the same placement gap as the design Completion
Summary: with no rule, it could land inside GSTACK REVIEW REPORT, which the
next plan review deletes. It now goes in its own "## DX Review Scorecard"
section above the report.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai capy-ai Bot changed the title fix: wave 5 — Windows gstack-upgrade checkout check, env.kv schema keys (#3208), CSO fixture flake (#3207) fix: wave 5 — pregate secrets false negatives (#3211), Windows gstack-upgrade, env.kv schema keys (#3208), browse rule 3 (#3216), review summaries (#3219), CSO flake (#3207) Oct 16, 2026
…ndows gstack-upgrade, env.kv schema keys (#3208), browse rule 3 (#3216), review summaries (#3219)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@github-actions github-actions Bot changed the title fix: wave 5 — pregate secrets false negatives (#3211), Windows gstack-upgrade, env.kv schema keys (#3208), browse rule 3 (#3216), review summaries (#3219), CSO flake (#3207) v1.91.109.0 fix: wave 5 — pregate secrets false negatives (#3211), Windows gstack-upgrade, env.kv schema keys (#3208), browse rule 3 (#3216), review summaries (#3219), CSO flake (#3207) Oct 16, 2026
garrytan added a commit that referenced this pull request Oct 16, 2026
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai
capy-ai Bot merged commit 86091dd into main Oct 17, 2026
83 of 84 checks passed
garrytan added a commit that referenced this pull request Oct 17, 2026
#3225 (merged into this branch) grew 53 pinned skills: 3 characters each from
the Aside driver resolver, and about 340 more in plan-design-review and
plan-devex-review from the #3219 summary sections. The pins are this PR's
starting measurement, so they are taken on the merged base; no skill this PR
renders grew.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
capy-ai Bot added a commit that referenced this pull request Oct 17, 2026
…through a bun-only directory (#3233)

* fix(capy): install and launch the project's pinned Node; launch Bun through a bun-only directory

gbrain pins node 24.18.0 in CI while the Capy image ships 24.21.0 in
/usr/local/bin, so a full install still ended with fail pins (GBRA-117).
The installer now resolves the project's exact Node pins the way it resolves
Bun's (required non-CI pins, CI pins in different jobs as alternatives): the
node first on PATH, then gstack's store copy and nvm's copy of each wanted
version, then any other node on PATH. With no match, install mode downloads the
pinned release into <state root>/runtimes/node and checks it against
SHASUMS256.txt. The resolution is recorded in the install verdict
(node_path, node_version, node_rule), and --check reuses it.

The launch PATH no longer prepends a shared bin directory. When the resolved
Bun was /usr/local/bin/bun, the image's node there shadowed every other node
(GBRA-122). A store Bun still launches from its own version directory; any
other Bun, and a Node the launch needs, launch through a gstack-owned
directory of symlinks beside the verdict. The pregate's lanes use the
recorded launch directory.

The doctor's pins row names the node it read and, for a Node mismatch, the
installer command that installs the pinned Node (or nvm install <v> off
Capy).

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* chore: v1.91.109.0

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* test(egress): exempt the Node installer's two release downloads with their reason

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* chore: restamp v1.91.110.0 (1.91.109.0 is #3225's slot)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* test(doctor): make the Node pin case platform-neutral (an any-lane CI pin, bash's spelling of the stub path)

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>
capy-ai Bot added a commit that referenced this pull request Oct 17, 2026
…SKILL.md size guard, planMode hosts (fix wave PR 5) (#3236)

* fix(pregate): recognise bats test files so lanes does not fail in bats repos (#3161)

gstack-pregate never treated a .bats file as a test, so in a repository whose
tests are bats files the lanes check failed every run with PREGATE_NO_LANE: a
.gstack/pregate.json dependency pointing at tests/foo.bats selected nothing, a
selection manifest printing .bats paths yielded 0 files, and a bats run that
executed no tests could not trip the zero-run rule.

Recognise .bats in the test-file pattern and in the manifest-output parser, and
read the bats TAP plan and pretty summary (as a last resort, after every
existing runner's summary) so a run that reports zero tests is a failure.

Fixes #3161.

Cherry-picked from #3177 (d355c11). Conflicts resolved as in the author's own
merges (b09476b, 444f4e7): lane-selection.ts keeps main's isTestFile-based
manifest parser, and lanes.ts carries the bats summary on main's supervised runner.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* test(pregate): a nested .bats file is selected and run end to end (#3161)

Reviewer test for #3177: touched itself with no declaration, and through a
declared dependency; a failing nested bats run reports the bats counts.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* fix(pregate): a wtree failure is WTREE_UNAVAILABLE, not an unresolvable base (#3197)

The pregate consumers of the working-tree fingerprint (buildContext,
withFingerprint, verifyPregate) move to lib/script-invocation.ts's
{tree}|{error} form, and lib/regen.ts drops its string-returning wrapper.

- A fingerprint failure was reported as "policy source unavailable:
  origin/<base> is not a resolvable commit" with git fetch as the fix. It is
  now WTREE_UNAVAILABLE: a launch failure lists each Windows bash candidate
  with its rejection reason and names GSTACK_GIT_BASH; a gstack-wtree exit
  keeps the repair it printed (set TMPDIR to a writable directory).
- A fingerprint failing after a check is incomplete with that cause, not
  "working tree changed"; verify says the tree cannot be fingerprinted.
- #3190's gstack-config read (test_backend) goes through runScriptSync, so
  Windows reaches it through Git Bash. The tripwire learns the bin-constant
  shape that let it through.
- Under --json every context refusal is one envelope on stdout
  ({ok:false,status:'refused',code,detail,fix,docs}, exit 3); the run object
  carries ok and status too, and GSTACK_RESULT goes to stderr.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* ci(pregate): gstack-pregate joins the Windows pregate job; pregate tests return to the Windows lane (#3197)

- windows-pregate-e2e runs gstack-pregate run (preflight: regen, secrets
  through the gstack-redact bun bin, literals, guards) in both journeys, and
  asserts a missing GSTACK_GIT_BASH refuses with one WTREE_UNAVAILABLE --json
  envelope.
- test/helpers/pregate-fixture.ts and restamp-fixture.ts runBin launch bins
  through lib/script-invocation.ts (bun bins as Bun argv, bash bins through
  Git Bash on Windows), which removes the "shebang via CreateProcess" reason
  for the pregate tests; they move from KNOWN_WINDOWS_INCOMPATIBLE to
  KNOWN_WINDOWS_SAFE.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* doctor: list rescue refs and warn about CLAUDE.md skill lists

gstack-doctor's plain report gains two rows. 'rescue refs' lists each
refs/gstack/rescue/* commit in the install checkout, newest first, with its
date, a needs-manual-resolution label when the rescue held unmerged files, and
the shell-quoted inspect and delete commands bin/gstack-ff-update's banner
prints. 'CLAUDE.md' warns when a gstack section in ~/.claude/CLAUDE.md or the
project's CLAUDE.md enumerates skills (#3169) and prints the short block to
paste instead; docs/troubleshooting.md#claude-md-skill-list explains it.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* doctor: name the Windows bash gstack resolves and what chose it

On Windows (OSTYPE msys/cygwin) gstack-doctor adds a 'windows bash' row from
lib/script-invocation.ts resolveWindowsBash, run through the new thin
bin/gstack-windows-bash.ts with the bun on PATH: the resolved bash and the
override or discovery step that chose it, a warn when GSTACK_GIT_BASH and
GSTACK_BASH differ, and a fail carrying the BASH_UNAVAILABLE line (every
candidate with its rejection reason) when none qualifies. Tests inject the
platform (GSTACK_DOCTOR_PLATFORM) and the discovery inputs
(GSTACK_DOCTOR_BASH_PROBE) so the row runs on every OS.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* doctor --check: name the held-install recovery on Windows, not bin/gstack-upgrade

bin/gstack-upgrade compares a pwd -P path (/c/...) with git's toplevel
(C:/...) and refuses on every Git Bash install, so on Windows the revision
row's upgrade fix (REVISION_BELOW_MINIMUM, the Capy-wrapper variant and
REVISION_UNMET) names the held-install recovery forms from
docs/troubleshooting.md#auto-update-held-install-recovery instead: the Git
Bash form and the Windows PowerShell 5.1 form, each labelled by shell with the
install path quoted for that shell. Other platforms keep bin/gstack-upgrade.
A test pins both printed forms to the documented ones.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* fix(skills): omit the plan-mode section on hosts without plan mode (#3168)

generatePlanModeInfo now honours capabilities.planMode. Hosts that declare
planMode:false (codex, agy, hermes, openclaw, and define-host's default:
factory, kiro, slate, cursor, gbrain) no longer render the
'## Plan Mode Safe Operations' and '## Skill Invocation During Plan Mode'
preamble sections. Claude, copilot and opencode are unchanged.

The codex, factory and agy ship goldens are regenerated. The clarity test that
pinned the plan-mode entry-order prose on every host now pins it on planMode
hosts and asserts its absence elsewhere (intentional contract change).

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* test(skills): guard generated SKILL.md size at 100,000 chars on every host (#3199)

A free test renders every host and fails when a generated SKILL.md exceeds
100,000 characters, naming host, skill, actual size, limit and the fix. The 89
current offenders are pinned at their exact size in
test/fixtures/skill-md-size-allowlist.json: growth past a pin fails, and a
shrink fails until the pin is lowered. The shared-preamble hoist is deferred
(owner Garry, revisit 2026-11-15).

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* test(pregate): keep #3177's bats tests beside the nested-directory test

Moves #3177's bats describe block verbatim from test/pregate-selection.test.ts
into test/pregate-bats-nested.test.ts, so pregate-selection.test.ts is
unchanged on this branch and the in-flight field-list-2 pregate lane
(capy/fl2-L6-pregate, which edits that file's imports and adds cases) merges
without a conflict. No assertion changes.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* doctor --check: keep bin/gstack-upgrade as the Windows fix (path spelling fixed on main)

Reverts 37bac07. Plan item D named the held-install recovery forms on
Windows only until bin/gstack-upgrade stopped refusing Git Bash installs.
bin/gstack-upgrade:63-67 now compares with gstack_path_same from
bin/gstack-path-spelling.sh, pinned by test/gstack-upgrade-path-spelling.test.ts,
so bin/gstack-upgrade is the right fix on every platform again.

* test(skills): measure the size-guard pins on v1.91.109.0

#3225 (merged into this branch) grew 53 pinned skills: 3 characters each from
the Aside driver resolver, and about 340 more in plan-design-review and
plan-devex-review from the #3219 summary sections. The pins are this PR's
starting measurement, so they are taken on the merged base; no skill this PR
renders grew.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* ci(windows): only the pregate tests that pass on windows-latest join the lane

windows-free-tests run 38984824731 (this branch at 8ed6da4) ran the moved
files. gstack-regen and the new pregate-wtree-refusal passed. pregate-guards,
-remote, -regate, -invalidation, -selection and -bats-nested launched
gstack-pregate fine but fail on Linux-host expectations: their fixture lanes are
Linux workflow jobs, which a Windows host records as requires-remote
obligations. They go back to KNOWN_WINDOWS_INCOMPATIBLE with that reason
instead of "shebang via CreateProcess".

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* windows curation: keep CI run ids out of reason prose (pii.phone false positive)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* skill-md size pins: follow #3231's review-army line (+21 chars on five inlining hosts)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* doctor test: drop the reverted Windows upgrade-fix wording from item D's describe

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* skill-md size pins: follow #3226 (plan-devex-review +3324) and #3234 (autoplan +59)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* 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>

* docs(changelog): fix wave PR 5 release notes

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* v1.91.117.0 fix: fix wave PR 5 (pregate bats + WTREE_UNAVAILABLE, doctor rows, SKILL.md size guard, planMode hosts)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

* fix(qa): an invalid-input probe breaks only the rule it tests

The paid gate's qa-functional-cli-report failed again on #3236 (run
39001107574): the agent probed the digits-only amount rule with -5, which
the positivity check rejected first, so the planted parseInt defect stayed
hidden and it reported no defect. The contract map's invalid-input row now
asks for each input to break only the rule it tests, so another check
cannot reject it first.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>

---------

Co-authored-by: harjothkhara <[email protected]>
Co-authored-by: Claude Sonnet 5.5 <[email protected]>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants