Repository navigation
Speckit 026: the modified-block-currency family's fifth finding class — an unplaceable rule shape becomes one warning per arm template - #466
Conversation
…not a text row Realizes `add-unclassified-finding-class` (ratified 2026-08-27 by Brett, "Amend now"; PR #446, squash 86b7ca3) as Speckit feature `026-unplaced-finding-drift`. The packet's tasks.md § 2 is the plan at task grain and every task cites the box it realizes. WHAT MOVED. `classify` was already fail-closed: a rule text no pattern of the family's class map matches is not absorbed into a neighbouring class, it falls to a named residual row in the report block. That row is PROSE — no severity, so no `--fail-on` reaches it; not a finding, so the ranked plan never carries it. The one thing the family reports that its own tooling is wrong about could not become work. Now a nonzero residual emits ONE `warning` per DISTINCT unplaced rule SHAPE per run, naming that shape's count, quoting the first instance's rule text verbatim, and carrying its repository and delta path. The map places that finding itself, in a FIFTH class — `unplaced`, label `unplaced-finding drift` — so it is never counted by the residual it reports; the residual row keeps rendering beside it, counting the arms' unplaced findings only, and the tally still sums to the rows. THE THREE DESIGN POINTS THAT ARE NOT DECORATION. - A FOURTH severity constant, `_DRIFT_SEVERITY`, not a reuse of `_LAUNCH_SEVERITY`. § 7.2 of `add-modified-block-currency-check` flips that one to `error` together with a `contested` classification, and this finding is DESIGNED to disappear when somebody extends the map — `contested` would turn that disappearance into an error under the uncited-resolution rule. The drag would also be invisible, so it is pinned by a test that executes the module's own source with the flip applied and reads the two bands apart. - The pattern is ANCHORED, and both directions are measured. The finding quotes a rule text that may itself begin in the shape of an arm's; and a requirement may be TITLED with the fifth class's own opening phrase, in which case an unanchored probe matches its ledger finding too — two patterns on one rule. - The id and label carry no substring `unclassified`: a standing pin asserts that string's absence from a fully-classified summary, and a class label renders even at a count of zero. EVIDENCE (specs/026-unplaced-finding-drift/evidence/). Test suite 1215 -> 1227 passed, +12, every one named and every one seen RED before the module moved. Self-gate before/after over a FULL report: exactly one line differs, the fifth class row reading 0 — zero movement in every band, which is what the proposal predicted. `openspec validate --all --strict`: 77 passed, 0 failed. Mutation round: 9 applied, 9 killed, 0 survivors — the unanchored-pattern mutant survived the first attempt and exposed a near-miss adversarial title, now fixed and commented. CI shape proved from a clean `git archive` extraction: the same seven history-dependent tests fail there at the branch point and here, and 1199 -> 1211 is the same +12. SCOPE. `git diff` against the merge base over `.github/` and `openspec/` is EMPTY: no workflow file, and the packet's own task boxes tick at its archive act, not here. Nothing else moves — no other family, no `report.py`, no `families.py`, no `Finding` field, no registry, no threshold. The byte-level report-section contract of `022-modified-block-currency-reporting` is amended at all four of its class-enumeration sites, because a fifth class landing without that would leave the corpus carrying a contract false about the code it describes. Co-Authored-By: Claude Opus 5 <[email protected]>
…neither moved `origin/main` advanced six commits during this feature, one of them a new proposal, so the branch took a MERGE — never a rebase — and the evidence pair was re-measured rather than carried over. The before figure is re-taken from a clean `git archive` extraction of the NEW merge base `22f15cdf`, and the after figure re-run on the merged branch. The diff is still exactly one line: `- unplaced-finding drift: 0 (\`warning\`)`. Zero movement in every band, over a full report, so the comparison still covers all twenty-two families rather than this one's block. Nothing else moved either: `git diff 86b7ca3 22f15cd -- tests/doc-health/ scripts/doc_health/` is EMPTY, so the 1215-test baseline still stands against the merged base and 1227 is still +12. `openspec validate --all --strict` reads 78 passed where it read 77, the extra item being the packet the merge brought in. `.github/` and `openspec/` diffs against the new merge base are still empty. Recorded because packet § 3.1 warns this figure moves as active changes land. Here it did not, and the reason is legible: the incoming packets carry no `## MODIFIED Requirements` block, which is the only thing this family reads. Co-Authored-By: Claude Opus 5 <[email protected]>
…ving in the gap Combined review reproduced every gate and confirmed the trigger claim independently (20,040 fuzzed rule texts, 0 unplaceable). It found two defects in `_shape` and two surviving mutants. B2 — THE MASK PAIRED A PROSE APOSTROPHE WITH A `repr`'s OPENING QUOTE. These rule texts are fixed prose interleaved with `repr` spans, and one of the fixed strings carries an apostrophe: `_unresolved_finding`'s "no active sibling's addition:". A global `re.sub` matched from THAT apostrophe to the opening quote of the next `repr`, masked the prose between them, and left the repr's own content — the capability name — exposed. Two unresolved blocks differing only in capability read as two shapes, so the family would report two remedies for one. Fixed in the MASK, never in the prose: a left-to-right consumer where a quote opens a span only at the start or after a non-alphanumeric, `_TITLE_REPR`'s two alternatives being first-char-disjoint and an accepted span jumped past whole. RED test added; the mutant that restores the global sub now dies. B1 — THE GRAIN IS NOT "ONE FINDING PER REMEDY", AND THIS BUILD SAID IT WAS. A rule text's UNQUOTED parts are shape-bearing under the ratified identity rule — the promoted spec's path, the `[body]`/`[bullet]` kind list, a change-id list, an unresolved block's `why` clause. Measured: dropping `carriage-ledger` on this repository leaves SEVEN unplaced findings in SIX shapes, where ONE new map entry would place all seven. This is NOT fixable here: masking the arm's whole template would contradict the delta's third scenario, which pins "differ outside their quoted spans and digit runs → TWO". So every claim to the contrary is struck (module docstring, test docstrings, fixture README, spec.md US4, tasks.md), the real grain is stated in their place, and a new test MEASURES it on the real tree against an independently written mask — with the six named in its docstring as the figure an amendment would move. The amendment is recorded OPEN in plan.md § OPEN-1 and tasks.md for Brett's ruling. N1 — TWO MUTANTS SURVIVED, AND ONE OF THEM WAS A LINE THAT COULD NOT FAIL. The trailing `findings.sort(key=_report_order)` is DELETED: `runner.run_suite` sorts the whole result by `Finding.sort_key` and `report.render` sorts again before printing, so the order this family returned in reached no reader. A line no test can fail is a line that will later be trusted for a guarantee it does not give. The sort BEFORE the emit stays, because it decides which finding each drift warning names — and it is now pinnable, because the fixture grew a second change directory (`add-a-drift-case/`) whose path sorts first while its title sorts last. Emission order and report order now DISAGREE on that tree, which is the only condition under which "the first of that shape in report order" can be falsified at all; the pin asserts the disagreement itself so it cannot silently stop biting. Mutants M8 and M9 both die. N2 the skipped-block docstring reads five zeros. N3 `evidence/scope-diff.md` is re-run and its output pasted, with the stale 492-line figure disclosed rather than edited. N4 the tree-count comment says 14 on disk, as a floor. N5 F2's `CLASSIFIERS` gains a `drift` key — and the other five needed a guard, because a drift finding QUOTES an arm's whole rule text and every unanchored probe would otherwise match it; the coupling to `_DRIFT_RULE` is declared in a comment and asserted by a test. GATES. `pytest tests/doc-health`: 1230 passed (1215 baseline, +15). Mutation round 2: 12 applied, 12 killed, 0 survivors. CI shape from a clean extraction: the same seven history-dependent tests fail as at the branch point, 1199 -> 1214 is the same +15. `openspec validate --all --strict`: 78 passed, 0 failed. Full-report movement diff: still exactly one line. `.github/` and `openspec/` diffs: empty. Co-Authored-By: Claude Opus 5 <[email protected]>
Brett ruled 2026-08-28, verbatim: "Amend: shape = arm template, all interpolations masked". The delta amendment is a parallel branch (`change/amend-unplaced-shape-rule`); this is its realization in 026. WHAT THE OLD RULE COST, MEASURED. Shape identity masked quoted spans and digit runs only, so every UNQUOTED interpolation was shape-bearing: the promoted spec's repo-relative path, the `[body]`/`[bullet]` unit-kind list, a change-id list, an unresolved block's `why` clause. Dropping ONE class pattern on this repository emitted SIX findings for SEVEN unplaced ones, where a single new map entry would have placed all seven. Nine unplaced findings on `-two-writers` became four. This feature shipped that faithfully, measured it, declined to widen it unilaterally because the delta's third scenario pinned it, and put the amendment up. All four figures now read ONE. THE MECHANISM, DERIVED AND NOT GUESSED. Each arm's rule text now renders through one registered `_ArmTemplate`, so the family's fixed prose has exactly one definition and the arm that prints it cannot drift from the mask that reads it — `test_the_arm_templates_are_the_only_place_the_prose_lives` forbids an inline f-string coming back. `_shape` is then two steps whose ORDER is load-bearing: mask every `repr`-emitted span with the B2-safe left-to-right consumer, then match the registered templates first-match-wins, the shape BEING the template's id. A text no template claims falls back to the old lexical mask rather than being merged into a neighbouring template — fail-closed, constitution VII. No field was added to `Finding`: the report grammar is shared by twenty-two families and a local identity is not a reason to move it. WHY MASKING COMES FIRST, AND WHY THAT TOOK TWO ATTEMPTS TO PIN. Requirement titles come from the corpus, so a title may contain another arm's whole fixed prose; matched raw, a carriage-ledger finding titled with the titles template's prose resolves to `scenario-titles`. The mutation round found no pin for that and then found the first pin built in the wrong DIRECTION — a titles finding with a ledger-shaped title still answers `scenario-titles` by luck of the registry order, so it passed over the mutant. The pin now runs the ordering against the answer and carries a guard that fails if the order ever stops putting the wrong template first. FIGURES, before -> after, with the pattern dropped named for each (a different drop exercises a different arm, so the rows are not comparable without it): this repository / `carriage-ledger`, 7 unplaced, 6 -> 1; `-two-writers` / `title-resolution`, 9 unplaced, 4 -> 1; `-markers` / `carriage-ledger`, 3 unplaced, 3 -> 1; `-unplaced` / `carriage-ledger`, 3 unplaced, 1 -> 1. Every claim about the grain is rewritten to the new truth — module docstrings, test docstrings, the fixture README, `spec.md` US4, `tasks.md`, and the F4 byte-level contract, which gains a § 5b stating the template registry and the two-step mask. `plan.md` § OPEN-1 moves from OPEN to RULED AND IMPLEMENTED. GATES. `pytest tests/doc-health`: 1236 passed (1215 baseline, +21). Mutation round 3: 15 applied, 15 killed, 0 survivors. CI shape: the same seven history-dependent tests fail in a clean extraction as at the branch point, 1199 -> 1220 is the same +21. `openspec validate --all --strict`: 78 passed, 0 failed. Full-report movement diff: still EXACTLY ONE LINE — the amendment changes how unplaced findings group and there are none where the map is complete, which is every run today. `.github/` and `openspec/` diffs: empty. Co-Authored-By: Claude Opus 5 <[email protected]>
…laced Re-check found this feature's Speckit artifacts still stating the SUPERSEDED identity rule as normative while the module implemented the amended one — the same defect class the family this feature extends exists to catch, in the feature's own documents. Rewritten to the amended rule, which landed on `main` as `6d100e51` / PR #461: `spec.md` FR-006 (now naming every interpolated field, and gaining FR-006a for the derive-from-templates clause and FR-006b for the fail-closed fallback), the US4 independent test and its first two acceptance scenarios (now the amended delta's "same template, different interpolations → ONE; different templates → TWO"), and the "Rule shape" key entity (now the arm template, with "Arm template" added beside it). `data-model.md` § 4 is rewritten as the template registry plus the three-step mask, with the lexical rule kept only as step 3's fallback. `research.md` R3 is marked SUPERSEDED with the ruling and the commit, kept rather than deleted because it is the reasoning the amendment overturned and because two of its findings survive it — the left-to-right consumer and the two-placeholder rule, now living inside steps 1 and 3. ONE ASSERTION ADDED, and it kills a mutant nothing else could see: a drift rule text QUOTES a ledger rule text, and `_ArmTemplate`'s pattern carries `\Z` but no `^` — it relies on `re.match`. Switching that one call to `re.search` finds the ledger template's segments inside the quotation and files a drift finding under `carriage-ledger`, the ledger template being earlier in the registry. The shipping path never shapes a drift finding at all (`_drift_findings` makes one pass and its own output is never fed back), so the registry's drift entry was defensive AND untested; it is now reachable in a test, and mutant MF dies. Nits: the fixture README's one-shape sentence now says "same arm template" rather than the old mask; tasks T014/T023/T024 carry the amended wording where a reader meets them rather than only in the far-away § RULED block; `\Z` is commented as near-inert (four of six templates end in a field, so it bites only on the two that end in prose) with the note that `re.match` is the anchor that carries the weight; and the "only place the prose lives" test now states its reach limit — it catches a REVERTED arm, not a brand-new inline one firing on a corpus-absent state, and what covers that case is measured instead: a rebuild with an arm's prose drifted from its template reds 24 tests. Mutation round: 16 applied, 16 killed, 0 survivors. Co-Authored-By: Claude Opus 5 <[email protected]>
… body The catch-up merge takes this branch's base to `6d100e51` — PR #461, the amendment Brett ruled — so every figure this feature records was re-taken there rather than carried over. The merge also brought a new doc-health family onto `main`, which moves the raw suite total and would make a bare before/after count unreadable. So the +21 is read from the CI-SHAPE PAIR instead, where both sides are extractions of the SAME base: 1229 -> 1250 passed, with the eleven history-dependent failures compared by name and found IDENTICAL. Eleven rather than the earlier seven because four of them belong to the new family; not one is this feature's. Self-gate: the before figure re-taken from a clean extraction of `6d100e51`, the after re-run on the merged branch, and the diff is still exactly the one line — the fifth class row reading zero, over a full report, so the comparison still covers every family rather than this one's block. `openspec validate --all --strict` reads 76 items where it read 78, packets having archived on `main` between the two runs. `.github/` and `openspec/` diffs against the new base are still empty. `pr-body.md` is written against these figures: the mechanism in three sentences, the grain table before and after the amendment with the dropped pattern named per row, the sixteen mutants and the four that survived a first attempt, the amendment named as a landed precondition, and `Refs #357` — the packet archives under its own later commit, so this PR closes nothing. Co-Authored-By: Claude Opus 5 <[email protected]>
There was a problem hiding this comment.
Hi @brettheap! 👋
Your private repo does not have access to Sourcery.
Please upgrade to continue using Sourcery ✨
There was a problem hiding this comment.
Pull request overview
Implements Speckit feature 026-unplaced-finding-drift, extending the doc-health modified-block-currency family to surface previously “prose-only” unplaced-class-map drift as actionable warning findings (a fifth finding class), with accompanying fixture coverage and contract/spec updates.
Changes:
- Add a fifth finding class (
unplaced-finding drift) and template-derived “shape” identity to emit one driftwarningper distinct unplaced rule shape. - Expand/adjust the doc-health test suite and introduce a new behavioral fixture tree to exercise the induced-drift path.
- Update the byte-level report contract and add Speckit artifacts (spec/plan/tasks/research/evidence) for traceable realization.
Reviewed changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
scripts/doc_health/modified_block_currency.py |
Adds the fifth class, arm-template registry + shape masking, and drift-finding emission logic. |
specs/022-modified-block-currency-reporting/contracts/report-section.md |
Updates the byte-level report-section contract to enumerate and describe the new fifth class and shape mechanism. |
tests/doc-health/test_modified_block_currency.py |
Updates class/severity narrative and adds a simulated-flip test to ensure drift severity isn’t coupled to the launch severity. |
tests/doc-health/test_modified_block_currency_self_gate.py |
Extends the real-tree self-gate to assert the new class reads zero with a non-vacuous positive control. |
tests/doc-health/test_modified_block_currency_fixtures.py |
Extends fixture classification partitioning to include the drift class and guards against substring-collision via quoted arm rules. |
tests/doc-health/fixtures/modified-block-currency-unplaced/README.md |
Documents the new fixture tree and explains why drift must be induced by removing a class-map pattern. |
tests/doc-health/fixtures/modified-block-currency-unplaced/driftFactory/openspec/specs/drift-cases/spec.md |
Adds a synthesized promoted spec used by the new fixture tree. |
tests/doc-health/fixtures/modified-block-currency-unplaced/driftFactory/openspec/changes/add-drift-cases/specs/drift-cases/spec.md |
Adds one change directory to create MODIFIED blocks for the fixture’s findings. |
tests/doc-health/fixtures/modified-block-currency-unplaced/driftFactory/openspec/changes/add-drift-cases/proposal.md |
Adds proposal metadata for the fixture change directory. |
tests/doc-health/fixtures/modified-block-currency-unplaced/driftFactory/openspec/changes/add-a-drift-case/specs/drift-cases/spec.md |
Adds a second change directory to force emission-order vs report-order disagreement. |
tests/doc-health/fixtures/modified-block-currency-unplaced/driftFactory/openspec/changes/add-a-drift-case/proposal.md |
Adds proposal metadata for the second fixture change directory. |
specs/026-unplaced-finding-drift/spec.md |
Feature spec capturing scenarios, requirements, and acceptance criteria for the new finding class. |
specs/026-unplaced-finding-drift/plan.md |
Implementation plan describing sequencing, risks, and how the mechanism is verified. |
specs/026-unplaced-finding-drift/tasks.md |
Task breakdown mapping directly to the realized packet boxes and validation steps. |
specs/026-unplaced-finding-drift/research.md |
Rationale record for key design decisions (anchors, masking order, drift grammar, simulated flip). |
specs/026-unplaced-finding-drift/data-model.md |
Data-model description of new constants/class/pattern/shape and the emitted drift finding fields. |
specs/026-unplaced-finding-drift/contracts/drift-finding.md |
Byte-level contract for the fifth class row, rule text, pattern, and action line. |
specs/026-unplaced-finding-drift/quickstart.md |
Manual verification steps for the “clean” state and induced-drift state. |
specs/026-unplaced-finding-drift/pr-body.md |
Prepared PR body text summarizing motivation, mechanism, gates, and scope. |
specs/026-unplaced-finding-drift/checklists/requirements.md |
Requirements/spec-quality checklist for the feature artifacts. |
specs/026-unplaced-finding-drift/evidence/test-counts.md |
Records before/after test counts and identifies new tests added by the feature. |
specs/026-unplaced-finding-drift/evidence/self-gate.md |
Records the predicted/observed self-gate movement (single-line diff expectation). |
specs/026-unplaced-finding-drift/evidence/self-gate-before.txt |
Captures the pre-change report output used for the self-gate diff. |
specs/026-unplaced-finding-drift/evidence/self-gate-after.txt |
Captures the post-change report output used for the self-gate diff. |
specs/026-unplaced-finding-drift/evidence/scope-diff.md |
Evidence that .github/ and openspec/ are untouched and only the intended surface changed. |
specs/026-unplaced-finding-drift/evidence/red-log.md |
Evidence that behavioral tests were observed failing (red) prior to module changes. |
specs/026-unplaced-finding-drift/evidence/mutation-round.md |
Mutation log showing mutants applied/killed and why; documents verification of load-bearing behaviors. |
specs/026-unplaced-finding-drift/evidence/ci-shape.md |
Evidence that the suite passes in a clean extraction shape and failures are environment/history dependent. |
Suppressed comments (1)
specs/026-unplaced-finding-drift/evidence/mutation-round.md:171
- This paragraph is duplicated (with conflicting “all four rounds” vs “all three rounds”), which undermines the accuracy of the evidence note. Keep a single copy (the first one already matches the four-round structure above).
**The amendment moved no run's output.** It changes how unplaced findings GROUP,
and there are none wherever the map is complete — which is every run today. That
is why the movement diff has been exactly one line across all four rounds.
**The amendment moved no run's output.** It changes how unplaced findings GROUP,
and there are none wherever the map is complete — which is every run today. That
is why the movement diff is unchanged at one line across all three rounds.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| MODULE BYTE-IDENTICAL to pre-mutation state | ||
| ``` | ||
|
|
||
| ## Round 4 (2026-08-28, after the re-check): 16 applied, **16 killed, 0 survivors** |
…ent #461; promoted as one ADDED requirement, 6 scenarios) (#469) Archived on the merge-plus-green rule the packet's § 5.1 declared, and on TWO merges rather than one because this packet was amended mid-flight. Both are ancestors of origin/main, re-verified here with `git merge-base --is-ancestor` rather than read off a pull-request page: PR #461 -> 6d100e5 the DELTA AMENDMENT, "a drift shape is the arm's template with every interpolated field masked" (Brett, 2026-08-28, verbatim "Amend: shape = arm template, all interpolations masked"). It lands FIRST by construction — the realization's spec cites the amended text. PR #466 -> db2442c the realization, Speckit 026-unplaced-finding-drift: the fifth FindingClass, its anchored pattern, the per-shape emit through registered _ArmTemplates, four test files, a behavioural fixture tree, and the amended byte-level report contract. GATE NUMBERS, base db2442c, before -> after the act: pytest tests/doc-health -q 1270 -> 1270 passed, 0 failed openspec validate --all --strict 76 -> 75 passed, 0 failed (24 active + 52 specs -> 23 + 52; -1 exactly as promotion of one change predicts) doc-health --single-repo . 5 critical, 11 error, 41 warning, 11 info, 0 new regressions — BYTE-IDENTICAL either side of the act ... --skip-family modified-block-currency 5 critical, 11 error, 41 warning, 4 info Movement +0 warning / +7 info in both readings, equal to the family's own per-severity counts (--family modified-block-currency -> 0/0/0/7). The family's report block reads scenario-title 0 / carriage ledger 7 / title resolution and ordering 0 / marker defects 0 / unplaced-finding drift 0, and the residual row does not render — the packet predicted the fifth class would move nothing, and the only change in that section is the zero row. Zero findings name any path under the packet, re-measuring § 3.4. PER-REQUIREMENT PROMOTION, verified BEFORE archiving. The delta is ADDED-only: one `## ` section header, no MODIFIED/REMOVED/RENAMED block anywhere, and its one title collides with none of canon's 38. requirement | before | delta | after ------------------------------------------------|--------|-------|------- "A modified-block-currency finding its own class | | | map cannot place is itself a finding" (ADDED) | absent | 6 sc. | 6 sc. the other 38 requirements | — | none | unchanged FILE | 38 req,| — | 39 req, | 173 sc.| | 179 sc. +1 requirement, +6 scenarios. `git diff --stat openspec/specs/doc-health/spec.md` = 73 insertions(+), 0 deletions(-). REMAINDER — the whole document minus the appended requirement, each requirement running from its `### Requirement:` line to the next or to EOF; every `### ` heading in this file is a requirement heading (38 before, 39 after, 0 non-requirement). Slice construction: 139505 == 139505 raw, 139503 == 139503 normalized. The mbc § 8.2 split/join construction: 139505 vs 139504 raw, 139503 == 139503 normalized — that precedent's own N2 artifact reproducing exactly, the join losing one newline only when the dropped chunk is the file's LAST heading. Strongest reading, which only an append admits: canon before is a strict byte PREFIX of canon after, 139505 -> 144975, the whole difference being the 5470-byte appended chunk. NO TEST FELL DUE, and that is a consequence of D1 rather than luck: an ADDED-only packet drew no self-finding and is named by no self-gate subject, so the F3 self-gate and F5's tests read the same corpus after the act as before. Contrast add-modified-block-currency-check's archive, which re-aimed five tests and retired one. The whole report diff across the act is THREE lines and none is a finding: canon words 218169 -> 219088 (+919), governance words 690954 -> 691873 (the same +919 moving from active-change prose into promoted prose), canon share 31.6% -> 31.7%, and the promoted-specs row 160586 -> 161505. RECORDS. Group 2's fifteen boxes are ticked against #466 with a dated discharge pointer at the group head; EIGHT carry a RECONCILED clause rather than a silent tick — § 2.4, § 2.6 and § 2.14 moved by the amendment, and § 2.3, § 2.7, § 2.8, § 2.10 and § 2.15 by defects in the packet that realization found (three-vs-four test files, eight predicted reds that were five, the function rename the roster did not ask for, F2's provenance checker that would not have covered the new tree, the mutant no value comparison can kill, and an unforeseen allowlist pin). § 4 is left OPEN as authored — § 4.2's first nightly with this emit present is the measurement no archive act can supply. § 1.2's veto flag stays open, not-vetoed being neither vetoed nor ruled. `Status: ratified` is unchanged in the archived proposal, and the three moved files are byte-identical to their active originals. add-modified-block-currency-check § 7.2's flip of the scenario-title arm to `error` is untouched and still owed; _DRIFT_SEVERITY exists so that flip cannot drag this class with it. Refs #357 Co-authored-by: brettheap <[email protected]> Co-authored-by: Claude Opus 5 <[email protected]>
Re-measured after origin/main was merged a second time: main landed #463 (the measured-latents filing), #466/#469 (add-unclassified-finding-class realized and archived) and a nightly token fix, adding twenty-one tests between them. tests/doc-health reads 1272 passed / 0 failed on the merged head against 1251 before it — grown by main's twenty-one and by none of this packet's. validate --all --strict moved 77 to 78 for the same reason. The floor is UNMOVED at 5 critical / 7 error / 41 warning / 12 info. Task 4.2b records the conflict and its resolution: #463 added two active-change entries at the head of the OpenSpec Records block where this packet had added one — a pure both-sides-inserted-at-the-head conflict in README.md alone, the self-gate ledger auto-merging cleanly around this packet's row. Resolved by keeping BOTH sides, this entry at the head as the newest arrival and main's two blocks verbatim beneath it. Nothing of main's was dropped, reworded or reordered, and each of the three entries appears exactly once. Co-Authored-By: Claude Fable 5 <[email protected]>
Realizes
add-unclassified-finding-class— one ADDED requirement indoc-health,"A modified-block-currency finding its own class map cannot place is itself a
finding" — as Speckit feature
026-unplaced-finding-drift.What was wrong
classifyis fail-closed: a rule text no pattern of the family's class mapmatches is not absorbed into a neighbouring class, it falls to a named residual
row in the report block. That row is prose. It has no severity, so no
--fail-onconfiguration reaches it; it is not a finding, sodoc-health's ownhealth-report contract — "every finding MUST appear in the ranked plan as an
actionable item" — does not reach it either. A session working a report's ranked
plan never sees it. And the thing it reports is a defect in this capability's
own tooling: the family emits a finding for a MODIFIED block that drifted from
canon by one clause, and stays silent when its own rule text drifts from its own
map.
What this does
A nonzero residual now emits ONE
warningper distinct unplaced rule shape perrun — naming that shape's count, quoting the first instance's rule text
verbatim, and carrying its repository and delta path — placed by the map itself
into a FIFTH class,
unplaced-finding drift, so it is never counted by theresidual it reports. The residual row keeps rendering beside it; the tally still
sums to the rows; the family stays advisory and stays out of
FAMILY_RESOLUTION.The mechanism, in three sentences
Each arm's rule text renders through one registered
_ArmTemplate, so thefamily's fixed prose has exactly one definition and the arm that prints it
cannot drift from the mask that reads it.
_shapethen runs two steps whoseorder is load-bearing: mask every
repr-emitted span with a left-to-rightconsumer (a quote opens a span only at the start or after a non-alphanumeric),
then match the registered templates first-match-wins, the shape being the
matched template's id. A rule text no template claims falls back to the lexical
mask rather than being merged into a neighbouring template — fail-closed — and
no field was added to
Finding.Precondition, landed
PR #461 (
6d100e51) is onmainand is this PR's merge base. It amends thepacket's delta on Brett's ruling of 2026-08-28, verbatim "Amend: shape = arm
template, all interpolations masked": shape identity became "equal after EVERY
FIELD THE ARM'S TEMPLATE INTERPOLATES has been replaced by a fixed placeholder …
so that one shape is one template and one remedy", with the family required to
derive that mask from its own arm templates. This feature's
spec.md,data-model.mdandcontracts/cite the amended text.The grain, measured before and after the amendment
A drop of a different class pattern exercises a different arm, so each row
names the pattern dropped:
carriage-ledger-two-writerstitle-resolution-markerscarriage-ledger-unplaced(this feature's fixture)carriage-ledgerUnder the rule as first ratified, every UNQUOTED interpolation was
shape-bearing — the promoted spec's path, the
[body]/[bullet]unit-kindlist, a change-id list, an unresolved block's
whyclause — so one dropped mapentry reported SIX remedies where ONE was owed. This feature shipped that
faithfully, measured it, declined to widen it unilaterally because the delta's
third scenario pinned it, and put the amendment up.
test_the_drift_grain_is_one_finding_per_arm_templateholds the real-tree rowagainst an independently written mask and an independently typed set of
per-template probes.
Predicted movement: ZERO, and the diff says so
The class map is complete on this tree, so the fifth class reads
0. Before andafter, both taken as clean
git archiveextractions of the merge base and ofthis branch, over a FULL report:
One line, and it is the new class row reading zero. The headline is
0 critical, 0 error, 0 warning, 7 infoon both sides; no other family section,no ranked-plan row, no census figure moves.
Gates
python3 -m pytest tests/doc-health -qOPENSPEC_TELEMETRY=0 openspec validate --all --strictgit diff --stat <merge-base> -- .github/ openspec/Mutation: 16 applied across four rounds, 16 killed, 0 survivors. Four of them
survived a first attempt and each exposed a real gap — an adversarial title one
clause too short to reach the anchor; a fixture whose emission order and report
order agreed, so "the first of its shape in report order" could not fail; an
adversarial pin built in the wrong direction, passing by luck of the registry
order; and
_ArmTemplate.matchesrelying onre.matchwith no^, unseeablebecause the shipping path never shapes a drift finding. All four are now pinned,
and each pin carries a guard that fails if it ever stops biting.
Scope
.github/andopenspec/diffs against the merge base are empty: noworkflow file, and the packet's own task boxes tick at its archive act, which is
a separate later commit following this merge. Nothing else moves — no other
family, no
report.py, nofamilies.py, noFindingfield, no registry, nothreshold.
specs/022-modified-block-currency-reporting/contracts/report-section.mdis amended at all four of its class-enumeration sites and gains a § 5b for the
template registry and the mask, because a fifth class landing without that would
leave the corpus carrying a byte-level contract false about the code it
describes — which is the defect this family exists to catch.
Reviewing
Start at
specs/026-unplaced-finding-drift/plan.md§ OPEN-1 (RULED ANDIMPLEMENTED) for the mechanism and the measurement, then
evidence/— theself-gate pair,
red-log.md(every behaviour seen to fail before the modulemoved),
mutation-round.md(all four rounds, survivors and what they exposed),ci-shape.mdandscope-diff.md.Refs #357
🤖 Generated with Claude Code