fix(end-state): the gate can no longer be turned green by editing its own ledger
An independent adversarial review of the end-state gate reproduced a GREEN result, exit 0, with the gate's 18 tests passing. Only the registry and the STATE markers were edited; every other file stayed byte-identical. The judged party owned the denominator, and nothing guarded it. This change closes that finding and three more, and reopens a defect the gate had closed too early. Registry integrity (the blocker): - tests/fixtures/end-state-frozen.json freezes the denominator. It holds the 7 defect ids and 3 experiment ids, each with a sha256 signature of its check (canonical JSON, key order irrelevant), plus the exact agents / decisions / freeze configuration. - The rule: an entry may close; it may never disappear or have its check changed. New entries are allowed. spawnSites may never include agents/. - The test file pins the manifest literally, with a comment that the denominator was frozen on 2026-09-17 and that changing it is a decision. The gate verifies the registry against the manifest on every run. - A violation makes the gate red and names what moved. A missing manifest makes integrity n/a, which is also red. Dormant means "never spawned", not "never mentioned": - An agent counts as spawned only when a command names it in a spawn instruction: a row of a table headed `Agent`, a line that starts with Launch/Spawn, or a **name** block followed by a Prompt: line. - Prose, negations, HTML comments and fenced code never count. Block quotes cannot match either, because every form is anchored at the start of the line. - Re-measured under this definition: still 1 of 20 (synthesis-agent). Per agent, every other spawnable agent has a spawn instruction in at least one command. A fifth tally, feat-after-freeze: - It counts commits after the `end-state-freeze` tag whose subject matches ^feat(\(|!|:). - The row is n/a, and therefore red, when there is no tag yet, the root is not a git work tree, or the root is not the top of its work tree. It is never 0. Honest output: - Every registry entry now declares its probe kind (phrase or byte). - Open phrase probes are labelled as such, and closed ids are listed. The output states that a closed phrase probe is evidence, not proof of behaviour. D-03 and D-04 stay open and labelled; how they are fixed is still to be decided. - The decisions row now says it counts ticks, not verified decisions. D-07 reopened: - Its check now also covers README.md and commands/trekresearch.md, where the "orchestrator runs on opus" claim still lives. README even ships a sed recipe for `model: opus` lines no command has. - Defects are 3 of 7 until the separate docs fix lands. Three surviving review mutants were killed with tests: - an empty glob over an existing dir is silent; - the header counts n/a rows as zero; - a dormant-row error reads as 0. Measured on a clean export of the index: - Mutation harness, adapted from the review's: review code mutants 18 of 18 killed. Four of them were re-targeted at the equivalent new code. M02 survived until a test with an intact registry plus a missing freeze tag was added. - New-logic mutants: 12 of 12 killed. One equivalent mutant (block-quote stripping) was removed together with the dead clause it targeted. - Registry attacks: 7 of 7 killed. - The review's combined green attack (registry + STATE only) is now RED, exit 1: "defects: D-03 is frozen but missing from the registry". - Gate tests 38/38. Suite 1059 -> 1079 (1077/0/2). - Gate: RED, defects 3 of 7, experiments 3 of 3, dormant 1 of 20; decisions and feat-after-freeze are n/a in a clean export. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
e43153c3c4
commit
09feb415b3
4 changed files with 762 additions and 144 deletions
32
tests/fixtures/end-state-frozen.json
vendored
Normal file
32
tests/fixtures/end-state-frozen.json
vendored
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
"why": "Frozen 2026-09-17, when the end-state direction was chosen. These ids and check signatures are the end-state gate's denominator: an entry may CLOSE, it may never disappear or have its check changed. Changing this file is a decision, not a refactor - tests/scripts/end-state-gate.test.mjs pins it literally.",
|
||||
"defects": {
|
||||
"D-01": "48f7f5cca070091e8f9b9ca0c7cdb7a1880733691935c25d07ea1d3e8d508fc9",
|
||||
"D-02": "dfc94dba04a9116ae9be2097a0c5a9d8313b02c7de1ca6b49a472c1823a6d1e1",
|
||||
"D-03": "41dea56c14764494ed6d555ca97311b6001b0542f4ab69fa1dfc405780a57c32",
|
||||
"D-04": "721bdda19c0e98962acbfc78419bfb02790ee739694d1609b72d10481f0d6b62",
|
||||
"D-05": "8fe6df52b43496c3302400507cb98002dcf8d2a12d92085e14bda4c7819bc7ba",
|
||||
"D-06": "72a787c8154d1c18849e9856dcf1a67703d6b5541f88db81d6bab13cab14b418",
|
||||
"D-07": "1bf3e0cd36c621720697475b0a3fd7db78611d66b58a9ce035e7695e57c69f1b"
|
||||
},
|
||||
"experiments": {
|
||||
"E-01": "f7718897cec8ace6879fe79f5f32760ec957c3642e7186f8aa1688ce77b3f4e8",
|
||||
"E-02": "c8ff12c504ba7a9ac36f11bb8f9b713263e9b4eb28c07d984d9e2115980e740d",
|
||||
"E-03": "17153ad8808615a833a49ae0c3523264ce055aa690e5542a75bae1874495e7e8"
|
||||
},
|
||||
"agents": {
|
||||
"dir": "agents",
|
||||
"spawnSites": "commands/*.md",
|
||||
"referenceMarker": "Reference document, not a spawnable capability"
|
||||
},
|
||||
"decisions": {
|
||||
"file": "STATE.md",
|
||||
"section": "## Åpne operatørbeslutninger",
|
||||
"open": "^- \\[ \\] ",
|
||||
"closed": "^- \\[x\\] "
|
||||
},
|
||||
"freeze": {
|
||||
"tag": "end-state-freeze",
|
||||
"featPattern": "^feat(\\(|!|:)"
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue