Title: chore(#5056): gate evidence is typed and the exit code follows the verdict — Phase 8 · Issue #5170 · open-gsd/gsd-core · GitHub
Open Graph Title: chore(#5056): gate evidence is typed and the exit code follows the verdict — Phase 8 · Issue #5170 · open-gsd/gsd-core
X Title: chore(#5056): gate evidence is typed and the exit code follows the verdict — Phase 8 · Issue #5170 · open-gsd/gsd-core
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-ident...
Open Graph 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...
X 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...
Opengraph URL: https://github.com/open-gsd/gsd-core/issues/5170
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"chore(#5056): gate evidence is typed and the exit code follows the verdict — Phase 8","articleBody":"### Pre-submission checklist\n\n- [x] This does not change user-facing behavior (commands, output, file formats, config)\n- [x] I have searched existing issues — this has not already been filed\n\n> 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 `Fixed` changeset.\n\n### What is the maintenance task?\n\nPhase 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).\n\n### Type of maintenance\n\nRefactoring / code quality\n\n### Current state\n\n- `Evidence\u003cT> = found | none | unreadable` does not exist. Gate return paths cannot tell \"nothing there\" from \"could not read\", so an unreadable input can produce a passing verdict.\n- Gates parse structured plan and document content with per-gate regexes instead of the Frontmatter Module, `markdown-sectionizer`, `markdown-table` and `PlanningDoc`.\n- `emitGateResult` in `src/check-command-router.cts` prints a verdict's payload and never sets an exit status; `phase uat-passed` and `verify artifacts` exit 0 while their JSON reports failure (#4686).\n\n### Proposed work\n\n- Census per-gate regex parsers of structured content, gate return paths that cannot distinguish `none` from `unreadable`, and gate verbs whose exit code is chosen per verb; publish the counts in the PR and drive them to zero.\n- Add `Evidence\u003cT> = { kind: 'found', value: T } | { kind: 'none' } | { kind: 'unreadable', reason, span? }`; a gate cannot produce a passing verdict from `unreadable`.\n- Read structured content through the document seams; delete the per-gate regexes.\n- Derive every gate verb's exit status from its `GateVerdict` through `cli-exit`; no verb chooses its own.\n- Failing-first regression cases for #4562, #4541, #4259, #4686, #4031, #4176.\n\n### Done when\n\n- [ ] Census published in the PR and driven to zero\n- [ ] `Evidence\u003cT>` exists and does not admit a passing verdict on `unreadable` (type or property test, with a positive control)\n- [ ] Gates read structured content only through the document seams; per-gate regex parsers deleted\n- [ ] Gate verbs obtain their exit code only through `cli-exit`; a shell caller of `phase uat-passed --require-verification` and `verify.artifacts` gets a non-zero status whenever the verdict fails\n- [ ] A drift guard fails on a gate verb choosing its own exit code, with a positive control\n- [ ] Tests pass under `gsd-test`\n\n### Area affected\n\nMultiple areas\n\n### Additional context\n\nEpic: #5056. Design lock: ADR-5057 §4 and Phase 8. Evidence (`Refs`, all closed): #4562, #4541, #4259, #4686, #4031, #4176.\n","author":{"url":"https://github.com/trek-e","@type":"Person","name":"trek-e"},"datePublished":"2026-10-01T20:39:35Z","url":"https://github.com/open-gsd/gsd-core/issues/5170"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:463f9408-29e2-5f60-dca9-c794da70c89f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B9B8:2D3467:209018E:2BC736C:6AEDA1DA |
| html-safe-nonce | 10f5efa6fbfdc865597b29a824c92501cd2594196339a0d6c747ba3da066f4ab |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOUI4OjJEMzQ2NzoyMDkwMThFOjJCQzczNkM6NkFFREExREEiLCJ2aXNpdG9yX2lkIjoiMTM5OTMxMDkyMTA0MDI0MTExNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 8c190e001a1f981b3ec86a9197f9568b950ac326e9963d0de914b54ff2e327db |
| hovercard-subject-tag | issue:5668841046 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/open-gsd/gsd-core/5170/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d16ab0f8d7b9397c95a0353cabe0d925f3cb793f8f849de7408a0be0175da81a/open-gsd/gsd-core/issues/5170 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d16ab0f8d7b9397c95a0353cabe0d925f3cb793f8f849de7408a0be0175da81a/open-gsd/gsd-core/issues/5170 |
| og:image:alt | 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... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | trek-e |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9f51e3b6c7a190e426e641ae15acbc58dd1ac2003e96b58879bbc298e213dbf3 |
| turbo-cache-control | no-preview |
| go-import | github.com/open-gsd/gsd-core git https://github.com/open-gsd/gsd-core.git |
| octolytics-dimension-user_id | 286935422 |
| octolytics-dimension-user_login | open-gsd |
| octolytics-dimension-repository_id | 1246625636 |
| octolytics-dimension-repository_nwo | open-gsd/gsd-core |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1246625636 |
| octolytics-dimension-repository_network_root_nwo | open-gsd/gsd-core |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7060660810b587033ea861b8aa67beb72c8e6542 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width