Repository navigation
Closed
Labels
area: corePROJECT.md, REQUIREMENTS.md, templatesPROJECT.md, REQUIREMENTS.md, templatestype: choreMaintenance, refactoringMaintenance, refactoring
Description
Pre-submission checklist
- This does not change user-facing behavior (commands, output, file formats, config)
- I have searched existing issues — this has not already been filed
Scope note on the first checkbox: gate payloads stay byte-identical. The one class of behavior change is stated in ADR-5057 §4 and #4686: a gate verb's exit status is now a function of its verdict, so a failing verdict no longer exits 0. It ships with a
Fixedchangeset.
What is the maintenance task?
Phase 8 of epic #5056 (ADR-5057 §4, third and fourth bullets): gate evidence is a typed result read through the document seams, and a gate verb's exit code is derived from its GateVerdict through the process exit contract (src/cli-exit.cts, ADR-3889). Depends on Phase 6 (merged in #5144).
Type of maintenance
Refactoring / code quality
Current state
Evidence<T> = found | none | unreadabledoes not exist. Gate return paths cannot tell "nothing there" from "could not read", so an unreadable input can produce a passing verdict.- Gates parse structured plan and document content with per-gate regexes instead of the Frontmatter Module,
markdown-sectionizer,markdown-tableandPlanningDoc. emitGateResultinsrc/check-command-router.ctsprints a verdict's payload and never sets an exit status;phase uat-passedandverify artifactsexit 0 while their JSON reports failure (bug(cli): phase uat-passed and verify.artifacts exit 0 while their JSON reports failure #4686).
Proposed work
- Census per-gate regex parsers of structured content, gate return paths that cannot distinguish
nonefromunreadable, and gate verbs whose exit code is chosen per verb; publish the counts in the PR and drive them to zero. - Add
Evidence<T> = { kind: 'found', value: T } | { kind: 'none' } | { kind: 'unreadable', reason, span? }; a gate cannot produce a passing verdict fromunreadable. - Read structured content through the document seams; delete the per-gate regexes.
- Derive every gate verb's exit status from its
GateVerdictthroughcli-exit; no verb chooses its own. - Failing-first regression cases for bug: verify.schema-drift parses files_modified as an inline array only — block-sequence plans give it an empty file set #4562, verify plan-structure: self-invalidating-gate scan misses the
! grepnegative-gate form #4541, bug(tests): T6 docs-parity site scan requiresgit logand--grep=on one physical line, so a backslash-continued derivation is invisible to the assertion #4259, bug(cli): phase uat-passed and verify.artifacts exit 0 while their JSON reports failure #4686,run-tests.cjsdefaults--test-force-exiton: executed tests are dropped from the report at rc=0, so every reported test count is a lower bound #4031, gsd-ui-auditor: the sole screenshot path misreads a redirecting dev server as absent, prints "Screenshots captured" when every capture failed, and never tries the port fallback its own next line documents #4176.
Done when
- Census published in the PR and driven to zero
-
Evidence<T>exists and does not admit a passing verdict onunreadable(type or property test, with a positive control) - Gates read structured content only through the document seams; per-gate regex parsers deleted
- Gate verbs obtain their exit code only through
cli-exit; a shell caller ofphase uat-passed --require-verificationandverify.artifactsgets a non-zero status whenever the verdict fails - A drift guard fails on a gate verb choosing its own exit code, with a positive control
- Tests pass under
gsd-test
Area affected
Multiple areas
Additional context
Epic: #5056. Design lock: ADR-5057 §4 and Phase 8. Evidence (Refs, all closed): #4562, #4541, #4259, #4686, #4031, #4176.
Metadata
Metadata
Assignees
Labels
area: corePROJECT.md, REQUIREMENTS.md, templatesPROJECT.md, REQUIREMENTS.md, templatestype: choreMaintenance, refactoringMaintenance, refactoring
Activity
github-actions commentedon Oct 1, 2026
Branch
chore/5170-chore-5056-gate-evidence-is-typed-and-thcreated.git fetch origin && git checkout chore/5170-chore-5056-gate-evidence-is-typed-and-thchore(#5170): backfill the changeset PR number (#5171)
test(#5170): withFsFailure refuses an fs method that does not exist
fix(#5170): test-file children write their results to a blocking stdo…
refactor(#5170): typed gate evidence and a verdict-driven exit status…
test(#5170): correct tests that pinned exit 0 on a failing verdict
test(#5170): gate evidence, gate exit, and verdict-driven CLI exit st…
refactor(#5170): gate reads run on typed evidence; "could not look" i…
test(#5170): correct expectations that pinned "could not look" as ski…
fix(#5170): schema-drift reads files_modified through the Frontmatter…
test(#5170): unreadable evidence is outcome unreadable and exits UNAV…
93 remaining items
chore(#5170): refresh the compact-content baselines and the platform …
chore(#5170): acknowledge the emitted growth of the exit-status-aware…
fix(#5170): the ui-auditor's static capture fence stays inline in <sc…
test(#5170): only a negative verdict at exit 1 is a refusal; the caps…
fix(#5170): a chunk whose ledger counted no result while the reporter…
test(#5170): the jq stub's agreement with jq is pinned over 13 docume…
chore(#5170): backfill the changeset PR number (#5171)
test(#5170): withFsFailure refuses an fs method that does not exist
fix(#5170): test-file children write their results to a blocking stdo…
test(#5170): fix the CI-only failures of the preload and jq-stub test…
test(#5170): tests that capture process.stdout.write no longer swallo…
fix(#5170): every ledger line carries the real path, including the ze…
chore(#5170): regenerate the context indexes after rebasing onto the …
refactor(#5170): typed gate evidence and a verdict-driven exit status…