Repository navigation
Build F1+F2 of govern-sibling-added-modified-deltas: pairing and collision classes - #558
Conversation
… marker Realizes `govern-sibling-added-modified-deltas` §§ 2 and 3 in the one module both features touch. They are two separately vetoable features and ONE file, so the code lands in one commit and the fixtures, the tests and the byte-level documents follow in their own. F1 — the `Modified over` marker and the pairing class: * `parse_marker` gains a THIRD reserved form, recognized by a COMPLETE prefix like the other two and for the same stated reason (this packet's own delta text and `document-lifecycle`'s both print the template in prose that promotes). Recognition ENDS AT THE CLOSING COLON: neither the ` — <reason>` tail nor the equality of the `by` identifier to the carrier is a parse condition, because folding either in would drop a plainly-marked block back to the body units and hand its author the absent-marker remedy. * The form NAMES NO UNITS — `names` is empty — so it suppresses nothing, can never reach the marker-defect class, and is a carriage unit in neither direction. The reason is the WHOLE TAIL after ` — `, harvested always, and an absent or whitespace-only tail is a VALUE the classifier reports rather than a parse outcome. * `sibling_titles` returns the adding change, its declared standing (through the module's existing `_standing` path, never a private regex) and whether an ADDITION or a rename's `TO:` half put the title there. The KEYS are unchanged, so `resolve` is untouched and its own-rename precedence still resolves a rename-and-amend block against canon under the OLD name one step earlier. * `if status == "pending": continue` becomes a pairing emit and the SAME `continue`. The three comparison arms still do not run against a pending block and no requirement text is compared anywhere in this path; the 2026-08-27 ruling against synthesising a basis from the sibling's ADDED text is untouched. What changes is that the block is no longer dropped before anything looks at it, so the arms' silence stops reading as clearance. * Four reported states in one ORDERED classification, exactly one per block: the carrier's own ADDITION first (a fact about the delta, not the marker), then the marker COUNT, then the single marker's basis, `by`, REASON and disclosure. The reason precedes the disclosure because the disclosure is a word looked for IN the reason clause. F2 — the ADDED-over-canon collision class: an active `## ADDED Requirements` block, or an active rename's `TO:` half, naming a title canon ALREADY carries. The `FROM:` half is never read. It runs BEFORE the family's `if not blocks` guard, because the repository most likely to hold this evidence is one whose modifying packet has already archived. Registration, per the fifth-class rule: two `_ArmTemplate`s (one each, so the pairing class's four states stay ONE shape and ONE remedy), two `FindingClass` entries INSERTED BEFORE `unplaced` so the gate-bearing arm still reads first and the drift class still reads last, two anchored `_CLASS_PATTERNS` entries, and two severity plus two action constants named apart from `_LAUNCH_SEVERITY` — whose § 7.2 flip at `7f656980` moved it alone, which is the demonstration that separate constants were the right shape. Both classes launch `warning`. Stale numerals swept: FIVE -> SEVEN classes in the docstring enumeration, "FIVE ENTRIES FOR SIX RULE SHAPES" -> "SEVEN ENTRIES FOR EIGHT RULE SHAPES", and the arms-versus-classes counts in `_arm_marker_defects` and `FindingClass`. Co-Authored-By: Claude Fable 5 <[email protected]>
…th carves SYNTHESIZED, and each tree's README carries the table. This corpus carries no instance of most of these shapes, which is itself the reason they are worth pinning before one arrives. `-pairing` (§ 2.9), seventeen change directories over one capability whose canon carries exactly ONE requirement — a title canon carries resolves `canon` and never reaches this check: * undeclared; self-referential with NO marker and again WITH a marker naming the change itself (the exclusivity case: without the ordering, a self-referential block carrying no marker satisfies UNDECLARED too and the run emits two remedies for one defect); * all four misdeclared grounds — a basis that adds nothing, a basis naming the CARRIER itself, a right basis under a WRONG `by` (the false-provenance case, which PASSES on a classifier checking the basis alone), and TWO markers one of which is VALID, asserted to emit exactly ONE finding on the COUNT ground, with its PAIR carrying that same valid marker alone and asserted SILENT; * the reason ground in three fixtures — no separator at all, an EMPTY-REASON TWIN carrying a separator and whitespace, and THE ORDER'S OWN: the same prefix-only marker over an UNRATIFIED basis, asserted misdeclared on the reason ground and NOT undisclosed, which is what a classifier reading the disclosure first fails; * undisclosed over a `draft` basis and over a basis whose proposal declares no standing this reader can resolve; * BOTH silent states — a ratified basis correctly declared, and an unratified one whose reason carries the word the form reserves; * and BOTH sides of the own-rename carve: `mod-rename-amend`, whose one dropped clause proves the comparison arms RAN against canon under the OLD name rather than that the pairing check merely stayed quiet; and `mod-own-rename-unpromoted`, whose rename's `FROM:` half canon does NOT carry, so the precedence never fires and the block is placed by the absence of a marker. That second one was added BY THE MUTATION ROUND: widening the self-addition condition to a carrier's own rename survived every other assertion in the suite, because on every other fixture the precedence hid it. `-collision` (§ 3.4): the unsafe archive order reconstructed in both basis forms — an active ADDED block and an active rename's `TO:` half over titles canon now carries — plus the NEGATIVE control, a lawful rename whose `FROM:` title canon carries and whose `TO:` title it does not. The tree carries NO active MODIFIED block at all, deliberately: that is the repository the family's `if not blocks` guard would have hidden, and it is exactly the repository whose modifying packet has already archived. Co-Authored-By: Claude Fable 5 <[email protected]>
§ 2.10, § 2.11, § 3.3 and the rule assertions for both new classes. THE PINS THAT MOVED, each with its own reason written where it moved: * the class-registry pin — FIVE -> SEVEN ids, and the two new rows INSERTED before `unplaced`, with both new bands read from the module's own constants; * the rule-shapes pin — renamed `..._six_rule_shapes_...` -> `..._eight_...`, because a count in a FUNCTION NAME the code contradicts is the same defect the numeral sweep removes from the prose; * the verbatim class-row list and the `len(block)` pin — 6 -> 8 lines; * the `_ARM_TEMPLATES` count — 6 -> 8; * the FR-023 severity snapshot — the tuple gains both new constants, because its job is to be COMPLETE over the module's severity constants; * `TREE_RESOLUTION` and `TREE_RICH` gain `sibling-pairing`. The second says something the first does not: `add-mo-modifier` DOES name its adder in its own proposal and is still UNDECLARED, so the cross-reference is measurably not the marker; * `test_a_title_pending_on_a_sibling_s_addition_is_quiet` is renamed with the claim it makes. The COMPARISON half of `dh:278-280` is unchanged; the empty list was pinning the DROP rather than the ruling; * the self-gate's scenario-arm pin selected on `severity == WARNING`, which two later acts each falsified WITHOUT reddening it — § 7.2's flip took that arm to `error`, and this packet adds two `warning` classes it would then have started selecting. It now selects on the CLASS, which is what it was always about. THE TWO NEW ZERO ASSERTIONS, EACH WITH A POSITIVE CONTROL, because an empty band is produced by a working check and a broken one alike: * `_PAIRING_SUBJECTS`, a NAMED EXACT SET beside `_LEDGER_SUBJECTS` and under the same movement discipline, comparing with `==`. It LAUNCHES EMPTY, and by D4's route 1 rather than by luck: § 6's sweep landed at `3a6a16e9` (PR #538) and declared three of the four standing pairs, and PR #541 archived the fourth in the SAFE order. Its control reads the tree's own pending blocks through the family's own resolver, asserts each is silent BECAUSE it is declared and resolving, then strips one block's markers and asserts the class reports it UNDECLARED — the state the corpus was in before the sweep. * the collision class reads zero, and its control feeds the corpus's own active additions to the family's own emit against a promoted index that DOES carry one of their titles. AND § 2.8's NEGATIVE, verified first and then KEPT as a test: with each new arm template registered and its `_CLASS_PATTERNS` entry absent, the fifth class fires and QUOTES the new rule text — ONE drift finding for thirteen unplaced pairing findings and ONE for two collision ones, which is also what says the pairing class's four states are one shape and one remedy. `specs/020-.../contracts/coverage-audit.md` row A13 is re-aimed at the renamed test rather than left citing a name that exists nowhere. Co-Authored-By: Claude Fable 5 <[email protected]>
§ 2.12 and § 2.13. Neither is optional: `report-section.md` is BYTE-LEVEL and enumerates the classes FOUR TIMES OVER, and a class landing without amending it would leave the corpus carrying a contract that is false about the code it describes — which is the class of defect the family it describes exists to catch. That reasoning is the 2026-08-28 amendment's own, applied again. `specs/022-.../contracts/report-section.md`: both new rows added to the bullet template, to both worked examples, to the class map and to the action-line table, with the templates registry and the "six templates" sentence moved to eight. `added-over-canon` is the one map entry that cannot use `<TITLED>` and the contract says why — its subject is an ADDED block or a rename's `TO:` half, so it spells its own opening and is anchored to the same DEPTH: from the start of the rule and past the closing quote of the title's `repr`. `docs/doc-health.md`: the family paragraph named three arms, a marker-defect class and a fifth `unplaced` class. It now names both new classes, the canon requirement each realizes, the marker form, and the fact the three comparison arms still do NOT run against a pending block. Co-Authored-By: Claude Fable 5 <[email protected]>
§ 2.1-2.13 and § 3.1-3.4 are built, tested and mutation-proved. § 4.1-4.4 are ticked with their measurements RE-TAKEN at this build rather than copied, and § 4.1's are the ones that moved. **§ 4.1 — 20/16/4 IS HISTORY; THE TREE READS 20/17/3.** Both movements are acts taken after the figure was written, and neither is drift: * PR #541 archived `add-binding-consumer-identity` and `add-notebook-hosting-credential-custody` together on 2026-08-31, in the SAFE order, so that pair left the pending set with the requirement promoted. * § 6's own sweep landed at `3a6a16e9` (PR #538) and the remaining THREE pairs each carry one `Modified over` marker naming a ratified basis that adds the title, under the carrying change's own `by` identifier and with a nonempty reason. So the pairing class launches at a population of ZERO — D4's route 1, PERFORMED — and § 2.11's exact set launches EMPTY with a positive control, which is that task's D4-sequencing branch rather than its fallback. The three markers were written by the sweep and are read back by the parser this build adds, which is the evidence that the form as authored and the form as recognized are one form. § 4.2: both of this packet's own MODIFIED blocks still resolve `canon` and the family names neither delta path; the tree's count moved 7 -> 8 for a reason outside this packet (`add-chain-attestation` landed a MODIFIED block on main). § 4.3: the collision class reads zero across both basis forms, measured through the BUILT class rather than through a spike. § 4.4: no family is registered, so `families.py` is untouched and the enumeration and its numerals are unmoved. NOT TICKED, and deliberately: § 5 is the nightly aggregation read, which happens after this lands; § 6 was already ticked on main by the sweep; § 4.5 and § 4.6 are statements about this packet's own delta design rather than evidence a build produces; § 1.1, § 1.2, § 7 and § 8 are unchanged. Co-Authored-By: Claude Fable 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 ✨
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
Pull request overview
Implements Speckit features F1 (pairing marker + sibling-pairing declaration class) and F2 (added-over-canon collision class) for the ratified govern-sibling-added-modified-deltas packet by extending the modified-block-currency doc-health family, plus adding targeted fixtures and updating the reporting/contracts documentation.
Changes:
- Extend
modified-block-currencywith a third reserved marker form (Modified over ...), a new sibling-pairing finding class for pending blocks, and a new added-over-canon collision finding class. - Add two new fixture trees (
modified-block-currency-pairing,modified-block-currency-collision) and expand/realign tests to cover new classes, ordering, patterns, and self-gate “zero over real tree” assertions. - Update doc-health documentation and report-contract text to reflect the expanded class registry and rendered summary rows.
Reviewed changes
Copilot reviewed 61 out of 61 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/doc-health/test_modified_block_currency.py | Adds/updates unit tests for the pairing marker parsing, pairing states, collision behavior, and updated pending-block expectations. |
| tests/doc-health/test_modified_block_currency_self_gate.py | Updates self-gate assertions to select by class (not severity) and adds new “zero over real tree” coverage with positive controls for the new classes. |
| tests/doc-health/test_modified_block_currency_reporting.py | Updates reporting-contract tests for 7 classes / 8 templates, new summary rows, and drift-negative coverage for the new patterns. |
| tests/doc-health/test_modified_block_currency_fixtures.py | Extends arm/template partition probes with new “pairing” and “collision” keys for fixture-wide partitioning. |
| tests/doc-health/fixtures/modified-block-currency-pairing/README.md | Documents the pairing fixture tree matrix (reported states, silent states, and carve-outs). |
| tests/doc-health/fixtures/modified-block-currency-pairing/alphaFactory/openspec/specs/pair-cap/spec.md | Adds the minimal promoted spec for the pairing fixture tree (including the old-name requirement for the rename carve). |
| tests/doc-health/fixtures/modified-block-currency-pairing/alphaFactory/openspec/changes/mod-wrong-by/specs/pair-cap/spec.md | Pairing fixture: misdeclared by identifier case (delta). |
| tests/doc-health/fixtures/modified-block-currency-pairing/alphaFactory/openspec/changes/mod-wrong-by/proposal.md | Pairing fixture: misdeclared by identifier case (proposal header/standing). |
| tests/doc-health/fixtures/modified-block-currency-pairing/alphaFactory/openspec/changes/mod-wrong-basis/specs/pair-cap/spec.md | Pairing fixture: misdeclared basis case (delta). |
| tests/doc-health/fixtures/modified-block-currency-pairing/alphaFactory/openspec/changes/mod-wrong-basis/proposal.md | Pairing fixture: misdeclared basis case (proposal header/standing). |
| tests/doc-health/fixtures/modified-block-currency-pairing/alphaFactory/openspec/changes/mod-undisclosed/specs/pair-cap/spec.md | Pairing fixture: undisclosed unratified basis (delta). |
| tests/doc-health/fixtures/modified-block-currency-pairing/alphaFactory/openspec/changes/mod-undisclosed/proposal.md | Pairing fixture: undisclosed unratified basis (proposal header/standing). |
| tests/doc-health/fixtures/modified-block-currency-pairing/alphaFactory/openspec/changes/mod-undeclared/specs/pair-cap/spec.md | Pairing fixture: undeclared pairing (no marker) (delta). |
| tests/doc-health/fixtures/modified-block-currency-pairing/alphaFactory/openspec/changes/mod-undeclared/proposal.md | Pairing fixture: undeclared pairing (proposal header/standing). |
| tests/doc-health/fixtures/modified-block-currency-pairing/alphaFactory/openspec/changes/mod-two-markers/specs/pair-cap/spec.md | Pairing fixture: misdeclared marker count (two markers) (delta). |
| tests/doc-health/fixtures/modified-block-currency-pairing/alphaFactory/openspec/changes/mod-two-markers/proposal.md | Pairing fixture: misdeclared marker count (proposal header/standing). |
| tests/doc-health/fixtures/modified-block-currency-pairing/alphaFactory/openspec/changes/mod-self/specs/pair-cap/spec.md | Pairing fixture: self-referential (adds+modifies same title, no marker) (delta). |
| tests/doc-health/fixtures/modified-block-currency-pairing/alphaFactory/openspec/changes/mod-self/proposal.md | Pairing fixture: self-referential (proposal header/standing). |
| tests/doc-health/fixtures/modified-block-currency-pairing/alphaFactory/openspec/changes/mod-self-marked/specs/pair-cap/spec.md | Pairing fixture: self-referential with self-naming marker (delta). |
| tests/doc-health/fixtures/modified-block-currency-pairing/alphaFactory/openspec/changes/mod-self-marked/proposal.md | Pairing fixture: self-referential with marker (proposal header/standing). |
| tests/doc-health/fixtures/modified-block-currency-pairing/alphaFactory/openspec/changes/mod-rename-amend/specs/pair-cap/spec.md | Pairing fixture: rename-and-amend carve-out (delta). |
| tests/doc-health/fixtures/modified-block-currency-pairing/alphaFactory/openspec/changes/mod-rename-amend/proposal.md | Pairing fixture: rename-and-amend carve-out (proposal header/standing). |
| tests/doc-health/fixtures/modified-block-currency-pairing/alphaFactory/openspec/changes/mod-own-rename-unpromoted/specs/pair-cap/spec.md | Pairing fixture: own-rename to pending title where FROM isn’t promoted (delta). |
| tests/doc-health/fixtures/modified-block-currency-pairing/alphaFactory/openspec/changes/mod-own-rename-unpromoted/proposal.md | Pairing fixture: own-rename pending-path explanation (proposal header/standing). |
| tests/doc-health/fixtures/modified-block-currency-pairing/alphaFactory/openspec/changes/mod-one-marker/specs/pair-cap/spec.md | Pairing fixture: silent declared+resolving (single correct marker) (delta). |
| tests/doc-health/fixtures/modified-block-currency-pairing/alphaFactory/openspec/changes/mod-one-marker/proposal.md | Pairing fixture: silent declared+resolving (proposal header/standing). |
| tests/doc-health/fixtures/modified-block-currency-pairing/alphaFactory/openspec/changes/mod-no-reason/specs/pair-cap/spec.md | Pairing fixture: misdeclared missing reason tail (delta). |
| tests/doc-health/fixtures/modified-block-currency-pairing/alphaFactory/openspec/changes/mod-no-reason/proposal.md | Pairing fixture: misdeclared missing reason tail (proposal header/standing). |
| tests/doc-health/fixtures/modified-block-currency-pairing/alphaFactory/openspec/changes/mod-no-reason-unratified/specs/pair-cap/spec.md | Pairing fixture: reason-before-disclosure ordering case over unratified basis (delta). |
| tests/doc-health/fixtures/modified-block-currency-pairing/alphaFactory/openspec/changes/mod-no-reason-unratified/proposal.md | Pairing fixture: reason-before-disclosure ordering case (proposal header/standing). |
| tests/doc-health/fixtures/modified-block-currency-pairing/alphaFactory/openspec/changes/mod-headerless/specs/pair-cap/spec.md | Pairing fixture: undisclosed/headerless standing basis (delta). |
| tests/doc-health/fixtures/modified-block-currency-pairing/alphaFactory/openspec/changes/mod-headerless/proposal.md | Pairing fixture: headerless standing basis (proposal without lifecycle header). |
| tests/doc-health/fixtures/modified-block-currency-pairing/alphaFactory/openspec/changes/mod-empty-reason/specs/pair-cap/spec.md | Pairing fixture: whitespace-only reason tail treated as absent (delta). |
| tests/doc-health/fixtures/modified-block-currency-pairing/alphaFactory/openspec/changes/mod-empty-reason/proposal.md | Pairing fixture: whitespace-only reason tail (proposal header/standing). |
| tests/doc-health/fixtures/modified-block-currency-pairing/alphaFactory/openspec/changes/mod-disclosed/specs/pair-cap/spec.md | Pairing fixture: silent disclosed-unratified basis (delta). |
| tests/doc-health/fixtures/modified-block-currency-pairing/alphaFactory/openspec/changes/mod-disclosed/proposal.md | Pairing fixture: disclosed-unratified basis (proposal header/standing). |
| tests/doc-health/fixtures/modified-block-currency-pairing/alphaFactory/openspec/changes/mod-declared/specs/pair-cap/spec.md | Pairing fixture: silent “declared and resolving” (delta). |
| tests/doc-health/fixtures/modified-block-currency-pairing/alphaFactory/openspec/changes/mod-declared/proposal.md | Pairing fixture: declared-and-resolving rationale (proposal header/standing). |
| tests/doc-health/fixtures/modified-block-currency-pairing/alphaFactory/openspec/changes/mod-carrier-basis/specs/pair-cap/spec.md | Pairing fixture: misdeclared “carrier as basis” (delta). |
| tests/doc-health/fixtures/modified-block-currency-pairing/alphaFactory/openspec/changes/mod-carrier-basis/proposal.md | Pairing fixture: carrier-as-basis explanation (proposal header/standing). |
| tests/doc-health/fixtures/modified-block-currency-pairing/alphaFactory/openspec/changes/add-basis-ratified/specs/pair-cap/spec.md | Pairing fixture: ratified basis adder delta supplying titles for multiple cases. |
| tests/doc-health/fixtures/modified-block-currency-pairing/alphaFactory/openspec/changes/add-basis-ratified/proposal.md | Pairing fixture: ratified basis adder proposal header/standing. |
| tests/doc-health/fixtures/modified-block-currency-pairing/alphaFactory/openspec/changes/add-basis-headerless/specs/pair-cap/spec.md | Pairing fixture: headerless basis adder delta. |
| tests/doc-health/fixtures/modified-block-currency-pairing/alphaFactory/openspec/changes/add-basis-headerless/proposal.md | Pairing fixture: headerless basis adder proposal (no header). |
| tests/doc-health/fixtures/modified-block-currency-pairing/alphaFactory/openspec/changes/add-basis-draft/specs/pair-cap/spec.md | Pairing fixture: draft basis adder delta. |
| tests/doc-health/fixtures/modified-block-currency-pairing/alphaFactory/openspec/changes/add-basis-draft/proposal.md | Pairing fixture: draft basis adder proposal header/standing. |
| tests/doc-health/fixtures/modified-block-currency-collision/README.md | Documents the collision fixture tree and the intended evidence reconstruction. |
| tests/doc-health/fixtures/modified-block-currency-collision/alphaFactory/openspec/specs/coll-cap/spec.md | Adds promoted spec used by collision fixture to represent post-unsafe-order canon. |
| tests/doc-health/fixtures/modified-block-currency-collision/alphaFactory/openspec/changes/rename-the-basis/specs/coll-cap/spec.md | Collision fixture: active rename-to-canon title (RENAMED TO:) (delta). |
| tests/doc-health/fixtures/modified-block-currency-collision/alphaFactory/openspec/changes/rename-the-basis/proposal.md | Collision fixture: rename-to-canon title (proposal header/standing). |
| tests/doc-health/fixtures/modified-block-currency-collision/alphaFactory/openspec/changes/lawful-rename/specs/coll-cap/spec.md | Collision fixture: lawful rename negative control (FROM in canon, TO not). |
| tests/doc-health/fixtures/modified-block-currency-collision/alphaFactory/openspec/changes/lawful-rename/proposal.md | Collision fixture: lawful rename negative control (proposal header/standing). |
| tests/doc-health/fixtures/modified-block-currency-collision/alphaFactory/openspec/changes/archive/2026-08-31-mod-archived-first/specs/coll-cap/spec.md | Collision fixture: archived modifying delta that promoted canon in unsafe order (context-only). |
| tests/doc-health/fixtures/modified-block-currency-collision/alphaFactory/openspec/changes/archive/2026-08-31-mod-archived-first/proposal.md | Collision fixture: archived modifying change proposal (context-only). |
| tests/doc-health/fixtures/modified-block-currency-collision/alphaFactory/openspec/changes/add-the-basis/specs/coll-cap/spec.md | Collision fixture: active ADDED block writing a title canon already carries. |
| tests/doc-health/fixtures/modified-block-currency-collision/alphaFactory/openspec/changes/add-the-basis/proposal.md | Collision fixture: active ADDED block case (proposal header/standing). |
| specs/022-modified-block-currency-reporting/contracts/report-section.md | Updates the report-section contract for 7 classes / 8 templates and insertion-before-drift rule. |
| specs/020-modified-block-currency-fixtures/contracts/coverage-audit.md | Re-aims coverage audit row A13 to reflect new pairing reporting for pending blocks. |
| scripts/doc_health/modified_block_currency.py | Implements the new marker form, pairing/collision finding classes, template/pattern/registry updates, and reordered emission. |
| openspec/changes/govern-sibling-added-modified-deltas/tasks.md | Marks F1/F2 tasks as completed and records re-measured evidence notes. |
| docs/doc-health.md | Updates doc-health family documentation to describe the two new finding classes and the third reserved marker form. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| # ORDERED, and first match wins, exactly as `_CLASS_PATTERNS` is. The order is | ||
| # not load-bearing today — the six are mutually exclusive over masked text and a | ||
| # test says so — but a deterministic order is what makes a future collision a | ||
| # stable wrong answer instead of an unstable one. | ||
| _ARM_TEMPLATES = (TEMPLATE_TITLES, TEMPLATE_LEDGER, TEMPLATE_MARKERS, |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 61 out of 61 changed files in this pull request and generated 2 comments.
Suppressed comments (1)
scripts/doc_health/modified_block_currency.py:1596
- This docstring labels the collision check as “THE SEVENTH FINDING CLASS”, but with the new classes the collision class is the 6th (and drift is 7th). The mismatch makes it harder to reconcile the code with the module docstring/spec references.
"""THE SEVENTH FINDING CLASS — the archive-ordering backstop.
| ``` | ||
|
|
||
| Five class rows plus the residual, summing to the five rows printed beneath — | ||
| Seven class rows plus the residual, summing to the five rows printed beneath — |
| def _arm_pairing(repo: str, block: ActiveBlock, | ||
| siblings: dict[tuple[str, str], list[_SiblingBasis]] | ||
| ) -> list[Finding]: | ||
| """THE SIXTH FINDING CLASS — the PAIRING, and no comparison at all. |
…ed (2026-09-02 nightly), promoted (#571) * Archive govern-sibling-added-modified-deltas: realized (#558), measured (2026-09-02 nightly), promoted The archive act for `govern-sibling-added-modified-deltas`, ratified 2026-08-31 by direct ruling and realized on `main` by one Speckit branch carrying both of its features. No behaviour changes: this promotes three deltas into canon, moves the packet into `openspec/changes/archive/`, ticks the two gate sections that are now true, and repairs the one link the move broke. ## § 8.1 — merged, re-verified from `main` rather than read off a PR page Both landings re-confirmed ancestors of their own `origin/main` with `git merge-base --is-ancestor` (exit 0 on each): | what | merge | landed | | --- | --- | --- | | F1 + F2, in ONE feature branch | **`5af63d91`** (PR #558, 2026-09-01) | the `Modified over` marker form and its pairing class, the added-over-canon collision class, their class-map registrations, and two exact-set self-gate assertions each with its own positive control | | the aggregation re-pin | **`9427a4df`** (xFactory root PR #193, 2026-09-01) | what put the two classes in front of the estate, and what made § 5's read possible | ## § 5 — the population read, from the aggregation and not from a local run `doc-health-nightly` run **33574220723** (`opensoft/xFactory`, head `72562233`, 2026-09-02T00:10:32Z, conclusion `success`), report artifact `doc-health-report-2026-09-02`, ten repositories in its `Repo-Identity` line. | repository | sibling-pairing declaration | added-over-canon collision | | --- | --- | --- | | OpsxFactory | **2** | 0 | | the other nine (openxFactory, codexFactory, AdxFactory, HealthLinc, LedgerxFactory, MedxChart, MedxEHR, MedxFactory, MedxPractice) | 0 | 0 | | **estate** | **2** | **0** | The two pairs are `adopt-bc-extension-owned-deploy` over `widen-business-central-extension-lifecycle`'s addition of 'An install is done only when a read proves it', and `amend-rider-heartbeat-secret-channel` over `add-cloudpc-worker-fleet-management`'s addition of 'Ratified pilot authentication, signing, and secret delivery'. **Brett Heap ruled the routing on 2026-09-02**: archive now on merged-and-green realization evidence, the OpsxFactory population tracked as OWNER TASKS and NOT blocking this gate. No per-repository issue was opened from the read — § 5.3 forbids that without a ruling, and the ruling asked for the other route. **openxFactory's zero is D4's sequencing holding, not an absence of shape**: § 6's marker sweep ran BEFORE the class existed (`3a6a16e9`, PR #538), so the class launched at a population of zero and the `+4 warning` figure was unreachable by construction. ## § 8.1 — green, measured before and after the act on base `bbbbeda9` | gate | before the act | after the act | | --- | --- | --- | | `python3 -m pytest tests/doc-health -q` | **1384 passed, 0 failed** | **1384 passed, 0 failed** | | `OPENSPEC_TELEMETRY=0 openspec validate --all --strict` | **83 passed, 0 failed** (30 active + 53 specs) | **82 passed, 0 failed** (29 active + 53 specs) | | `doc-health.py --single-repo . --family modified-block-currency` | 0 critical, 0 error, **0 warning**, 8 info; 0 new regressions | 0 critical, 0 error, **0 warning**, 8 info; 0 new regressions | | `--family promotion-fidelity` (basis: the pinned checkout) | — | **no findings** | | full `doc-health.py --single-repo .` | 6 critical, 7 error, 29 warning, 14 info | 6 critical, 7 error, 29 warning, 14 info | `-1` on `validate` is exactly what promoting one change predicts; the spec count does not move because all three deltas land in specifications canon already carries. **The gated family moves in NO band.** The whole diff of its report either side of the act is FOUR lines and not one of them is a finding: canon words 249830 -> 263957 (+14127), governance words 750121 -> 764248 (the same +14127, moving from active-change prose into promoted prose), canon share 33.3% -> 34.5%, and the promoted-specs row. The FULL 23-family run says the same thing at estate scale: normalising the repository label (the `before` run is a detached worktree at `origin/main`, so it derives a different basename), the whole report diff is TWO lines — the canon share and the promoted-specs word count — and no finding moves in any family. All seven finding classes are identical across the act — scenario-title 0, carriage ledger 8, title resolution and ordering 0, marker defects 0, sibling-pairing 0, added-over-canon collision 0, unplaced-finding drift 0 — so `_LEDGER_SUBJECTS` and `_PAIRING_SUBJECTS` each gain and lose no row and no `_moved()` message fires. **THE ORDER TAKEN WAS § 6 FIRST, so the figure this gate reads is `0 warning`, and that is what both measurements returned** — the same figure PR #558 recorded either side of the landing that introduced the classes. Figures that moved since the packet was authored, recorded rather than smoothed: PR #558's own gate line read `validate` **79** and `pytest` **1364 passed, 1 failed** (the `add-chain-attestation` carriage-ledger subject that had landed on `main` without its `_LEDGER_SUBJECTS` row, since named there). The corpus moved under both numbers; what is invariant is `0 failed` and the `0 warning` movement. ## § 8.3 — promotion verified per requirement, byte-for-byte, in all three capabilities The check a packet about lossy promotion owes itself. Requirements were sliced from `### Requirement:` to the next `### ` or `## ` heading and compared as bytes. | capability | requirements | scenarios | delta | verdict | | --- | --- | --- | --- | --- | | `release-realization` | 7 -> 7 | 18 -> 24 | 1 MODIFIED | the block REPLACED 'Ordered deltas and branch vocabulary' byte-for-byte; the other 6 requirements byte-identical, order unmoved | | `document-lifecycle` | 17 -> 18 | 79 -> 87 | 1 ADDED | a PURE APPEND — canon-before is a strict byte PREFIX of canon-after | | `doc-health` | 41 -> 43 | 196 -> 220 | 2 ADDED + 1 MODIFIED | the MODIFIED block replaced its requirement IN PLACE byte-for-byte; the 2 ADDED appended in delta order; the other 40 byte-identical, order unmoved | **Nothing was dropped, nothing was reordered, and nothing needed a hand fix.** `doc-health`'s canon-before is NOT a byte prefix of canon-after, and correctly so: its MODIFIED block replaces the 39th of 41 requirements in place, so the prefix test is the wrong test there and the per-requirement one is the right one. Inside the `release-realization` replacement the promoted content is carried whole and measured rather than asserted: the one promoted body paragraph and BOTH promoted scenarios are byte-identical and still FIRST in their original order, with SEVEN new body paragraphs and SIX new scenarios after them — exactly the counts the delta's own preamble declared. Inside the `doc-health` replacement, 33 of the 35 promoted units are restated byte-identical and the other TWO are declared by a `Removed from canon by govern-sibling-added-modified-deltas (2026-08-31):` marker — the sentence asserting the family's absence from `FAMILY_RESOLUTION` and the scenario bullet resting a MUST on it, both superseded inside the same block. A declared deletion is not a carriage defect, which is why the currency arm reads zero against this packet rather than eight, at the gate as at § 4.2. `--family promotion-fidelity` returns no findings over the archived packet, and that silence carries a POSITIVE CONTROL rather than being taken on trust: renaming ONE promoted scenario title of the block this act promoted made the family emit by name — `[error] …/2026-09-02-govern-sibling-added-modified-deltas/specs/release-realization/spec.md`, *"requirement 'Ordered deltas and branch vocabulary' reached openspec/specs/release-realization/spec.md without 1 of its 8 ratified scenarios"* — and the perturbation was reverted, the tree re-read clean. The control also fixes that family's REACH: it compares requirement and scenario TITLES, not bodies, so it corroborates the byte-for-byte table above rather than replacing it. ## What this act does NOT do `Closes #502` — the three measured holes that issue named are now canon. The FOUR questions are not all closed and this does not claim they are: § 7 travels out open, with **OQ-4 the one exception, SPENT** — ruled 2026-08-31 as (a), one sweep, and discharged by § 6 — and OQ-1, OQ-2, OQ-3 and OQ-5 still open. § 1's two boxes describe a §7.4 sitting that was declined and do not tick; § 4.5 and § 4.6 record what the packet DECLINED to supersede. The band flip for both new classes stays RESERVED (§ 7.4) and this archive does not take it. One repair the move itself made necessary, on the precedent of `ded8b9f1`: `docs/doc-health.md` linked the packet at its active path, which this commit removes in the same act; retargeted to the archived packet, spelled with its archive date as that document spells its other archived references. Closes #502 Co-Authored-By: Claude Fable 5 <[email protected]> * Move the sequenced-after sweep pin: 18 -> 17 active co-modified (this archive) The pin this archive falls due on, moved by the route the assertion's own message prescribes: re-derive with the shipped sweep, move the number, and record in the MOVEMENT LOG which subject moved and why. ONE ROW MOVES AND NO OTHER, and the docstring says which and on what evidence rather than the number being silently re-typed. `tests/sequenced_after/test_sweep.py::test_the_live_sweep_reproduces_the_AUTHORING_measurement` went red on PR #571's `pytest-suite` (`assert 17 == 18`). Its message named the cause in advance: "archiving a co-modified ACTIVE change lowers this count while leaving `co_modified` untouched, and that is the EXPECTED cause of this failure". That is exactly what happened. `govern-sibling-added-modified-deltas` carried TWO `## MODIFIED Requirements` blocks — over `release-realization`'s 'Ordered deltas and branch vocabulary' and `doc-health`'s 'A modified-block-currency finding its own class map cannot place is itself a finding' — so it was an ACTIVE co-modifier, and the archive moved it out of the active corpus into the archived one. Same shape as #563's move on 2026-09-01, and for the same reason. MEASURED ON BOTH SIDES rather than inferred from the failure — `python3 scripts/validate-sequenced-after.py . --sweep`: | reading | change ids | co-modified | sole | ACTIVE co-mod / sole | | --- | --- | --- | --- | --- | | `bbbbeda9` (`origin/main`) | 153 (30 active + 123 archived) | 104 | 49 | **18** / 12 | | `da5882b4` (this branch) | 153 (29 active + 124 archived) | 104 | 49 | **17** / 12 | EXACTLY ONE of the test's pins moves. Every other assertion re-derives unchanged and was checked one by one, not assumed: `co_modified` 104, `change_ids == active + archived`, `sole_modifiers == change_ids - co_modified`, `change_ids - 1 == 152`, `sole_modifiers - 1 == 48`, `active_sole - 1 == 11`, 3 prose headers (3 archived), 1 declaration (`add-sequenced-after-substrate`), 0 root claims, deepest chain 1. `active_sole` is untouched at 12 — the archive removed a CO-modified active and never a sole one — so the `- 1` still subtracts `add-sequenced-after-substrate` alone and still recovers the authoring 11. The corpus-wide totals hold because an archive moves a change between buckets without changing the population. `python3 -m pytest tests/sequenced_after -q`: 118 passed, 0 failed. Co-Authored-By: Claude Fable 5 <[email protected]> --------- Co-authored-by: Claude Fable 5 <[email protected]>
main advanced under this branch with #585 (staging) and the archive of govern-sibling-added-modified-deltas (#558/#571), which promoted a doc-health delta and touched docs/doc-health.md and tests/sequenced_after/test_sweep.py's corpus pin. Taken as a MERGE per this estate's practice. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Builds Speckit F1 (
tasks.md§ 2) and F2 (§ 3) of the RATIFIEDgovern-sibling-added-modified-deltas(merged PR #504,8f986c39). Twoseparately vetoable features, one module, five reviewable commits.
Both new classes launch
warningper the ratified severities in thedoc-healthdelta, and both arrivecontested— the family has carried aFAMILY_RESOLUTIONrow since #529 and that table has no per-class grain. Bothread ZERO over this repository, which is the state D4's route 1 was chosen
to produce.
F1 — the
Modified overmarker and the pairing class**Modified over `<basis>`'s addition by <change-id> (<YYYY-MM-DD>):**+— <reason>, recognized by a COMPLETEprefix like the other two. Recognition ENDS AT THE CLOSING COLON: neither
the reason tail nor the
byidentifier's equality to the carrier is a parsecondition, because folding either in drops a plainly-marked block back to the
body units and hands its author the absent-marker remedy for a marker that is
right there. The form names no units —
namesis empty — so it suppressesnothing, can never reach the marker-defect class, and is a carriage unit in
neither direction. The reason is the WHOLE TAIL after
—, harvested always;an absent or whitespace-only tail is a VALUE the classifier reports.
sibling_titleswidened to return the adding change, its declared standing(through the module's existing
_standingpath) and whether an ADDITION or arename's
TO:half put the title there. The KEYS are unchanged, soresolveis untouched and its own-rename precedence still resolves arename-and-amend block against canon under the OLD name one step earlier.
if status == "pending": continuebecomes a pairing emit and the SAMEcontinue. The three comparison arms still do not run against a pendingblock and no requirement text is compared anywhere in this path — the
2026-08-27 ruling is untouched. What changes is that the block is no longer
dropped before anything looks at it.
the carrier's own ADDITION first (a fact about the delta, not the marker),
then the marker COUNT, then the single marker's basis,
by, REASON anddisclosure. The reason precedes the disclosure because the disclosure is a
word looked for IN the reason clause.
F2 — the ADDED-over-canon collision class
An active
## ADDED Requirementsblock, or an active rename'sTO:half,naming a title canon ALREADY carries — the surviving evidence of the unsafe
archive order, and the only backstop that can exist from inside a health run.
The
FROM:half is never read. It runs BEFORE the family'sif not blocksguard, because the repository most likely to hold this evidence is one whose
modifying packet has already archived and may hold no MODIFIED block at all.
Registration for both, per the fifth-class rule: two
_ArmTemplates (one each,so the pairing class's four states stay ONE shape and ONE remedy), two
FindingClassentries inserted beforeunplacedso the gate-bearing armstill reads first and the drift class still reads last, two anchored
_CLASS_PATTERNSentries, and two severity plus two action constants namedapart from
_LAUNCH_SEVERITY— whose § 7.2 flip at7f656980moved it alone,which is the demonstration that separate constants were the right shape.
Mutation evidence
Each new arm mutated at its own source condition, the four
tests/doc-healthmodified-block-currency files run, then reverted.
_LEDGER_SUBJECTSreds inevery row and in the clean run alike — it is the pre-existing drift PR #554
owns, listed here only so the rows are read honestly.
_LEDGER_SUBJECTS)..._eight_rule_shapes_...,..._every_reported_state_...,..._self_referential_state_is_examined_first_......_every_reported_state_...,..._self_referential_state_is_examined_first_......_every_reported_state_...,..._misdeclared_grounds_are_named_apart_......_misdeclared_grounds_...,..._every_finding_falls_into_exactly_one_class,..._two_runs_agree_byte_for_byte_on_every_treebycomparison dropped..._every_reported_state_...,..._misdeclared_grounds_are_named_apart_......_reason_is_read_before_the_disclosure..._every_reported_state_...,..._misdeclared_grounds_...,..._reason_is_read_before_the_disclosure..._eight_rule_shapes_...,..._every_reported_state_...,..._undisclosed_state_names_the_basis_and_its_standing..._pending_on_a_sibling_s_addition_compares_nothing_...,..._no_basis_is_synthesized_...FROM:half too..._collision_class_reports_both_basis_forms_and_never_the_from_half,..._reads_a_repository_carrying_no_modified_block,..._own_rename_carve_...not blocksguard..._every_finding_matches_exactly_one_arm_template..._reason_is_harvested_always_and_an_absent_tail_is_a_value,..._reason_is_read_before_the_disclosure,..._every_reported_state_...byequality folded into RECOGNITION..._third_reserved_form_is_recognized_by_its_complete_prefix..._third_form_names_no_units_and_is_no_carriage_declaration..._self_referential_state_is_examined_first_...M2 SURVIVED ON THE FIRST ROUND AND IS WHY A SEVENTEENTH FIXTURE EXISTS.
Widening the self-addition condition to a carrier's own RENAME reddened nothing,
because on every fixture the own-rename precedence hid it. The killing case is
the one the promoted requirement names and the fixtures did not carry: a
carrier's own rename whose
FROM:half canon does NOT carry, so the precedencenever fires and the block reaches the check with the carrier as the only writer
of the title.
mod-own-rename-unpromotedis that fixture, and it also drove theone behavioural addition this build made beyond the task list — the undeclared
state names the rename that put the title there rather than naming nothing.
Real-corpus run
python3 scripts/doc-health.py --single-repo . --family modified-block-currency,both trees basenamed
openxFactory(issue #342), branch vsorigin/mainat thesame tip:
Findings: 0 critical, 0 error, 0 warning, 8 infoon both. The diff of thetwo family sections is exactly the two new rows; every finding row is
byte-identical. The only other line that moves in the whole report is the
canon-share/word count, which moves because
docs/doc-health.mdis astandarddocument and § 2.13 amended it.THE POPULATION MOVED, AND THE PROPOSAL'S FIGURE IS HISTORY
The packet measured 20 blocks / 16 canon / 4 pending with zero markers.
This tree reads 20 / 17 / 3, and the pairing class reports ZERO, not
four. Both movements are acts taken after that measurement, and neither is drift:
add-binding-consumer-identityandadd-notebook-hosting-credential-custodytogether on 2026-08-31, in the SAFEorder — so that pair left the pending set with its requirement promoted.
3a6a16e9(PR The four standing pairs declare their bases: the §6 sweep, custody's falsified scenario struck, one ruling consenting to five packets #538) and the remaining THREEpairs —
add-wallet-carried-review-authorityoveradd-substantive-review-lane,implement-keycloak-install-repooveradd-identity-brokering,implement-openxpki-install-repooveradd-trust-anchor— each carry ONEModified overmarker naming aratifiedbasis that adds the title, under the carrying change's ownbyidentifier, with a nonempty reason. All three are DECLARED AND RESOLVING and
silent by design.
So D4's route 1 was performed rather than merely chosen, the class launches
at a population of zero, and § 2.11's exact set launches EMPTY — its
D4-sequencing branch, not its fallback. The three markers were written by the
sweep and are read back by the parser this PR adds, which is the evidence that
the form as authored and the form as recognized are one form rather than two
spellings that happen to coexist.
Test counts
origin/main, unmodified worktree+18 tests. THE ONE FAILURE IS THE SAME ONE IN BOTH RUNS AND IS NOT THIS PR'S
—
test_every_carriage_ledger_finding_over_the_real_tree_is_named, reporting theone unnamed subject
('add-chain-attestation', 'signed-execution-chain', 'A gate validates the short chain as a hash-linked chain')that landed onmainwiththat packet's MODIFIED block. PR #554 owns that row and this PR deliberately
does not duplicate it;
origin/mainwas merged at945a32ddand #554 had notlanded. Once it merges, this branch is fully green.
Other gates:
OPENSPEC_TELEMETRY=0 openspec validate --all --strict— 79passed, 0 failed;
openspec validate govern-sibling-added-modified-deltas --strict— valid.Task boxes ticked
§ 2.1–2.13 and § 3.1–3.4, all built, tested and mutation-proved.
§ 2.8's negative was verified FIRST and then kept as a test: with each new arm
template registered and its class pattern absent, the fifth class fires and
quotes the new rule text — ONE drift finding for thirteen unplaced pairing
findings and ONE for two collision ones, which is also what says the pairing
class's four states are one shape.
§ 4.1–4.4, with every measurement RE-TAKEN at this build rather than copied,
and § 4.1's re-measurement recording exactly what moved and why.
What stays open
the next nightly, across the submodules carrying
openspec/changes/. Notfaked here: this packet measures openxFactory and predicts nothing about the
rest, and a population found elsewhere arrives
contestedon its first emit.mainby the sweep at3a6a16e9. No packet'schange directory was touched by this PR.
§ 8 are untouched.
_LAUNCH_SEVERITYand theFAMILY_RESOLUTIONrow are untouched, as theratified code surface requires.
🤖 Generated with Claude Code