Skip to content

Speckit F2: the modified-block-currency regression catalogue — #351 and #329 reconstructed from history, nine audit gaps closed, no behaviour added - #426

Merged
brettheap merged 9 commits into
mainfrom
020-modified-block-currency-fixtures
Aug 27, 2026
Merged

brettheap merged 9 commits into
mainfrom
020-modified-block-currency-fixtures

Conversation

@brettheap

Copy link
Copy Markdown
Contributor

Speckit F2: the modified-block-currency regression catalogue

F2 of four realizing the ratified change add-modified-block-currency-check
— its § 3, items 3.1–3.13, and nothing else. F1 is on main at 19e3f6b5.

No behaviour is added to any module.
git diff --stat $(git merge-base HEAD origin/main) -- scripts/ openspec/ .github/
is empty. Use the merge-base, never origin/main itself: that branch
advances independently, and diffing against its tip today reports its own
progress as 13 files and 2,443 deletions this feature never made.

What this is

F1's implementation review found that F1 already realizes every scenario of the
ratified delta with a test. So F2 is an audit first, then the gaps:

  1. contracts/coverage-audit.md maps all fourteen § 3 items across
    18 rows to the F1 test functions that discharge them — taken from the
    LANDED test file, not from F1's plan, its hand-off, or its spec § Out of
    Scope, which disagree with each other.
  2. The nine non-satisfied rows are closed, RED-first, with a two-stage RED
    per fixture: the test errors with no fixture, then the built fixture is
    PERTURBED in the one way that matters and the test must fail on its
    assertion.

Audit result: 8 satisfied · 1 satisfied-extended · 6 partial · 3 gapped.
The eight satisfied rows gained no test — that is the point of auditing first.

The audit's closing table — all nine non-satisfied rows closed

row § 3 verdict at audit time closed by fixture tree
A1 3.1 gapped T010–T016, T022 …-history-351, reconstructed @ bcfc26a0
A2 3.2 gapped T017–T022 …-history-329, reconstructed @ d5f447e8
A3 3.3 gapped — the one true hole T027–T032 …-merge-gut
A5 3.4 partial T033 + T014 — / …-history-351
A6 3.5 partial T034–T037a …-tokens
A7 3.6 partial T038–T040 …-rewrap
A10 3.7(c) partial T043c — (reads the ratified packet's own delta)
A11 3.7(d) partial T041–T043 …-fence
A15 3.10 partial T043a–T043b …-name-order
A18 3.13 satisfied, extended T049 all thirteen trees

Satisfied, untouched: A4, A8, A9, A12, A13, A14, A16, A17.

The two reconstructions are real text, and the tests prove it

test_the_reconstructed_fixtures_are_the_history_they_claim re-derives both
from git rather than trusting the files — the delta byte-for-byte, canon scoped
to the requirement section — telling a shallow clone (skip) apart from a
disagreement (fail) with git rev-parse --is-shallow-repository, exactly as
test_ideation_readiness.py does. CI checks out at fetch-depth: 0.

The other five trees are SYNTHESIZED and each says so on line 3 of its
README.md, because this corpus carries no instance of their shapes.

The #329 tree is deliberately stale doc-health text and its README says so:
a whole-family sweep over it would draw 3 family-enumeration warnings (its
restatement says "nineteen"; 22 are registered). Inert today — nothing sweeps
fixture trees — and refreshing that text would destroy the instance.

The mutation round found two tests that asserted nothing

Thirty perturbations, each with a named test that must fail. Two survived the
first pass, and both were genuinely weak:

  • Add canonical reference examples #15 stripped the backticks from contract-v1.45 in BOTH canon and the
    block. test_no_unit_boundary_falls_inside_a_versioned_token survived,
    because it only asserted the token was ABSENT from the ledger — and when a
    sentence boundary moves on both sides at once the halves still match, nothing
    is reported, and the negative holds. A negative cannot see a symmetric
    break.
    The test now asserts positively on canon's own derivation.
  • Propose lifecycle NotebookLM hybrid imports #29 dropped the kinds filter from the U-class helper. Every U-class test
    survived, because each re-filters by kind afterwards, so the helper's own
    contract was asserted nowhere. Added
    test_the_u_class_helper_reads_the_same_set_as_the_ledger_arm, which parses
    the arm's OWN numerator and denominator out of the finding it emits.

Final: 28 of 30 killed, 0 survivors (2 rows N/A — pure test-body assertions
with no fixture to perturb, recorded as N/A rather than counted as kills). The
reviewer's independent re-run killed 10 of 10.

Mutants #26, #27 and #30 edit the module deliberately, to prove the determinism,
severity-band and scope-guard tests are load-bearing. Each is reverted in the
same working step; none is committed.

No module defect was found

T053: nothing fired. Every one of the nine closed rows was exercised against
F1's landed implementation and every arm behaved as the ratified delta states.
The scope of that claim is written down rather than implied: both carriage arms
on real historical text; marker suppression in all three branches of its
resolution; the Merged into titles-only rule; the fence rule in both
directions; basis substitution under a declaration; the sentence mask on three
token shapes; whitespace normalization over a fully re-wrapped block;
skip-vs-quiet; determinism and the advisory band over all thirteen trees.

What was found instead is F1 documentation residue — five items, none a
behaviour defect — appended to
specs/019-modified-block-currency-family/tasks.md § "Residue found by F2",
which is where F1's owner reads. No issue filed.

Two of this feature's own verdicts were wrong

Recorded rather than smoothed over, because a wrong satisfied is this
feature's worst failure mode and it happened twice:

  • A15 was satisfied and is not. F1's cited
    test_no_date_folder_or_created_field_decides_the_ordering concedes in its
    OWN docstring that its fixture "sorts BEFORE … by name and by any date a
    fixture could carry, and the declaration points the same way", so it
    cannot be the discriminating test § 3.10 asks for. Its structural fallback
    forbids date readers and forbids nothing about ordering by folder or
    change-id name — which the delta prohibits in the same breath. A build sorting
    the ratified group by b.change passes every F1 test. The new …-name-order
    tree fixes that: add-zz-first DECLARES and is therefore the later writer
    while sorting LAST by name, so the finding lands on its path and names
    add-aa-second's delta as the basis. Under name-ascending ordering the
    roles invert and the test fails.
  • A10 was satisfied on a claim no test made — "the anchor is asserted
    against this packet's OWN delta prose". F1 asserts it over text written inside
    its own test bodies, and the packet sets its two templates out as -
    BULLETS, which are carriage units the fenced-block exemption never reaches.

Both were caught by re-reading the cited test bodies rather than their
names, which is now T059 step 1.

The honest limit, stated because it cannot be fixed: the eight remaining
satisfied verdicts rest on a human reading of F1's test bodies.
test_no_audit_row_cites_a_test_that_does_not_exist mechanizes only the
citation; T059 step 1 mechanizes only the discipline of re-reading. If one of
those eight is wrong, this change ships a hole it believes it closed.
The
mitigation is that F1's own hand-off, F1's mutation round, and two independent
reads of the landed file agree on all eight.

One task expectation was wrong, and is corrected rather than worked around

tasks.md T042 predicted that a single-backtick marker naming a fragment would
ALSO be reported as a marker defect. It is not, and should not be — the
delta reports a marker only where it names a unit the block still carries; a
name matching no canon unit declares nothing and is silent, per
suppression()'s documented three-way resolution. The module is right; the task
was wrong. The test asserts the correct behaviour and the fence README.md
explains why.

The audit reads itself

Three tests open contracts/coverage-audit.md and fail on it: every backticked
test_* name it cites must be defined (with a floor of thirty harvested names,
so a regex matching nothing cannot pass); all fourteen § 3 items must appear in
the § 3 item column with exactly one bolded verdict per row and the four
tallies matching the row bodies; and every T0NN in the last column must exist
in tasks.md. That third test exists because this audit shipped, once, citing a
whole superseded task numbering after tasks were renumbered.

Evidence

gate before after
python3 -m pytest tests/doc-health -q 1077 passed 1115 passed (+38)
OPENSPEC_TELEMETRY=0 openspec validate --all --strict 75 passed / 0 failed 75 passed / 0 failed — unchanged
git diff --stat $(git merge-base HEAD origin/main) -- scripts/ openspec/ .github/ — empty
mutation round — 28/30 killed, 0 survivors; reviewer's re-run 10/10
test_family_enumeration + F1's own file + scan-set — 138 passed, unchanged

38 tests in one new file, 7 new fixture trees (2 reconstructed, 5
synthesized), 66/66 tasks complete, zero lines of production code.

The whole-tree pytest tests is deliberately NOT run: it needs a live Postgres
this worktree has no access to, and a red there would say nothing about this
feature.

What this change does NOT do

  • It does not close promotion-fidelity blind spot: scenarios LOST from a promoted spec are invisible, because the family only compares delta to spec #330. The post-archive safety net (packet § 7.1) is
    recorded, not built: it needs a third measurement basis inside a family whose
    promoted requirement obliges it to declare which of TWO it measured.
  • It proposes no severity flip (packet § 7.2). _LAUNCH_SEVERITY is
    untouched and the family stays absent from FAMILY_RESOLUTION.
  • It does not touch the report section, the action line or the workflow pin
    (packet § 5 — F4), nor the self-gate against this repository (§ 4 — F3).
  • It changes no promoted spec, no delta, and nothing under scripts/.

Refs #357 #329 #330

🤖 Generated with Claude Code

brettheap and others added 9 commits August 27, 2026 10:45
…t, then six gaps

`add-modified-block-currency-check` § 3 (3.1-3.13) is this feature's whole
scope. F1's implementation review found F1 already realizes every scenario of
the ratified delta with a test, so F2 is an AUDIT of those 97 tests against
§ 3 item by item, plus RED-first tests for what the audit finds gapped — and
no behaviour added to the module.

The two histories § 3.1 and § 3.2 ask for were VERIFIED RECOVERABLE before
this spec was written, and both reconstructions were run through the family:

- #351 — `add-doxchat-model-intake`'s pre-repair block and the canon of
  2026-08-25, both at bcfc26a (parent of the repair f68261f, merged
  87d0b95 / PR #358). The scenario arm names exactly `The menu offers a
  routing rule` and `A fourth provider verb is proposed`; the ledger carries
  the repair commit's clauses, the reverted `every loaded editor` line, and
  canon's badges bullet — which the block's replacement contains verbatim as
  a strict prefix, the REAL instance of the widening mechanism.
- #329 — `add-release-inventory-drift-check`'s pre-archive delta and canon,
  both at d5f447e (parent of the archive 38b548d, merged b03b999 /
  PR #331). One of eight scenarios restated, seven brought by its own ADDED
  requirement, file-level count flat at eight on both sides, seven titles
  named.

Nothing needs synthesizing for 3.1 or 3.2. Zero [NEEDS CLARIFICATION]: every
candidate ambiguity is settled by the packet, the delta, an orchestrator
decision or measured evidence, and each is recorded in Assumptions A1-A9 with
what settles it. A1 and A2 are the two that shape every assertion — the
human's "six clauses" live inside THREE normative sentence units, and the
rendered ledger truncates each unit, so full clause text is asserted on the
units the comparison returns rather than on the rendered string.

Co-Authored-By: Claude Opus 5 <[email protected]>
…vered before the plan was written

`contracts/coverage-audit.md` is the deliverable of this phase and the single
home for the § 3 -> F1-test mapping. Taken from the LANDED test file, not from
F1's plan, its hand-off, or its spec's Out of Scope, all three of which
disagree about what F1 covers (research R10; the hand-off wins, being later
and consistent with decision D4).

18 rows for 14 items — § 3.7 carries eleven distinct obligations and needs
five of them. 10 satisfied, 1 satisfied-and-extended, 4 partial, 3 gapped.
Six new fixture trees and two unit-level assertions close the seven
non-satisfied rows.

Measured, not assumed (research R2), by building both reconstructions and
calling the family on them:

- fixture A (#351 @ bcfc26a): 2 findings. One `warning` naming exactly
  `The menu offers a routing rule` and `A fourth provider verb is proposed`;
  one `info` listing 11 of canon's 25 units — 3 body sentences carrying the
  repair commit's five body clauses, the reverted `every loaded editor` line,
  the drifted hosted-plane line, and canon's badges bullet, which the block's
  replacement contains as a STRICT PREFIX. That last is § 3.4's mechanism in
  the real history, and F1 had no end-to-end case for it.
- fixture B (#329 @ d5f447e): 2 findings. One `warning` naming all seven
  omitted titles; one `info` listing 17 of 28 units. Canon 8 scenarios, delta
  FILE 8 scenarios, fires anyway.

Two readings that shape every assertion, both promoted to research items
rather than left to the implementer: § 3.1's "six body clauses" are five
human-named clauses lying inside THREE normative sentence units (R3), and the
ledger truncates each unit at 140 characters, so full clause text is asserted
on the units the comparison returns and the rendered finding is asserted on
its quoted prefixes (R4). `data-model.md` § 4 makes that the U/F assertion
discipline every test obeys.

Four decisions taken here and flagged for veto beside the five given: O1 one
new test file rather than growing F1's 1400-line one; O2 the re-spelled
finding classifiers pinned by a PARTITION invariant instead of a cross-file
import; O3 a reconstruction freezes the REQUIREMENT verbatim, not the 279 KB
file; O4 the delta side is copied WHOLE, because § 3.2's flat count lives in
its ADDED section.

Constitution gate IV caught one real violation while running: quickstart.md
carried a host-absolute worktree path. Rewritten repo-relative.

Co-Authored-By: Claude Opus 5 <[email protected]>
… the assertions that carry the feature

RED-first is the point of this feature, so the convention is written down
rather than assumed. A fixture test written before its fixture fails by ERROR,
which proves nothing about the assertion — so the rows that carry the feature
use a two-stage RED: stage 1 the test errors with no fixture; stage 2 the
fixture is built and then PERTURBED in the one way that matters (the omitted
scenario restored, the widened bullet replaced by canon's, the gutted merge
bullets carried, the note's third sentence un-edited, a re-wrapped paragraph
altered) and the test must fail on its ASSERTION. T058's mutation round
re-runs every stage 2 mechanically.

Two tasks record honestly that they have NO pre-state RED — T033's containment
widenings and T051's scope snapshot are green the moment they are written, so
their evidence is the mutation round and the task says so instead of claiming
a RED that did not happen.

Phase order follows the audit's severity rather than § 3's numbering: US1 the
two reconstructions (MVP, and a legitimate terminal state), US2 the audit
(independent of every fixture, so it can go first if the reconstructions
stall), US3 the merge-gut — the one TRUE hole, where a refactor could silently
permit an undeclared bullet deletion — then US4's four narrowings, then US5.

T053 is an OPEN DEFECT SLOT, per orchestrator decision D1: if a fixture found
the family behaving other than the ratified delta states, it gets its own task,
its own RED and its own PR line as a defect, never a fixture adjustment. If
nothing fired the task says so and says what was checked.

T052 makes D1 mechanically checkable — `git diff --stat origin/main --
scripts/ openspec/ .github/` must be empty — and T002 blocks everything on the
base still being unmoved, because an audit of a file that has since moved is
worse than no audit.

Co-Authored-By: Claude Opus 5 <[email protected]>
…uide validated nothing

The pass earned its keep on F1. Four of `quickstart.md`'s `-k` selectors were
written on TREE names — `history_351`, `history_329`, `merge_gut`,
`containment` — none of which appears in any test name tasks.md writes. Every
one of those commands would have selected zero tests and exited 5, so the guide's
three most important steps validated nothing. Selectors rewritten against the
real names, and T056 now checks that each picks a non-zero count.

F2 is the defect this repo keeps paying for, caught in its own plan: plan.md
carried a second inventory of test NAMES, five already drifted from tasks.md's
spelling and four tasks.md tests missing from it. The inventory is deleted;
tasks.md is the one home for the figure (62 tasks, 29 [TEST], 30 functions).

F4 is the one that mattered most for correctness. FR-002 and FR-008 were
carried only by T059's prose, and FR-002's other half — that a `satisfied`
verdict is ACTUALLY satisfied — was checked by nothing: T024 proves a cited
test name exists, not that it asserts what the row claims. T059 is now four
numbered concrete steps, including a spot-check of every one of the ten
`satisfied` rows against the cited test body, and FR-008's count check as a
literal grep with a declared exception list.

F6: T037's "RED stage 2" asserted that a test STILL PASSES, which is not a RED.
It conflated two properties — the mask governs where units END, and says
nothing about whether two units are equal. T034 and T036 each get a real stage
2 (strip the backticks from `contract-v1.45`; un-edit the note's third
sentence), and the conflated property becomes T037a.

F3 and F5 are small: US2's acceptance covered `gapped` but not `partial`
although four rows are partial, and T022 left `<repo root>` unexpanded.

Recorded and NOT fixed, because it cannot be: the audit's ten `satisfied`
verdicts rest on a human reading of F1's test bodies. If one is wrong, this
feature ships a hole it believes it closed. plan.md says so in those words.

Also recorded: origin/main advanced nine commits since the 19e3f6b branch
point, and the diff over every audit input is EMPTY, so the base holds. Not
rebased. T002 re-runs that diff before any other task.

Suite unchanged at 1077 — nothing is implemented this round, by instruction.

Co-Authored-By: Claude Opus 5 <[email protected]>
… I quoted a hedge the packet does not contain

Seven blockers and sixteen nits from the coordinator's plan review, all applied.
Two of them are findings against this feature's own audit, and both are the
exact failure its closing note predicted — a row citing a test whose NAME
matched the obligation and whose BODY did not discharge it.

B6 — A15 (§ 3.10) re-verdicted `partial`. F1's cited
test_no_date_folder_or_created_field_decides_the_ordering says in its OWN
docstring that its fixture "sorts BEFORE … by name and by any date a fixture
could carry, and the declaration points the same way", so it cannot be the test
§ 3.10 asks for; its structural grep forbids date readers and forbids NOTHING
about folder or change-id name, which the delta prohibits in the same breath.
A build sorting the ratified group by b.change passes every F1 test. New tree
`modified-block-currency-name-order` + T043a/T043b: `add-zz-first` is the
DECLARER and therefore the later writer, so it sorts LAST by name and the test
fails under name-ascending ordering. Test-only.

N8 — A10 (§ 3.7c) re-verdicted `partial`. Its cell claimed "the anchor is
asserted against this packet's OWN delta prose" and nothing was: F1's
fenced-example test asserts over a fenced block written in its own test body,
and the packet sets its two templates out as `- ` BULLETS, which are carriage
units the fenced exemption never reaches. T043c reads the real file.

B4 — research.md and plan.md QUOTED § 3.2 as hedging "reconstruct … if
recoverable, else synthesize faithfully and say so". grep over the ratified
packet finds no such words; the phrasing came from the session brief. Removed
everywhere, attributed to decision D2 where it lives, and T021 reworded so the
fixture README states the true history positively — caught pre-commit,
rewritten inside archive commit 38b548d, recoverable at its parent d5f447e —
instead of denying a revert no ratified document asserted.

B7 — measured the classifier collision rather than assuming O2 worked: the
obvious key `"declaration"` matches 3 findings across TWO classes (one marker
defect, both blocks of the mutual-declaration pair). T008 now names five keys,
each a fragment of one arm's f-string, verified to partition all 24 findings
over the eight trees with none in two classes and none in zero.

B3 — ten tests had no stage-2 perturbation and T058's prose list never reached
them. T011's evidence line now names five perturbations for five tests, and
T058 is a 30-row table: perturbation, test that MUST fail. Rows 27 and 30 touch
scripts/ and say so — applied in the working step, never committed.

B1 — the audit cited a whole superseded task numbering after tasks were
renumbered. Every last-column id re-mapped and verified to exist; T023 now
checks task-id VALIDITY and the verdict tallies, not just item coverage.

B2 — T024 and quickstart § 6 harvested `test_[a-z0-9_]+` over the whole audit,
which eats the MODULE basename `test_modified_block_currency` from the prose
path: permanently red, and T004 would have sent the implementer to "fix the
audit" for a defect in the harvester. Backticked spans only, plus a >30 floor
so a regex matching nothing cannot pass.

B5 — the provenance template could not satisfy T044: the SHA sat on line 42 and
line 3 read "Not synthesized". SHA hoisted into line 3; T044's SYNTHESIZED
match is case-sensitive and whole-word; "two lines" vs "three" reconciled.

Nits: real byte sizes (228,041 and 50,505, not "279 KB … comparable"); f68261f
CLAIMS six body clauses and NAMES five, so the five named are what is asserted;
`_units` mirrors the ledger's kind filter (unfiltered gives 24/36 on #329 vs
the ledger's 17/28); T058 not T060 is the mutation round; T037 out of the [TEST]
list; the count-exception list gets ONE home in data-model.md § 4 with T035's
"exactly two body units" added; quickstart § 4 selector reaches T037a and the
new tests; T022 discriminates shallow-vs-disagree with `git rev-parse
--is-shallow-repository` per test_ideation_readiness.py; A12 clause 7's silence
comes from whole-scenario suppression, not from the survivor; T051 drops its
duplicate of F1's FAMILY_NOTES assertion; T049/T050 assert non-empty first; the
nine-commit figure is re-measured at T002 rather than quoted.

N11 — F1's four residues (plus a docstring that undercounts its own fixture)
appended to specs/019-modified-block-currency-family/tasks.md, which is where
F1's owner reads. No issue filed.

Audit now: 18 rows, 8 satisfied / 1 extended / 6 partial / 3 gapped; nine rows
for F2 to close. 66 tasks, 31 [TEST], 32 test functions, seven new trees.

Co-Authored-By: Claude Opus 5 <[email protected]>
…ts killed

The two defects that motivated `add-modified-block-currency-check` can no longer
regress silently. Both fixtures are REAL TEXT recovered from this repository,
not shapes:

- #351 @ bcfc26a (parent of the repair f68261f, merged 87d0b95 / PR #358).
  One `warning` naming exactly `The menu offers a routing rule` and `A fourth
  provider verb is proposed`; one `info` listing 11 of canon's 25 units.
- #329 @ d5f447e (parent of the archive 38b548d, merged b03b999 / PR #331).
  One `warning` naming all seven omitted titles; one `info` listing 17 of 28;
  canon 8 scenarios and delta FILE 8 — flat, and the family fires anyway.

`test_the_reconstructed_fixtures_are_the_history_they_claim` re-derives both
from git rather than trusting the files: the delta side byte-for-byte, the canon
side scoped to the requirement section, with shallow-vs-disagree told apart by
`git rev-parse --is-shallow-repository` per test_ideation_readiness.py.

STAGE-2 RED EVIDENCE — nine perturbations applied, each named test failed, all
reverted; no mutant survived:

  1 restore `The menu offers a routing rule` into the 351 block -> T010 failed
  2 delete the broker-lane sentence from the 351 CANON           -> T012 failed
  3 restore `every loaded editor MUST remain usable`             -> T013 failed
  4 un-widen the 351 badges bullet to canon's verbatim           -> T014 failed
  5 rename the 351 fixture repo dir                              -> T015 failed
  6 corrupt one byte of the 351 delta fixture                    -> T022 failed
  7 restore one omitted scenario into the 329 block              -> T017 failed
  8 add an eighth scenario to the 329 delta FILE                 -> T019 failed
  9 carry canon's `Four of the seventeen` sentence in the block   -> T020 failed

T014 closes audit row A5(b) on the REAL instance: canon's badges bullet is a
strict PREFIX of the block's replacement, and the test checks that prefix
relation in its own body rather than claiming it in a docstring — so a fixture
edit that broke the premise cannot leave the test passing while testing nothing.
That is the packet's § 6.4 residue, the finding PR #358's manual verification
reported, and F1 had no end-to-end case for it.

Phase 2's harness carries decision O2's partition invariant, and it is measured
rather than assumed: `test_the_naive_declaration_key_would_collide` records as
an executable fact that keying the marker class on `"declaration"` reaches the
mutual-declaration ORDERING finding too, so a later session cannot "simplify"
the five keys back into a collision.

`_units` mirrors `_arm_ledger`'s kind filter, without which a U-class assertion
reads 24 of 36 on #329 where the ledger reads 17 of 28.

Suite 1077 -> 1089. The one RED remaining is deliberate:
test_the_tree_enumeration_finds_every_tree requires all seven new trees and
five are still to come.

Co-Authored-By: Claude Opus 5 <[email protected]>
…o tests that asserted nothing

All nine non-satisfied audit rows are closed. Suite 1077 -> 1115.

THE MUTATION ROUND EARNED ITS PLACE. Thirty perturbations; two of them killed
no test, and both were real:

- #15 stripped the backticks from `contract-v1.45` in BOTH canon and the block.
  `test_no_unit_boundary_falls_inside_a_versioned_token` SURVIVED, because it
  only asserted the token was ABSENT from the ledger — and when a boundary moves
  on both sides at once, the two halves still match, nothing is reported, and
  the negative assertion holds. A negative cannot see a symmetric break. The
  test now asserts POSITIVELY on canon's own derivation: each of the three
  tokened sentences is exactly ONE body unit with its whole token inside it.
- #29 dropped the `kinds` filter from `_units`. Every U-class test SURVIVED,
  because each re-filters by kind afterwards. Added
  `test_the_u_class_helper_reads_the_same_set_as_the_ledger_arm`, which parses
  the arm's OWN stated numerator and denominator out of the finding it emits
  ("does not carry N of the M body units") and requires `_units` to agree —
  measured 17 of 28 on #329 where the unfiltered helper gives 24 of 36.

After both fixes: 28 of 30 mutants killed, 0 survivors. The two N/A rows are
pure test-body assertions with no fixture to perturb, and are recorded as N/A
rather than counted as kills.

ROWS CLOSED

- A3 § 3.3, the one TRUE hole — `merge-gut`. A four-bullet scenario merged
  away with two bullets carried: the ledger names exactly the two uncarried,
  the scenario arm is quiet, no marker defect. The companion declares those two
  in a `Removed from canon` marker (one of them cites `openxFactory`, so its
  span needs a longer fence) and goes silent — and the silence is PROVEN caused
  by removing the marker and watching the noise return.
- A5 § 3.4 — prefix and both-ends widening (T033), plus the real #351 instance
  end to end (T014).
- A6 § 3.5 — `tokens`: `.openspec.yaml`, `promotion_fidelity.py` and
  `contract-v1.45` (period between digits, the shape F1 lacked), a three-item
  bullet list, and a FOUR-sentence dated note restated with its THIRD sentence
  amended, reported ONCE.
- A7 § 3.6 — `rewrap`: a complete restatement re-wrapped at varying widths,
  one paragraph mid-sentence and one bullet after its `**THEN**`. Returns [],
  and is shown NOT skipped.
- A10 § 3.7c — the form anchor read off the REAL packet file: its two `- `
  template bullets are not marker-form. This is what the row claimed and
  nothing asserted.
- A11 § 3.7d — `fence`: the same clause named with a double-backtick fence
  (suppresses the whole unit) and with a single backtick (names a fragment,
  suppresses nothing, clause reported). The pair is what makes the rule
  falsifiable.
- A15 § 3.10 — `name-order`: `add-zz-first` DECLARES and is therefore the later
  writer while sorting LAST by name. The finding lands on its path and names
  `add-aa-second`'s DELTA as the basis, so the substitution is visible in the
  finding. Under name-ascending ordering the roles invert and the test fails.
- A18 § 3.13 — determinism over all thirteen trees, non-empty first.

ONE TASK EXPECTATION WAS WRONG AND IS CORRECTED, not worked around: tasks.md
T042 predicted the single-backtick marker would ALSO be reported as a marker
defect. It is not, and should not be — the delta reports a marker only where it
names a unit the block STILL CARRIES; a name matching no canon unit declares
nothing and is silent, per `suppression()`'s three-way resolution. The test
asserts the correct behaviour and the fence README explains why.

NO MODULE CHANGE. `git diff --stat <merge-base> -- scripts/ openspec/ .github/`
is empty. Mutants #26, #27 and #30 edit the module deliberately and are reverted
in the same working step, never committed.

Co-Authored-By: Claude Opus 5 <[email protected]>
…erdicts of my own were wrong

All 66 tasks complete. Suite 1077 -> 1115 (+38). `openspec validate --all
--strict` 75/0, unchanged. Scope diff against the merge-base: empty.

THE AUDIT NOW READS ITSELF. Three tests in the new file open
contracts/coverage-audit.md and fail on it: every backticked test name it cites
must be defined (floor of thirty harvested, so a regex matching nothing cannot
pass); all fourteen § 3 items must appear in the `§ 3 item` column with exactly
one bolded verdict per row and the four tallies matching the row bodies; and
every T0NN in the last column must exist in tasks.md. That third test exists
because this audit shipped once citing a whole superseded task numbering.

Appending the closing ledger broke two of those three immediately — the ledger
cites F2's own tests, and its table repeats the row ids with unbolded verdicts in
a different layout, so the harvest and the row count both went wrong. Fixed by
reading both test files and by selecting main-table rows on the presence of a
BOLDED verdict. A self-check that cannot survive its own file being extended is
not a self-check.

T053 — NOTHING FIRED, and the scope of that claim is written down rather than
implied: the scenario and ledger arms on real historical text; marker
suppression in all three branches of its resolution; the `Merged into`
titles-only rule; the fence rule in both directions; basis substitution under a
declaration; the sentence mask on three token shapes; normalization over a fully
re-wrapped block; skip-vs-quiet; determinism and the advisory band over all
thirteen trees. No module defect. What was found is F1 DOCUMENTATION residue,
already appended to F1's tasks.md.

T059's adversarial pass, run rather than described. Its one finding went the
other way: tasks.md T042 predicted a marker defect the module correctly does not
emit. A name matching no canon unit declares nothing and is silent, per
`suppression()`'s three-way resolution. The task was wrong, the module is right,
and the task is corrected in place rather than the fixture bent to match it.

Also corrected in place: T052 compared against `origin/main`, which had moved 18
commits past this branch's base — so the scope check reported that branch's own
progress as 13 files and 2,443 deletions this feature had supposedly made. It
now uses `$(git merge-base HEAD origin/main)`, and against that it is empty.

The count-exception list in data-model.md § 4 is now the real list, grown by
what implementation actually needed: T024's thirty-name floor, T023's eighteen
rows and four tallies, T043c's exactly-two template bullets, and the comparison
that parses the ledger arm's OWN numerator and denominator out of the finding it
emits. 38 count-shaped lines in the test file, every one on that list.

pr-body.md states plainly what this does NOT do: it does not close #330, and it
proposes no severity flip.

STOPPING HERE. No PR opened.

Co-Authored-By: Claude Opus 5 <[email protected]>
…and the count-exception list did not cover its own file

Six findings from the implementation review, all documentation. No test, fixture
or module byte changed; suite still 1115.

1. Mutation table row 29 named `T012, T020` as killers of "drop the `kinds`
   filter from `_units`". BOTH SURVIVE that mutation — each re-filters by kind
   after calling the helper, which is exactly why the mutant survived its first
   run. The killer is the test the survival forced into existence,
   `test_the_u_class_helper_reads_the_same_set_as_the_ledger_arm`, and only
   that one. The row now says so, and says why.

2. Four sites still diffed against `origin/main` — quickstart.md's two scope
   commands, plan.md's evidence row, and spec.md's SC-010 — while only
   tasks.md and pr-body.md had been corrected to the merge-base. That branch
   advances independently, so its tip reports its own progress as 13 files and
   2,443 deletions this feature never made. All four now use
   `$(git merge-base HEAD origin/main)`, and SC-010 states the reason so the
   next reader does not "simplify" it back.

3. F1's residue header said "Four findings" over five numbered items.

4. The count-exception list was an ENUMERATION of individual assertions, and it
   did not cover its own file: ~20 of the 38 count-shaped lines mapped to no
   row, including `len(holders) == 1` — the assertion that kills mutant #15.
   A list that does not cover the file makes T059 step 2's claim false, and a
   per-line list goes stale on the next test. Reworded to six declared SHAPES:
   per-arm cardinality (the ledger's promoted at-most-one rule), vacuity floors,
   fixture-premise guards, the count that IS the rule, figures parsed out of the
   arm's own finding, and the audit's structural claims. T059 step 2 now points
   at the shapes.

5. The #329 tree is deliberately STALE `doc-health` text, and nothing said so.
   Its canon says "seventeen check families" and its delta restatement says
   "nineteen" while `families.FAMILIES` registers 22 — so a whole-family sweep
   over that tree draws 3 `family-enumeration` warnings (the enumeration
   omitting `duplicate-packet`, `family-enumeration` and
   `modified-block-currency`, plus both numerals). Measured, not assumed. Inert
   today: nothing sweeps fixture trees and
   `test_the_real_corpus_reads_zero_on_both_halves` reads the repository's canon.
   The README now carries the warning AND the instruction not to refresh the
   text — its staleness is the historical fact the fixture exists to freeze.

6. T009's signature was missing the `repo` parameter the helper actually takes.

pr-body.md refreshed to the final numbers: 1115 tests, 75/75 validate, 7 new
trees, 28/30 mutants with 0 survivors plus the reviewer's 10/10, the audit's
closing table, and the honesty note that the eight remaining `satisfied`
verdicts rest on a human reading of F1's test bodies — if one is wrong, this
change ships a hole it believes it closed.

Co-Authored-By: Claude Opus 5 <[email protected]>
Copilot AI lite review requested due to automatic review settings August 27, 2026 16:27

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @brettheap! 👋

Your private repo does not have access to Sourcery.

Please upgrade to continue using Sourcery ✨

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a Speckit F2 “regression-fixture catalogue” for the modified-block-currency doc-health family: a new pytest module plus several new fixture trees (including two git-history reconstructions) and supporting Speckit spec/plan artifacts, explicitly without changing any production behavior.

Changes:

  • Add 7 new tests/doc-health/fixtures/modified-block-currency-* fixture trees (2 reconstructed from git history; 5 synthesized) to cover previously-audited gaps.
  • Add a new pytest module tests/doc-health/test_modified_block_currency_fixtures.py that asserts expected findings over the new fixtures and enforces several catalogue-wide invariants (provenance, determinism, partitioning).
  • Add Speckit feature artifacts under specs/020-modified-block-currency-fixtures/ and append “Residue found by F2” notes to the prior feature’s specs/019-.../tasks.md.

Reviewed changes

Copilot reviewed 42 out of 42 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tests/doc-health/test_modified_block_currency_fixtures.py New pytest suite covering the F2 fixture catalogue and enforcing catalogue invariants.
tests/doc-health/fixtures/modified-block-currency-tokens/README.md Provenance/explanation for the synthesized tokenization fixture.
tests/doc-health/fixtures/modified-block-currency-tokens/tokenFactory/openspec/specs/token-cases/spec.md Synthesized promoted spec content for tokenization edge cases.
tests/doc-health/fixtures/modified-block-currency-tokens/tokenFactory/openspec/changes/add-token-cases/specs/token-cases/spec.md Synthesized MODIFIED delta for tokenization fixture.
tests/doc-health/fixtures/modified-block-currency-tokens/tokenFactory/openspec/changes/add-token-cases/proposal.md Minimal proposal scaffold for tokenization fixture change.
tests/doc-health/fixtures/modified-block-currency-rewrap/README.md Provenance/explanation for the synthesized rewrap fixture.
tests/doc-health/fixtures/modified-block-currency-rewrap/rewrapFactory/openspec/specs/rewrap-cases/spec.md Synthesized promoted spec content for rewrap normalization case.
tests/doc-health/fixtures/modified-block-currency-rewrap/rewrapFactory/openspec/changes/add-rewrap/specs/rewrap-cases/spec.md Synthesized MODIFIED delta that re-wraps all carried content.
tests/doc-health/fixtures/modified-block-currency-rewrap/rewrapFactory/openspec/changes/add-rewrap/proposal.md Minimal proposal scaffold for rewrap fixture change.
tests/doc-health/fixtures/modified-block-currency-name-order/README.md Provenance/explanation for the synthesized declaration-vs-name ordering fixture.
tests/doc-health/fixtures/modified-block-currency-name-order/orderFactory/openspec/specs/name-order/spec.md Synthesized promoted spec content for name-order fixture.
tests/doc-health/fixtures/modified-block-currency-name-order/orderFactory/openspec/changes/add-zz-first/specs/name-order/spec.md Synthesized MODIFIED delta for later writer (declaring) block.
tests/doc-health/fixtures/modified-block-currency-name-order/orderFactory/openspec/changes/add-zz-first/proposal.md Proposal scaffold and declaration rationale for add-zz-first.
tests/doc-health/fixtures/modified-block-currency-name-order/orderFactory/openspec/changes/add-aa-second/specs/name-order/spec.md Synthesized MODIFIED delta for earlier writer block.
tests/doc-health/fixtures/modified-block-currency-name-order/orderFactory/openspec/changes/add-aa-second/proposal.md Minimal proposal scaffold for add-aa-second.
tests/doc-health/fixtures/modified-block-currency-merge-gut/README.md Provenance/explanation for synthesized “merge that guts its source” fixture.
tests/doc-health/fixtures/modified-block-currency-merge-gut/mergeFactory/openspec/specs/merge-gut/spec.md Synthesized promoted spec with 4-bullet scenario to exercise merge title-only rule.
tests/doc-health/fixtures/modified-block-currency-merge-gut/mergeFactory/openspec/changes/add-merge-gut/specs/merge-gut/spec.md Synthesized MODIFIED delta exercising Merged into plus redundant-bullet declarations.
tests/doc-health/fixtures/modified-block-currency-merge-gut/mergeFactory/openspec/changes/add-merge-gut/proposal.md Minimal proposal scaffold for merge-gut fixture change.
tests/doc-health/fixtures/modified-block-currency-history-351/README.md Provenance note for reconstructed #351 fixture (commit SHAs + reproduction commands).
tests/doc-health/fixtures/modified-block-currency-history-351/intakeFactory/openspec/specs/ideation-dashboard/spec.md Reconstructed canon requirement (scoped) for #351 fixture.
tests/doc-health/fixtures/modified-block-currency-history-351/intakeFactory/openspec/changes/add-doxchat-model-intake/specs/ideation-dashboard/spec.md Reconstructed pre-repair delta for #351 fixture.
tests/doc-health/fixtures/modified-block-currency-history-351/intakeFactory/openspec/changes/add-doxchat-model-intake/proposal.md Proposal scaffold for reconstructed #351 change.
tests/doc-health/fixtures/modified-block-currency-history-329/README.md Provenance note for reconstructed #329 fixture (commit SHAs + reproduction commands).
tests/doc-health/fixtures/modified-block-currency-history-329/driftFactory/openspec/specs/doc-health/spec.md Reconstructed canon requirement (scoped) for #329 fixture.
tests/doc-health/fixtures/modified-block-currency-history-329/driftFactory/openspec/changes/add-release-inventory-drift-check/specs/doc-health/spec.md Reconstructed pre-archive delta (including ADDED req) for #329 flat-count case.
tests/doc-health/fixtures/modified-block-currency-history-329/driftFactory/openspec/changes/add-release-inventory-drift-check/proposal.md Proposal scaffold for reconstructed #329 change.
tests/doc-health/fixtures/modified-block-currency-fence/README.md Provenance/explanation for synthesized fence-length vs inner-backtick fixture.
tests/doc-health/fixtures/modified-block-currency-fence/fenceFactory/openspec/specs/fence-cases/spec.md Synthesized promoted spec for fencing cases.
tests/doc-health/fixtures/modified-block-currency-fence/fenceFactory/openspec/changes/add-fence-cases/specs/fence-cases/spec.md Synthesized MODIFIED delta with both correct and incorrect fencing.
tests/doc-health/fixtures/modified-block-currency-fence/fenceFactory/openspec/changes/add-fence-cases/proposal.md Minimal proposal scaffold for fence fixture change.
specs/020-modified-block-currency-fixtures/spec.md Feature spec capturing scope, FRs/SCs, and acceptance criteria for F2.
specs/020-modified-block-currency-fixtures/research.md Research/measurement write-up underpinning fixture and assertion choices.
specs/020-modified-block-currency-fixtures/plan.md Implementation plan describing audit-first approach, tasks, and gates.
specs/020-modified-block-currency-fixtures/tasks.md Task breakdown for building fixtures/tests and producing PR evidence.
specs/020-modified-block-currency-fixtures/data-model.md Data model/invariants for fixtures + provenance + assertion classes.
specs/020-modified-block-currency-fixtures/quickstart.md Validation quickstart for re-deriving reconstructions and running key subsets.
specs/020-modified-block-currency-fixtures/pr-body.md Generated PR body content describing evidence, audit results, and scope.
specs/020-modified-block-currency-fixtures/checklists/requirements.md Spec-quality checklist for the feature artifacts.
specs/020-modified-block-currency-fixtures/contracts/coverage-audit.md Contract for the §3 coverage audit mapping to F1/F2 tests.
specs/020-modified-block-currency-fixtures/contracts/fixture-provenance.md Contract defining required structure/content of each fixture tree README.
specs/019-modified-block-currency-family/tasks.md Appends “Residue found by F2” notes back to the F1 feature’s task file.
Suppressed comments (1)

specs/020-modified-block-currency-fixtures/plan.md:144

  • The “Structure Decision” paragraph says “Six new fixture trees”, but the feature adds seven (including the name-order tree). This should match the actual fixture set to avoid scope confusion.
**Structure Decision.** Six new fixture trees, one new test file, zero
production files. One tree per case rather than additions to F1's trees,

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +45 to +48
| `modified-block-currency-merge-gut` | A3 | 3.3 | `mergeFactory` | `merge-gut` | no — synthesized |
| `modified-block-currency-tokens` | A6 | 3.5 | `tokenFactory` | `token-cases` | no — synthesized |
| `modified-block-currency-rewrap` | A7 | 3.6 | `rewrapFactory` | `rewrap-cases` | no — synthesized |
| `modified-block-currency-fence` | A11 | 3.7(d) | `fenceFactory` | `fence-cases` | no — synthesized |
Comment on lines +21 to +28
**Result, over 18 rows covering 14 items: 10 satisfied, 1 satisfied-and-
extended, 4 partial, 3 gapped.** An item F1 covers gets a row and no second
test.
2. **Six new fixture trees, two unit-level assertions, and one assertion on
fixture A close the seven non-satisfied rows**, RED-first. Row A5 (§ 3.4)
needs no tree of its own: its end-to-end half is fixture A's real
containment instance (T014) and its widened-at-either-end half is two
`carried()`-level assertions (T033). The two
Comment on lines +64 to +72
**Performance Goals**: none stated. The six new trees are small; the suite's
54-second wall time must not materially move

**Constraints**: no change to `scripts/`, `openspec/`, `.github/`,
`report.py`, `runner.py` or thresholds (FR-022, FR-024). Assertions on rule
text and named units, never counts (FR-008). Every test RED-first (FR-025)

**Scale/Scope**: 6 new fixture trees, 1 new test file, 30 new tests, 2
contracts. Zero lines of production code
Comment on lines +154 to +159
| verdict | rows | audit rows, with the § 3 item each covers |
| --- | --- | --- |
| **satisfied** — F1 covers it as § 3 phrases it; F2 adds nothing | 10 | A4 (3.3a), A8 (3.7a), A9 (3.7b), A10 (3.7c), A12 (3.7e–k), A13 (3.8), A14 (3.9), A15 (3.10), A16 (3.11), A17 (3.12) |
| **satisfied, extended** | 1 | A18 (3.13) — satisfied as phrased; F2 extends byte-identity to every tree |
| **partial** — the rule is tested, but narrower or through a helper | 4 | A5 (3.4), A6 (3.5), A7 (3.6), A11 (3.7d) |
| **gapped** — a clause has no test at all | 3 | A1 (3.1), A2 (3.2), A3 (3.3) |
| **A15** | **3.10** — two-writers by declaration: the declaring block missing the sibling's addition fires and carrying it stays quiet; neither declaring fires against both; both declaring fires; a change id inside a longer id buys nothing; an unratified sibling creates NO obligation; and NO date, folder name or commit timestamp is consulted | `test_the_declaring_block_is_measured_against_the_sibling_s_outcome`, `test_the_declaring_block_missing_the_siblings_addition_is_reported_by_the_ledger`, `test_neither_declaring_fires_against_both_blocks`, `test_both_declaring_fires_too`, `test_a_change_id_inside_a_longer_id_declares_nothing`, `test_an_unratified_sibling_creates_no_declaration_obligation`, `test_no_date_folder_or_created_field_decides_the_ordering`, `test_a_group_of_three_writers_with_one_declaration_is_evaluated_over_the_group`, `test_no_basis_is_synthesized_from_a_siblings_added_block` | **partial** | Six of § 3.10's seven clauses have a named test, and two tests go beyond it (the three-writer group; the pin that a sibling's ADDED block never synthesizes a basis, F1's finding B4). **The seventh clause is NOT discharged** (review finding B6). § 3.10 asks for "a test that would pass under declaration ordering and fail under date ordering", and `test_no_date_folder_or_created_field_decides_the_ordering`'s own docstring concedes its fixture cannot be that test: "`add-oc-earlier` sorts BEFORE `add-oc-later` by name and by any date a fixture could carry, **and the declaration points the same way**". It falls back to a structural grep over the module source, whose forbidden patterns cover dates and `created:` but contain **no pattern against ordering by folder name or change-id name** — so a build that sorted the group by name and called the first writer earlier passes every F1 test. **T043a–T043b**: a two-writer pair whose declaration points AGAINST name order |
| **A16** | **3.11** — structural pins on the advisory launch, both halves: `_LAUNCH_SEVERITY` is not `error`, and `"modified-block-currency"` is absent from `FAMILY_RESOLUTION` | `test_the_three_launch_severities_are_named_apart`, `test_the_family_is_absent_from_family_resolution_at_launch` | **satisfied** | Nothing, and **F2 must not write a second copy** — F1's hand-off says so by name. The first test also pins the three severities as separately assignable module attributes, so § 7.2's one-arm flip cannot drag the other two; the second was a mutation-round escape (documented in three places, asserted in none) |
| **A17** | **3.12** — a scope with no `openspec/changes/` reports SKIPPED with its reason; a scope WITH active changes but no MODIFIED block reports nothing and is NOT skipped | `test_a_scope_with_no_changes_directory_skips_with_its_reason`, `test_a_scope_with_active_changes_but_no_modified_block_is_not_skipped` | **satisfied** | Nothing. The two states are asserted apart on two trees (`-noscope`, `-quiet`), which is exactly § 3.12's "cannot run, not found nothing" |
| **A18** | **3.13** — determinism: two runs over one fixture tree produce byte-identical findings, including ordering | `test_two_runs_agree_byte_for_byte` (two-writers tree, comparing `__dict__`s), `test_the_family_returns_its_findings_sorted_severity_first` (ordering over three trees, plus the real-shape property that the one `warning` sorts first) | **satisfied, extended** | Nothing is missing as § 3.13 phrases it. **T049** extends the byte-identity assertion to EVERY tree this family owns, including the six new ones — recorded as an extension, not a gap, because a new fixture is where nondeterminism would enter |
@brettheap
brettheap merged commit 76a2ad2 into main Aug 27, 2026
3 checks passed
brettheap pushed a commit that referenced this pull request Aug 27, 2026
…realized

Ruled at the archive gate, against this session's first instinct to leave the
thirty-two build boxes open with a record of why. A cold reader meeting an
archived change that carries open build boxes reads it as
archived-UNREALIZED, which is a worse record than a tick that names its
evidence.

So every box in groups 2, 3, 4 and 5 is ticked and each group header carries ONE
dated discharge line naming its Spec Kit feature, its pull request and its squash
commit — F1 specs/019-modified-block-currency-family (#420, `19e3f6b5`), F2
specs/020-modified-block-currency-fixtures (#426, `76a2ad27`), F3
specs/021-modified-block-currency-self-gate (#427, `f728d57f`), F4
specs/022-modified-block-currency-reporting (#433, `4def2274`). The per-task
evidence, the RED-first records and the mutation rounds stay where they were
written rather than being copied into the packet.

Six boxes were NOT discharged as written and say so where they stand, ticked
with a `RECONCILED` clause naming the feature decision that disposed each rather
than ticked silently: § 2.1's sibling-outcome basis (F1 plan O10, F3 plan D2 —
the sibling had archived at `f027d3b3`, so the block was written relative to
canon); § 3.2's revert (F2 review finding B4 and plan D2 — no revert exists and
no ratified document claimed one; the truncation was caught pre-commit and
rewritten inside archive commit `38b548d4` itself, so the fixture is
byte-faithful from that commit's parent `d5f447e8`); § 4.1 and § 4.5's `+11 info`
(F3 plan D1 — a figure taken over 23 blocks against a tree carrying 22,
re-measured rather than asserted); § 4.2's sibling basis (F3 plan D2, disposed a
second time by this act); and § 5.2's action line (F4 Phase 0 — already landed
by F1, so realized as a pin, with the singular's imprecision recorded beside
it).

The § 8.1 record's sentence about the unticked groups is replaced by the ruling
and its six exceptions, and the file's authoring preamble is left as written with
a dated archive-state paragraph beside it. § 7 and § 1.2/§ 1.3 are untouched and
stay open with their text.

Gates: `pytest tests/doc-health -q -k "proposal_origin or lifecycle or corpus"`
67 passed, 1142 deselected (the archived tasks.md is corpus);
`openspec validate --all --strict` 75 passed, 0 failed.

Co-Authored-By: Claude Opus 5 <[email protected]>
brettheap added a commit that referenced this pull request Aug 27, 2026
… promoted byte-for-byte (8 → 8 + two ADDED), the check verified its own block

The archive act for `add-modified-block-currency-check`, ratified 2026-08-27 and
realized on `main` by four Speckit features. No behaviour changes: this promotes
two deltas into canon, moves the packet into `openspec/changes/archive/`, and
disposes the five tests the act made fall due.

## Gate (§ 8.1) — merged-plus-green, re-verified from `main`

All four merges re-confirmed ancestors of `origin/main` with
`git merge-base --is-ancestor` (exit 0 on each) rather than read off a PR page:

| feature | merge | what landed |
| --- | --- | --- |
| F1 `019-…-family` | **`19e3f6b5`** (#420) | the family module, three registrations, and § 2.1's own MODIFIED block in the same commit |
| F2 `020-…-fixtures` | **`76a2ad27`** (#426) | the regression catalogue, #351 and #329 reconstructed from history |
| F3 `021-…-self-gate` | **`f728d57f`** (#427) | the self-gate against this repository, by named subject |
| F4 `022-…-reporting` | **`4def2274`** (#433) | the report section, the action-line pin, the workflow-boundary pin |

| gate | before the act | after the act |
| --- | --- | --- |
| `python3 -m pytest tests/doc-health -q` | **1209 passed, 0 failed** | **1209 passed, 0 failed** |
| `OPENSPEC_TELEMETRY=0 openspec validate --all --strict` | **76 passed, 0 failed** (24 active + 52 specs) | **75 passed, 0 failed** (23 active + 52 specs) |
| doc-health single-repo | 5 critical, 7 error, 41 warning, 12 info, 0 new regressions | 5 critical, 7 error, 41 warning, **11** info, 0 new regressions |
| the same run `--skip-family modified-block-currency` | 5 critical, 7 error, 40 warning, 4 info | 5 critical, 7 error, 40 warning, 4 info |
| **movement** | **+1 `warning`, +8 `info`, 0 `error`, 0 `critical`** | **+1 `warning`, +7 `info`, 0 `error`, 0 `critical`** |

The gated bands do not move in either measurement, so a `--fail-on error` run is
unaffected by construction — which is what D3's advisory launch claimed. The
advisory launch is intact in both halves, re-read rather than assumed:
`modified-block-currency` is in `FAMILIES` (22) and `FAMILY_IDS`, and ABSENT
from `FAMILY_RESOLUTION`.

§ 4.5's authored prediction of `+11 info` is **history** — measured at
`9be81a40` over 23 blocks, re-measured 9 then 8 as the corpus moved under it.
The invariant that holds at every figure is that the movement EQUALS the
family's own per-severity counts and that `error`/`critical` do not move.

**The one `info` the act removed is the family's own self-finding**, and its
departure is the promotion working: active MODIFIED blocks examined 22 → 21.

**The whole report diff is seven lines and only two of them are a finding**:
canon words 208551 → 213280 (+4729), governance words 664611 → 669340 (the same
+4729, moving from active-change prose into promoted prose), canon share 31.4% →
31.9%, the promoted-specs row of the per-source table, the headline `info`
12 → 11, the family's class subtotal `carriage ledger: 8` → `7`, and the finding
row plus its ranked-plan row. Nothing new is reported anywhere, by any family.

## § 8.2 — the promotion verified byte-for-byte, per requirement, in both capabilities

A change whose subject is lossy promotion had to prove it did not promote
lossily. Both tables were derived independently of the family and then checked
against what the family itself said.

### `doc-health`

| requirement | canon before | delta | canon after | verdict |
| --- | --- | --- | --- | --- |
| `Deterministic check families` (MODIFIED) | 8 scenarios; 12 body units + 27 scenario bullets = 39 units | 8 scenarios restated; 13 body units + 28 bullets | 8 scenarios | **8 → 8**; titles an identical SET in identical ORDER; 7 of 8 byte-identical bullet for bullet; all 3 dated bold notes byte-identical; exactly SIX differences |
| `Currency of an active change's MODIFIED requirement blocks` (ADDED) | absent | 14 scenarios | 14 scenarios | pure append; the title collides with NONE of canon's 34 |
| the other 33 requirements | — | untouched | unchanged | bytes identical per requirement, and the file order of all 34 pre-existing titles preserved |
| FILE | 34 requirements, 145 scenarios | — | 35 requirements, 159 scenarios | +1 requirement, +14 scenarios |

**The six differences, verbatim.**

1. the total numeral — canon `SHALL implement twenty-one check families` → block `SHALL implement twenty-two check families`
2. the enumeration gains one name — canon `… duplicate packet, and family enumeration.` → block `… duplicate packet, family enumeration, and modified-block currency.`
3. `Four of the twenty-one` → `Four of the twenty-two`
4. `the other seventeen families` → `the other eighteen families`
5. ONE new body sentence: `The modified-block currency family reads ACTIVE CHANGE DELTAS, the promoted SPECS they have not yet replaced, and each active change's own `proposal.md` — the last read only to resolve whether one active writer declares its deltas relative to another, which `release-realization` governs — so it likewise takes neither the governed corpus nor the lifecycle scan set as its document list, and it moves no census, word count, canon-share figure, inventory entry, or catalog record either.`
6. ONE new `AND` bullet in `A run executes the check families` (12 → 13 bullets): `- **AND** modified-block currency MUST compare each active change's `## MODIFIED Requirements` blocks against the promoted requirements they replace as its owning requirement below defines`

Differences 1–2 are ONE canon sentence and 3–4 are ANOTHER, so exactly TWO canon
body units are not carried.

**And that is exactly what the family itself reported against this block — the
check verified its own block.** Before the act it drew ONE `info` against
`openspec/changes/add-modified-block-currency-check/specs/doc-health/spec.md`
reading "does not carry **2 of the 39** body units and scenario bullets", quoting
canon's `twenty-one check families` sentence and canon's `Four of the twenty-one`
sentence — canon's wording, not the block's, which is the correct direction. This
gate's independent derivation agreed unit for unit, 39 for 39.

Scenario-by-scenario, 8 → 8: `A run executes the check families` 12 → 13 bullets
(difference 6; the other twelve byte-identical), and `Lifecycle conformance
checks fire` 2/2, `A register carries staged status` 2/2, `Drift checks fire`
2/2, `Catalog conformance checks fire` 2/2, `Routing conformance checks fire`
2/2, `Origin conformance checks fire` 2/2, `Roster composition is checked across
domains` 3/3 — all seven IDENTICAL.

### `document-lifecycle`

| requirement | canon before | delta | canon after | verdict |
| --- | --- | --- | --- | --- |
| `A MODIFIED requirement block restates the requirement as canon currently states it` (ADDED) | absent | 5 scenarios | 5 scenarios | pure append; the title collides with NONE of canon's 16 |
| the 16 pre-existing requirements | — | untouched | unchanged | bytes identical per requirement, order preserved |
| FILE | 16 requirements, 72 scenarios | — | 17 requirements, 77 scenarios | +1 requirement, +5 scenarios |

The delta carries ONLY an `## ADDED Requirements` section — no MODIFIED, no
REMOVED, no RENAMED — so there is no direction in which it could delete
anything.

### The § 2.1 ordering, resolved by the recorded D5 sequencing

Not "whichever archives first". `add-family-enumeration-check` archived **FIRST**,
at `f027d3b3` (#419) — the precondition D5 priced and that packet's own § 2.5
records paying, because a proposal registering no family cannot lawfully restate
the requirement at twenty-two. Its enumeration was therefore already CANON when
F1 wrote § 2.1's block, so the block was written relative to canon:
`release-realization`'s "declare relative to that change's outcome" discharged by
the outcome having BECOME canon, not by a two-writers basis substitution. Proven,
not reasoned — canon's requirement is byte-IDENTICAL between `f027d3b3` and base
`4def2274` (extracted from both trees and diffed, **0 hunks**), and the only
commit touching the spec since (`49f0c18c`) appended a requirement at the end.
Measured through the ordering arm too: **0** two-MODIFIED pairs, no basis
override, no finding.

### Canon after the act is what the deltas imply and nothing else

`git diff openspec/specs/` → **2 files changed, 404 insertions(+), 5
deletions(-)**. All five deletions are in `doc-health` and all five are
re-wrapped lines of the two numeral sentences plus the one continuation line the
new basis sentence extends; `document-lifecycle` has **zero** deletions. Proven
per requirement and then as a **byte diff of the remainder** — the remainder
being the whole document minus the one MODIFIED requirement and the one appended
requirement, each requirement running from its `### Requirement:` line to the next
one or to EOF. Byte-identical before and after, **raw and again after
trailing-newline normalization**: `doc-health` 88197 vs 88197 raw and 88196 vs
88196 normalized; `document-lifecycle` 48653 vs 48653 raw and 48652 vs 48652.
Preambles identical, no title removed, every pre-existing title still in position,
and both files still ending in a blank line before and after — so no appended
requirement consumed an EOF newline.

> **Review finding N2 is recorded as CONTESTED rather than applied**, per
> `document-lifecycle`'s contested-finding rule. N2 read this equality as holding
> only after trailing-newline normalization, at raw 88343 vs 88342 and 48731 vs
> 48730, the appended requirement having consumed each file's EOF blank line.
> Re-derived at the review: the raw remainders ARE equal, both documents still end
> in a blank line before and after the act, and no remainder definition this gate
> could construct yields 88343 or 48731. Writing a figure this gate cannot
> reproduce into the record of a change whose subject is unverified restatement is
> the one thing this packet exists to prevent, so the definition is made explicit
> and both figures are recorded instead. **N2 is owed a re-derivation or a
> withdrawal.**

## The five tests the act made fall due — four predicted, one not, none deleted

F3's `quickstart.md` § WHEN THE GATE FAILS named this exact day FIRST among the
movements it expected and recorded the disposition: re-aim to the ARCHIVED path
where the family's reader can be pointed there without a module change (a change
of SUBJECT, the family excluding `archive/`), else retire with a dated record —
never delete silently. **No module changed.**

| test | disposition | why |
| --- | --- | --- |
| `_LEDGER_SUBJECTS`' self-finding triple | dropped, **8 → 7**, dated comment | the block promoted, so the family reports nothing against it; verified before deleting the row |
| `_own_block()` → `_archived_block()` | **RE-AIMED** | read at the archived path through `mbc.parse_delta` + `mbc.derive_units`, the two calls `active_blocks` itself makes — the gate still owns no second parser |
| `…own_delta_is_among_the_blocks_the_family_examined` → `…own_block_sits_at_its_archived_path_and_out_of_reach` | **RE-AIMED** | the discovery claim one document over, both directions: readable at the archived path, and no active block from this change or any archived path — pinning the reader's exclusion against the REAL tree for the first time |
| `…own_delta_is_measured_against_canon_and_no_sibling_basis_exists` → `test_the_archived_block_still_resolves_to_canon_and_no_active_writer_holds_it` | **RE-AIMED** | all three claims about the tree as it now stands: basis `openspec/specs/doc-health/spec.md` status `canon`; both packets archived exactly once; no basis override, active writers on the requirement 1 → **0**. Deliberately NOT coupled to canon's TEXT, which moves with every new family |
| `…self_finding_quotes_this_change_s_two_stale_numeral_sentences` → `test_the_self_finding_is_retired_by_the_archive_act` | **RETIRED with a dated record** | the only one that cannot be re-aimed: the others are about DOCUMENTS, this one is about a FINDING, and the family draws findings against ACTIVE deltas only. Manufacturing an archived counterpart would widen the family inside a test instead of inside its module. Two residual assertions replace it — no finding names either path this packet ever had, and the frozen archived block carries the `twenty-two` forms and not the `twenty-one` ones, preserving the DIRECTION claim |
| **the fifth, in F2's file** — `test_the_packets_own_marker_templates_are_not_marker_form` | **RE-AIMED** to `openspec/specs/doc-health/spec.md` | not on F3's list. It read the packet's own ACTIVE delta to prove the two marker TEMPLATE bullets are ordinary carriage units; its docstring argued the strict anchor matters "precisely because these paragraphs promote into canon" — and now they have, so the re-aim is that claim arriving, and what the test reads is the promoted text rather than a prediction about it |

Untouched, and it matters which: the resolver guard, the discovery floor, the
scenario-arm subject, the three zero-read classes, the structural pins on the
advisory launch, the movement pin (stated as a DIFFERENCE against the family's
own counts, so `+1 / +7` needed no edit), and the two-attribute context pin. The
gate's regex set is unchanged — three names joined the `mbc.*` allowlist
(`ActiveBlock`, `derive_units`, `parse_delta`) and not one pattern.

`fam_family_enumeration` now reads canon alone and reads **zero**: no active
change restates the requirement, so `_delta_statements` is empty and its own
re-aimed `test_canon_is_the_statement_under_test` measures canon — `twenty-two`,
22 names, 22 registered, 0 unresolved.

CI-shape run of the self-gate file, outside a worktree (`git archive HEAD | tar
-x` into a bare dir + `git init -q .`), per F3's own lesson: **15 passed**.

## What stays open

- **#330 was closed by hand on 2026-08-27 (16:43Z)** — by `brettheap`, with no
  PR keyword involved. Not reopened. **§ 7.1 stands as the record of what this
  change did NOT build**: shape 1, the post-hoc lost-scenario check, which needs a
  third measurement basis inside a family whose promoted requirement obliges it to
  declare which of TWO it measured. The archived `tasks.md` § 7.1 text is left
  frozen as authored.
- **§ 7.2 — the flip is owed.** Raising the scenario-title arm to `error` plus
  the `contested` classification, moved together in one commit, on a standing
  population of one finding (`add-composed-view-authoring`'s deliberate rename,
  named and never claimed a defect). No flip is proposed for the carriage ledger.
- **§ 7.4 — the domain factories are UNMEASURED.** This change's evidence is
  openxFactory's active changes and a fixture corpus, which is why the launch is
  advisory.
- **§ 1.2 — the five orchestrator decisions were NOT VETOED, which is not the
  same as affirmatively ruled.** The flags stay where they were.
- **Groups 2–5 are TICKED, each group header naming its evidence** — ruled at
  this gate, against this session's first instinct to leave them open with a
  record: an archived change carrying thirty-two open build boxes reads as
  archived-UNREALIZED to a cold reader, which is a worse record than a tick that
  names its evidence. Every box in groups 2, 3, 4 and 5 is ticked, and each group
  header carries ONE dated discharge line:

  > Discharged 2026-08-27 by Speckit F1 = specs/019-modified-block-currency-family (PR #420, squash `19e3f6b5`); per-task evidence, RED-first records and the mutation round live in that feature's tasks.md and evidence.
  > Discharged 2026-08-27 by Speckit F2 = specs/020-modified-block-currency-fixtures (PR #426, squash `76a2ad27`); per-task evidence, RED-first records and the mutation round live in that feature's tasks.md and evidence.
  > Discharged 2026-08-27 by Speckit F3 = specs/021-modified-block-currency-self-gate (PR #427, squash `f728d57f`); per-task evidence, RED-first records and the mutation round live in that feature's tasks.md and evidence.
  > Discharged 2026-08-27 by Speckit F4 = specs/022-modified-block-currency-reporting (PR #433, squash `4def2274`); per-task evidence, RED-first records and the mutation round live in that feature's tasks.md and evidence.

  **Six boxes were not discharged as written and say so where they stand**, each
  ticked with a `RECONCILED` clause naming the feature decision that disposed it
  rather than ticked silently: § 2.1's sibling-outcome basis (F1 plan O10, F3
  plan D2 — the sibling had archived at `f027d3b3`, so the block was written
  relative to canon); § 3.2's revert (F2 review finding B4 + plan D2 — no revert
  exists and no ratified document claimed one; the truncation was caught
  pre-commit and rewritten inside archive commit `38b548d4` itself, so the
  fixture is byte-faithful from that commit's parent `d5f447e8`); § 4.1 and
  § 4.5's `+11 info` (F3 plan D1 — a figure taken over 23 blocks against a tree
  carrying 22, re-measured rather than asserted); § 4.2's sibling basis (F3 plan
  D2, and disposed a second time by this act); and § 5.2's action line (F4 Phase
  0 — already landed by F1, so realized as a PIN, with the singular's
  imprecision recorded beside it). The per-task evidence, RED-first records and
  mutation rounds stay where they were written rather than being copied into the
  packet. **§ 7 and § 1.2/§ 1.3 are untouched.**
- `Status: ratified` is left as it stands in the archived proposal, per
  precedent.

## Scope

`openspec/` (the archive move plus the two promoted specs), `README.md`, and two
test files. **Nothing under `scripts/` or `.github/`** — the module is unchanged,
and F4's pin that no workflow option reaches this family still holds.

Closes #329 — its ask was detection; both instances are disposed and the class is
now detected before an archive rather than at one.

Refs #357 — **`Refs`, not `Closes`, by ruling.** That issue's own remedy asked for
a CONTESTED-class finding. This family launched ADVISORY and absent from
`FAMILY_RESOLUTION`, with § 7.2 owing exactly that flip, so closing #357 now would
mark done a remedy whose stated form is unbuilt.

Refs #330 — closed by hand on 2026-08-27 (16:43Z), not by this change.

**Note on the first commit's message.** `7b36604e` was written before this ruling
and its body still reads the `Closes` keyword for #357. It is already pushed and is not being
rewritten; this body is the authority, and #357 is to stay open. If this PR is
merged by commit messages rather than by this body, #357 must be reopened.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@brettheap
brettheap deleted the 020-modified-block-currency-fixtures branch August 28, 2026 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

promotion-fidelity blind spot: scenarios LOST from a promoted spec are invisible, because the family only compares delta to spec

2 participants