docs(#1279): ratify ADR-550 addendum + FEATURES/reference/verify-phase + changeset
- ADR-550 dated 2026-06-15 addendum: machine-proven fail-first REALIZED (D5d CLOSED); ratify violationFixture, GSD_PROHIB_SUBJECT, failFirst demotion - FEATURES REQ-PROHIB-07 reads shipped (machine-proven, not caller-attested) - prohibition-probe reference + verify-phase descriptor shape updated with violationFixture + convention - tag GSD_PROHIB_SUBJECT + violationFixture PROPOSED/renamable (zero live consumers) as a PR-review flag - add .changeset/1279-machine-proven-fail-first.md (type: Changed)
This commit is contained in:
@@ -112,15 +112,38 @@ lifecycle is identical to the edge-probe, the verification tiers differ):
|
||||
|
||||
At verify time these tiers are routed differently (ADR-550 D4):
|
||||
- A **test**-tier prohibition is enforced + hard-gates via the deterministic
|
||||
`check prohibition-enforcement` sub-command (#1259, ADR-550 D5d): it locates the wired
|
||||
`check prohibition-enforcement` sub-command (#1259 + #1279, ADR-550 D5d): it locates the wired
|
||||
mechanical check (a `node --test` negative test OR a lint/AST rule run as
|
||||
`eslint --format json` and filtered by `ruleId`), requires the caller-attested `failFirst`
|
||||
marker, runs it for a genuine **non-vacuous** pass, and emits the
|
||||
`dispositionForProhibition()` verdict. A passing wired check disposes **green** (satisfiable
|
||||
→ can reach `passed`); a missing, non-attested, or genuinely-non-passing check **hard-gates**
|
||||
(flagged, never green → `gaps_found`) in BOTH interactive and autonomous modes — never a
|
||||
silent pass. (`failFirst` is caller-attested, not yet machine-proven against a violation
|
||||
fixture — a tracked follow-up; see ADR-550 D5d.)
|
||||
`eslint --format json` and filtered by `ruleId`), **machine-proves it is fail-first** against a
|
||||
known violation, runs it for a genuine **non-vacuous** pass, and emits the
|
||||
`dispositionForProhibition()` verdict. A passing, fail-first-proven wired check disposes **green**
|
||||
(satisfiable → can reach `passed`); a missing, un-provable, or genuinely-non-passing check
|
||||
**hard-gates** (flagged, never green → `gaps_found`) in BOTH interactive and autonomous modes —
|
||||
never a silent pass.
|
||||
|
||||
**Machine-proven fail-first (#1279).** `failFirst` is now **machine-proven, not caller-attested**:
|
||||
before a clean pass greens, the producer independently runs the wired check against a KNOWN
|
||||
VIOLATION and confirms it goes RED (any other outcome — passes-on-violation, can't-prove, throws,
|
||||
times out, no violation source — hard-gates). The violation is sourced from a descriptor field:
|
||||
- **`violationFixture`** — an author-supplied path to a KNOWN-BAD subject. For `lint-rule`: a file
|
||||
whose content violates `rule`; the prover lints it and requires the rule id to appear in the
|
||||
JSON report (the rule must have teeth). For `node-test`: a subject the negative test exercises,
|
||||
expected to drive it RED.
|
||||
- **`GSD_PROHIB_SUBJECT`** — the node-test subject-injection convention: the producer spawns the
|
||||
negative test with `GSD_PROHIB_SUBJECT=<violationFixture>` in the child env; the test reads that
|
||||
env var to locate its subject-under-test and is expected to go red against the violating subject.
|
||||
- **lint-fixture authoring gotcha** — the violating fixture must actually trigger the rule. For the
|
||||
`local/no-source-grep` dogfood anchor specifically, use the `path.join('lib','foo.cjs')` form
|
||||
(a standalone quoted dir token); a single string literal like `'src/x.cjs'` does NOT trigger the
|
||||
rule, so a mis-authored fixture makes the prover report "not proven" and hard-gate a legitimately
|
||||
wired check. (`no-source-grep` has no filename guard — any `.cjs` with the pattern fires.)
|
||||
|
||||
> **PROPOSED, renamable conventions (zero live consumers).** Both `GSD_PROHIB_SUBJECT` and
|
||||
> `violationFixture` are net-new surface with **no live in-tree consumer yet** — there is no
|
||||
> in-tree `node --test` prohibition; node-test fail-first proof is exercised only by SYNTHETIC
|
||||
> temp fixtures in the tests, and the real dogfood remains the LINT-rule `local/no-source-grep`.
|
||||
> They are therefore **open to maintainer adjustment (rename, or replacing the env var with an
|
||||
> argv) at PR review with zero migration cost.** See the ADR-550 2026-06-15 addendum (#1279).
|
||||
- A **judgment**-tier prohibition routes to a never-silent / never-hard-halt soft gate
|
||||
(autonomous emits an `unverified-prohibition — human review recommended` flag).
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ Aggregate all must_haves across plans for phase-level verification.
|
||||
gsd_run check prohibition-enforcement <request.json>
|
||||
```
|
||||
|
||||
where `<request.json>` carries `{ prohibition, check, mode }` — `check` being the wired mechanical-check descriptor `{ kind: 'node-test' | 'lint-rule', target, rule?, failFirst: true }`. For `node-test`, `target` is the negative-test file path; for `lint-rule`, `target` is the PATH to lint and `rule` is the eslint rule id (e.g. `local/no-source-grep`) — both required (a lint-rule without `rule` is not a valid wired check). The producer LOCATES the wired check, requires the caller-attested `failFirst` marker, RUNS it for a genuine non-vacuous pass, builds `enforcementEvidence`, and emits the `dispositionForProhibition()` verdict (#1259, ADR-550 D5d). (`failFirst` is caller-attested, not yet machine-proven against a violation fixture — a tracked follow-up.) Route the result by its typed fields:
|
||||
where `<request.json>` carries `{ prohibition, check, mode }` — `check` being the wired mechanical-check descriptor `{ kind: 'node-test' | 'lint-rule', target, rule?, violationFixture, failFirst? }`. For `node-test`, `target` is the negative-test file path; for `lint-rule`, `target` is the PATH to lint and `rule` is the eslint rule id (e.g. `local/no-source-grep`) — both required (a lint-rule without `rule` is not a valid wired check). `violationFixture` is the author-supplied path to a KNOWN-BAD subject the producer runs the check against to **machine-prove fail-first** (for `node-test`, injected via the `GSD_PROHIB_SUBJECT` env convention); `failFirst` is a DEMOTED, non-authoritative hint kept only for backward route-JSON shape (no path greens on it alone — FF-08). The producer LOCATES the wired check, **machine-proves it is fail-first** by running it against the violation and confirming it goes RED, RUNS it for a genuine non-vacuous pass, builds `enforcementEvidence`, and emits the `dispositionForProhibition()` verdict (#1259 + #1279, ADR-550 D5d). Fail-first is **machine-proven, not caller-attested** — absent a provable violation the producer fails closed, never falling back to attestation. Route the result by its typed fields:
|
||||
- **`status: 'green'`, `flagged: false`** (a genuinely-passing wired negative test / lint rule, `located: true`, non-empty `evidence`) → the item is satisfiable → it can reach **passed**.
|
||||
- **missing, non-attested, or genuinely-non-passing check** (`located: false` OR `status: 'unverified'`, `flagged: true`) → **hard-gate**: disposes flagged-unverified, NEVER green, routing to `gaps_found` in BOTH interactive and autonomous modes (a failing mechanical check blocks even AFK; ADR-550 D4 / D3). The deterministic fail-closed default backing every miss/fail is `dispositionForProhibition()` in probe-core (`status: 'unverified'`, `flagged: true` on empty `enforcementEvidence`).
|
||||
|
||||
|
||||
Reference in New Issue
Block a user