Skip to content

Realize declare-spent-bundle-state: the SPENT third state, and contract-v2.6 declared spent (#575) - #587

Merged
brettheap merged 6 commits into
mainfrom
feat/declare-spent-bundle-state
Sep 2, 2026
Merged

brettheap merged 6 commits into
mainfrom
feat/declare-spent-bundle-state

Conversation

@brettheap

@brettheap brettheap commented Sep 2, 2026 •

Copy link
Copy Markdown
Contributor

Realizes the RATIFIED change declare-spent-bundle-state (ratified 2026-09-02 by Brett Heap; proposal landed as PR #578, squash f4fddf7c; tracking issue #575). Group 2 of its tasks.md, built as ONE vertical slice — the reader, the ladder, the two emits, the contract-v2.6 declaration and the tests — because splitting them produces halves neither of which is green alone.

Do not merge on my say-so. Brett's standing word covers this landing on the dispositioned red described under The one red, and why it is not this PR's below; the reviewer is the gate.


What the ratified spec required

openspec/changes/declare-spent-bundle-state/specs/doc-health/spec.md opens ONE ## MODIFIED Requirements block over the promoted Requirement: Release-tag publication. No new requirement, no new family, no new capability. The requirement gains a THIRD STATE — SPENT — between published and owes a tag, entered only by an explicit declaration and refused by every absence. Thirteen scenarios added; one promoted scenario gains exactly one AND bullet; nothing else moves.

The governing sentences it must be implemented against:

  • SILENCE IS NEVER A DECLARATION. An untagged superseded bundle that no declaration names reads exactly as it did before, at error and in the same words.
  • THREE OUTCOMES, NOT TWO, AND THE MIDDLE ONE IS NOT A REFUSAL — ACCEPTED (info), PROVISIONAL (warning, suppressing the superseded error), REFUSED (error, with the superseded error standing alongside).
  • THE SUCCESSOR GUARD IS WHAT MAKES THE STATE UNABUSABLE — the named successor must be CUT, PUBLISHED, and (OD-9) STRICTLY LATER.
  • THE PATH IS THE FINDING'S IDENTITY — every finding of this state lands on contracts/releases/<bundle>.digests.yaml, with one exception that has no bundle to land on.
  • THE SPENT STATE REACHES THE ABSENT-TAG ARM AND NOTHING ELSE.

What was built, scenario by scenario

The ladder lives in check_repo's ABSENT arm, after the ok/lightweight/misplaced branches, so the scope rule holds by construction rather than by care. Declaration integrity is a separate pass that runs over every declaration whatever its subject's tag state, because those are defects in the RECORD; acceptance reaches the absent arm alone.

Ratified scenario Built Severity / path
Declared SPENT, successor published check_repo ACCEPTED branch info, contested, contracts/releases/<bundle>.digests.yaml
Successor cut but not published PROVISIONAL branch, suppresses the superseded error warning, per-bundle inventory
Successor never cut _declaration_state → successor-never-cut error + superseded error stands
Successor not STRICTLY LATER (OD-9) _declaration_state → successor-not-later error + superseded error stands
SUBJECT never cut _declaration_state → orphan-subject warning on contracts/CHANGELOG.md
An element omitted _read_elements + malformed, naming which error, never in the absent-tag words
Outside its successor's own entry _declaration_state → wrong-entry error + superseded error stands
Two declarations naming one bundle _refusal_findings, ONE finding for the pair error, accepting none
Two different bundles each spent per-bundle inventory paths two infos, two DIFFERENT match_key()s
Names the currently declared bundle _declaration_state → live-bundle, before the form checks error, and that bundle is still distance-graded
Does not quiet a misplaced/lightweight tag branch order error in the MISPLACED / LIGHTWEIGHT words, unchanged
Changelog unreadable at the published tip second read, same commit, same guard Skip naming that read
Untagged-before-this-state bundles not retrofitted they are published, so they never reach the arm no finding
A bundle cut, superseded, never tagged (MODIFIED) unchanged wherever no accepted declaration names it error on contracts/manifest.yaml

The reader (parse_spent_declarations) is one pure function from changelog bytes, LABEL-ANCHORED rather than a split on the separator: splitting reads a cause carrying an em dash as three elements and then names the WRONG element as the missing one, handing an author the wrong repair for a defect that is right there. It rejects rather than skips — the opener is reserved, so a line beginning with it and completing nothing is a malformed declaration.

The declaration, verbatim

Written into the existing ### \contract-v2.6` dispositionsubsection under## contract-v3.0incontracts/CHANGELOG.md. Not a new subsection, not an edit to the contract-v2.6` entry, not an edit to the manifest or the inventory.

**SPENT BUNDLE:** `contract-v2.6` — SUPERSEDED BY `contract-v3.0` — CAUSE: `contract-v2.6` declares change class ADDITIVE (minor) on a tree that refuses three shapes `contract-v2.5` accepted, and is never verifiable (five HGR-RELEASE-DIGEST-MISMATCH findings at `bbbbeda9`, the only first-parent commit that declares it), so the targeting rule has no legal target and no completion commit or rebuilt inventory can cure it — RULED BY Brett Heap, 2026-09-02 — MEASUREMENT: PR #565 comment `5502452624`

Before / after, on the real corpus

Both runs are python3 scripts/doc-health.py --single-repo . --as-of 2026-09-02 over a clone whose basename is openxFactory and whose origin/main is the tree being measured — base 3bcde7e2 (origin/main), head this branch. That construction is required: the family resolves its tip from ls-remote origin refs/heads/main, so a working-tree edit is invisible to it by design.

critical error warning info
base (3bcde7e2) 6 6 39 11
head (this branch) 6 5 39 13

Net: −1 error, +2 info — exactly what the proposal predicted. The finding that moved:

- [error] openxFactory:contracts/manifest.yaml — contract-v2.6 was cut and SUPERSEDED without ever being published: …
+ [info]  openxFactory:contracts/releases/contract-v2.6.digests.yaml — contract-v2.6 is declared SPENT: it was cut, has no published annotated tag, and contract-v3.0 — itself cut, itself published and strictly later — superseded it. The record is contracts/CHANGELOG.md § contract-v3.0 — RULED BY Brett Heap, 2026-09-02; MEASUREMENT: PR #565 comment `5502452624`. The tag obligation was not met, it was EXTINGUISHED by an owner act at the cost of a version number   (class="contested")

The second new info is the one OD-6 predicted and is not this state's: release-inventory-drift on contracts/CHANGELOG.md, "bytes differ from the digest 'contract-v3.0' records (editorial member — expected between cuts)". It clears at the next cut (task 3.2).

24 of 26 family sections are BYTE-IDENTICAL; the two that moved are exactly those two. family-enumeration: no findings on both — this change adds no family and moves no count. modified-block-currency: byte-identical. The census lines move by the prose this PR adds to docs/doc-health.md (standard, 14007 → 14482 words) and tasks.md (draft, 132642 → 132859 words), which is the governed corpus growing and not a finding.

The one red, and why it is not this PR's

tests/doc-health/test_release_tag_publication.py::test_this_repository_reads_zero_and_the_probe_can_fire is RED on main already and stays red in this PR's CI. Brett ruled it 2026-09-02 (issue #575, lane openxfactory-1d): "merge the realization on the dispositioned red." The family reads origin/main's manifest and, per task 2.5, its changelog at the LIVE remote tip, so the declaration this PR writes is invisible to that test until this PR's own squash IS that tip.

Proved mechanically rather than argued. A bare origin whose main is this branch, cloned and measured:

A) worktree, origin = the real remote (no declaration at the tip)
   [error] contracts/manifest.yaml — contract-v2.6 was cut and SUPERSEDED without ever being published…
B) bare origin whose main IS this branch (the declaration at the tip)
   [info]  contracts/releases/contract-v2.6.digests.yaml (contested) — contract-v2.6 is declared SPENT…

and in that clone pytest tests/doc-health/test_release_tag_publication.py is 46 passed, 0 failed — the self-gate green and its positive control still firing. The test is not edited. Task 2.9 is left unticked for whoever confirms main's suite green at the squash.

Mutation table — 18 mutations, each reds its intended test and no other

# Mutation of release_tag_publication.py Tests that went red
M1 the ladder never fires 8 (every accepted/provisional/uncited test)
M2 the spent info lands on the manifest 4 (identity + both uncited round trips)
M3 the spent info is auto-fixable, not contested 4
M4 OD-9 removed: successor need not be strictly later …walked_around_backwards
M5 the containing-entry rule removed …outside_its_superseding_bundles_entry_is_refused
M6 the duplicate rule removed …two_declarations_naming_one_bundle_accept_none
M7 an unreadable changelog reads as "no declaration" …unreadable_changelog_at_the_published_tip_skips
M8 the orphan-subject rule removed …subject_was_never_cut_disposes_nothing
M9 the provisional warning stops suppressing the error 2
M10 an unpublished successor is accepted as published 2
M11 the reader splits on the separator instead of anchoring on labels 2 (the em-dash cause and the two-halves ruling)
M12 a missing element is skipped rather than refused …omitting_an_element_names_it…
M13 the accepted info borrows the absent-tag action …carries_its_own_action_and_never_the_absent_tag_one
M14 the ladder is reached before the misplaced/lightweight arms 4, including the two PRE-EXISTING arms' own tests
M15 the live-bundle rule removed …naming_the_currently_declared_bundle_is_refused
M16 the successor-never-cut rule removed …never_cut_errors_and_the_superseded_error_stands
M17 the unreadable-subject rule removed …no_readable_subject_is_a_changelog_error
M18 the reserved-form gap check removed …junk_spliced_between_the_subject_and_the_form…

Source restored byte-for-byte after every mutation, asserted by the harness. M17's test was added because the first pass of the harness found it missing — the mutation reddened nothing, which is the harness doing its job.

Action strings are pinned as fresh literals, not compared with the module's own constants, per this suite's own convention (test_the_pairing_class_carries_its_own_band_and_action).

Gates

  • python3 -m pytest tests/doc-health — 1 failed, 1410 passed (438s), the ONE failure being the dispositioned self-gate above. The merge base reads 2 failed, 1382 passed: the same self-gate, plus test_modified_block_currency_self_gate.py::test_the_report_moves_only_in_this_family_s_lines, which passes in isolation on the merge base AND on this branch (147s) and does not recur in this branch's suite run — a local parallel-load artifact, not a corpus fact, and consistent with main's own CI reporting exactly one failure at f4fddf7c.
  • python3 -m pytest tests/doc-health/test_release_tag_publication.py — 46 passed in the head clone (all green there, self-gate included); 45 passed, 1 failed in this worktree. Was 19 tests (18 passed, 1 failed) on the merge base: +27 tests.
  • OPENSPEC_TELEMETRY=0 openspec validate --all --strict — 84 passed, 0 failed.
  • python3 -m pytest tests/sequenced_after — 118 passed; validate-sequenced-after.py pins do not move (this change adds no active change and no MODIFIED block).
  • Real-corpus doc-health — above.

Task boxes ticked

2.1 declaration · 2.2 reader · 2.3 ladder · 2.4 emits and action constants · 2.5 the second read's guard · 2.6 the scenarios as tests + the RED-FIRST proof · 2.7 OQ-3 proved end to end and with TWO spent bundles · 2.8 docs/doc-health.md.

2.9 left unticked, annotated with the ruling and the bare-remote proof. Group 3 (owed at the next cut) and group 5 (archive) untouched.

OQ-3 is answered, not inherited. report.uncited_resolutions does behave as OD-5 assumed for a contested info: proved end to end through a rendered report — the info reaches the ranked plan with class="contested", parse_previous reads it back, and withdrawing one of TWO declarations raises an uncited-resolution ERROR for that bundle's identity alone. OD-5's class choice stands and does not return to Brett.

Orchestrator decisions — for Brett to affirm

Three places where the ratified spec is silent and the fail-closed reading was taken.

  1. A declaration whose SUBJECT cannot be READ at all is an error on contracts/CHANGELOG.md, not the orphan warning. The spec gives the changelog path to exactly one finding — a subject naming a bundle never cut, at warning — and says nothing about a line whose subject is unreadable, which also has no inventory to land on. An unreadable subject is strictly worse: it names nothing, so nothing can be checked about it. Pinned by test_a_declaration_with_no_readable_subject_is_a_changelog_error.
  2. The reader does no code-fence tracking, so a declaration inside a fenced block is still a declaration. The requirement reserves the opener over the whole document. This is the fail-closed direction — it recognizes more lines and therefore refuses more of them — and the alternative would let a declaration be hidden from the reader by four leading spaces.
  3. Task 3.1's routing was taken and left where it sits. The box now records that OD-6's cost argument is spent (Record instance six: contract-v2.6 is superseded, and the policy says so where a consumer reads #577 already drifted docs/contract-versioning-policy.md), and hands the routing to the realization. The narrower reading was taken: the section heading still reads NOT here (OD-6), and a second between-cuts edit to a NON-EDITORIAL release member inside a checker PR is the shape OD-6 declined for reasons the arithmetic does not touch. If you want it landed now it is one paragraph and touches no code.

One disclosed consequence, not a decision. A repository that declares a bundle and carries no contracts/CHANGELOG.md at the published tip now SKIPS this family rather than being checked, because the ratified scenario The changelog cannot be read at the published tip requires a skip and blobs_at cannot distinguish "absent" from "unfetched". Measured across the estate: only openxFactory and openXwallet declare a bundle at all, both carry a changelog, and openXwallet's wallet-v1.1 is not of the contract-v<major>.<minor> shape this family judges, so nothing in scope changes. The skip is reported as an info with its reason, never silently.

Not done, deliberately

No git tag was created or pushed. contract_bundle_version and every manifest version line are untouched. The contract-v2.6 entry and contracts/releases/contract-v2.6.digests.yaml are left exactly as written — "never edit the manifest, the changelog or the inventory to match the absence". health/dispositions.yaml and its readers are untouched (OD-1). The threshold stays five and the enforcement floor stays contract-v1.7.

🤖 Generated with Claude Code

brettheap and others added 5 commits September 2, 2026 11:45
…er, and the emits

Realizes `declare-spent-bundle-state` tasks 2.2–2.7 (ratified 2026-09-02 by
Brett Heap; openxFactory #575). The family gains a THIRD STATE between
*published* and *owes a tag*, entered ONLY by an explicit reserved-form
declaration in `contracts/CHANGELOG.md` at the published tip and refused by
every absence.

THE READER (2.2). One pure function from changelog bytes to declarations,
parsing the reserved opener `**SPENT BUNDLE:**`, the four owed elements and
the containing `## contract-vX.Y` entry. LABEL-ANCHORED, never a split on the
separator: splitting reads a cause carrying an em dash as three elements and
then names the WRONG element as the missing one, handing an author the wrong
repair. Rejects rather than skips — the opener is reserved, so a line that
begins with it and completes nothing is a malformed declaration rather than
prose to be ignored.

THE LADDER (2.3), in the ABSENT arm only and after the ok/lightweight/misplaced
branches, so the scope rule holds BY CONSTRUCTION rather than by care. No
declaration -> today's behaviour, byte for byte. Accepted, successor published
and STRICTLY LATER -> one `info`. Successor cut but unpublished -> PROVISIONAL:
one `warning`, and the superseded `error` suppressed in its favour, the
successor being graded on its own account. Successor never cut, successor not
later (OD-9), an element missing, a duplicate declaration, the wrong containing
entry, or naming the live bundle -> `error` accepting nothing, with the
superseded `error` standing alongside so a bad declaration removes nothing. A
declaration whose SUBJECT was never cut -> `warning` on the changelog.

THE EMITS (2.4) land on `contracts/releases/<bundle>.digests.yaml` and not on
the manifest, because THE PATH IS THE FINDING'S IDENTITY: `match_key()` is
`(family, repo, path)` and ignores the rule, so a spent state on the manifest
would share an identity with every other finding of this family and its
disappearance would be masked by any surviving sibling. Four new action
constants beside the four the module already had; the accepted `info` is
`contested`.

THE SECOND READ (2.5) joins the manifest read at the SAME commit under the SAME
guard: `blobs_at` answering None is a skip naming that read, never "there is no
declaration". This is the #338 conflation one document over, and this family has
been caught by it once already.

TESTS (2.6, 2.7): 26 added over the file's real-git fixtures — every scenario
the ratified delta states, the reader as a pure function, the action strings as
FRESH LITERALS rather than comparisons with the module's own constants, and the
RED-FIRST proof that the declaration removed returns the `error`. OQ-3 is PROVED
rather than inherited, end to end through a rendered report and with TWO spent
bundles: two `info`s, two DIFFERENT match keys, and removing one raising an
`uncited-resolution` ERROR for that one alone.

Every one of 18 source mutations reds its intended test and no other.

Co-Authored-By: Claude Fable 5 <[email protected]>
… form

Realizes `declare-spent-bundle-state` task 2.1. ONE reserved line, into the
EXISTING `### contract-v2.6 disposition` subsection under `## contract-v3.0` —
not a new subsection, not an edit to the `contract-v2.6` entry, not an edit to
the manifest or the inventory. Its four elements come from the record that
already exists: superseding bundle `contract-v3.0`; cause, the
ADDITIVE-class-over-a-refusing-tree defect no completion commit can cure,
together with the five HGR-RELEASE-DIGEST-MISMATCH findings that leave the
targeting rule no legal target; ruled by Brett Heap, 2026-09-02
("Supersede: v3.0 is the completion"); measurement, PR #565 comment 5502452624.

A HANDLE ON THE RECORD AND NOT A SECOND RECORD, in the pattern
`document-lifecycle`'s reserved `Modified over` marker already sets. Nothing
above it is edited: the ERROR is not silenced by an absence but answered by a
declaration.

AND `main` GOES GREEN BECAUSE THIS BUNDLE IS EXPLICITLY DECLARED SPENT, never
because an undeclared bundle started passing —
`test_removing_the_declaration_returns_the_superseded_error` is that
verification, run over a tree with the declaration removed, and the `error`
returns in the same words.

Co-Authored-By: Claude Fable 5 <[email protected]>
…d state

Realizes `declare-spent-bundle-state` task 2.8. The family's own paragraph
gains the SPENT state: the reserved single-line form, the three outcomes
(ACCEPTED / PROVISIONAL / REFUSED and why the middle one is not a refusal), the
per-bundle inventory path and why it is not the manifest, the successor guard,
the accepted state's action line, and the two limits — the state reaches the
ABSENT-tag arm and nothing else, and is not read backwards onto the five
bundles under § Untagged Bundles After Enforcement Began.

THE FAMILY COUNT SENTENCES ARE UNTOUCHED, checked rather than assumed: this
change adds no family and moves no count, so `family-enumeration` stays silent.

Co-Authored-By: Claude Fable 5 <[email protected]>
…er than a miss

2.1 through 2.8 are DISCHARGED by the three commits below this one: the
declaration, the reader/ladder/emits with their tests, and the contract
paragraph.

2.9 IS DELIBERATELY UNTICKED. Brett Heap ruled 2026-09-02 (issue #575, lane
openxfactory-1d): "merge the realization on the dispositioned red." The family
reads `origin/main`'s manifest AND — per 2.5 — its changelog at the LIVE remote
tip, so `test_this_repository_reads_zero_and_the_probe_can_fire` cannot go green
until this PR's own squash IS that tip. The box records the mechanical proof
that it goes green there: a bare origin whose `main` is this branch reports ONE
contested `info` on `contracts/releases/contract-v2.6.digests.yaml` and no
error, while the same call against the worktree reports the inherited `error`.
The test is not edited.

3.1's ROUTING TAKEN AND LEFT WHERE IT SITS, recorded as an orchestrator decision
awaiting Brett's affirmation: the box's new arithmetic is a permission rather
than an instruction, and a second between-cuts edit to a NON-EDITORIAL release
member inside a checker PR is the shape OD-6 declined for reasons the
arithmetic does not touch.

Co-Authored-By: Claude Fable 5 <[email protected]>
Copilot AI lite review requested due to automatic review settings September 2, 2026 15:53

@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.

🟡 Changes recommended

check_repo currently treats an absent contracts/CHANGELOG.md as a hard skip, which can incorrectly disable tag-publication enforcement instead of simply meaning “no SPENT declarations.”

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR realizes the ratified declare-spent-bundle-state change by extending the release-tag-publication doc-health family to support a third outcome (“SPENT”) driven by an explicit reserved-form declaration in contracts/CHANGELOG.md, and adds extensive tests plus documentation and the initial contract-v2.6 declaration.

Changes:

  • Add a SPENT-declaration reader + evaluation ladder to scripts/doc_health/release_tag_publication.py, emitting per-bundle findings on contracts/releases/<bundle>.digests.yaml.
  • Add comprehensive real-git tests covering accepted/provisional/refused SPENT scenarios and report round-trips.
  • Document the new state and record the initial contract-v2.6 declaration in contracts/CHANGELOG.md; tick realization tasks.
File summaries
File Description
scripts/doc_health/release_tag_publication.py Implements SPENT parsing, validation ladder, and new emits/actions integrated into check_repo.
tests/doc-health/test_release_tag_publication.py Adds fixtures and many new scenarios validating SPENT reader/ladder and report round-trip behavior.
openspec/changes/declare-spent-bundle-state/tasks.md Marks realization tasks complete and records rationale for leaving 2.9 unticked.
docs/doc-health.md Documents the SPENT state, its reserved form, and the three-outcome semantics.
contracts/CHANGELOG.md Adds the machine-readable SPENT declaration line for contract-v2.6 under contract-v3.0.
Review details

Suppressed comments (1)

tests/doc-health/test_release_tag_publication.py:962

  • This test treats a missing contracts/CHANGELOG.md blob as “unreadable published tip” and expects a Skip, but FakeGit.blobs_at uses per-path None to represent an absent path (not an unfetched/uncallable git read). Once check_repo treats a missing changelog as “no declarations”, this should assert that evaluation continues (and doesn’t skip solely due to the missing changelog).
    out = rtp.check_repo("alphaFactory", Path("r"),
                         NoChangelog(remotes={"r": "tip"}))
    assert isinstance(out, Skip)
    assert "contracts/CHANGELOG.md could not be read at the published tip" \
        in out.reason
  • Files reviewed: 5/5 changed files
  • Comments generated: 2
  • Review effort level: Lite

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

Comment on lines +670 to +682
changelog = blobs.get(CHANGELOG)
if changelog is None:
# THE SAME GUARD ONE DOCUMENT OVER, and this family has already been
# caught by the #338 conflation once. `blobs_at` answers None PER PATH
# for a blob it cannot read, and the commonest cause is a checkout that
# has not fetched the published tip. NOT FETCHED IS NOT AN ANSWER — in
# either direction: the absence of a declaration this run could not look
# for must never be read as the absence of a declaration, because that
# reading turns an unfetched clone into an `error` nobody can act on.
return Skip(FAMILY, f"{repo}: {CHANGELOG} could not be read at the "
f"published tip {tip[:9]}, so a SPENT declaration "
f"could not be looked for — which is not the same "
f"fact as there being none")
Comment on lines +56 to +65
"""A cut: the manifest declares `bundle`, and a changelog exists to read.

THE CHANGELOG IS SEEDED HERE BECAUSE IT IS NOW A SECOND READ AT THE SAME
COMMIT (`declare-spent-bundle-state`). `blobs_at` answers None per path for
a blob it cannot read, and the family turns that into a SKIP naming the read
rather than into "there is no SPENT declaration" — so a fixture with no
`contracts/CHANGELOG.md` would skip every scenario below instead of
exercising it. Seeded once and only if absent, so `_changelog` can replace
it with real entries without this helper overwriting them on the next cut.
"""
…class

The severity table's `info` row read "Inventory and metrics", which is the
whole of what `info` carried until this state existed. A SPENT bundle is
neither: it is a RECORDED STATE, permanent, `contested`, and nobody can act on
it — which is the cost OD-3 accepted in terms when it chose an `info` over
silence, on the ground that a reader who finds a release inventory with no
matching tag is owed the answer in the report rather than only in a changelog
they may not read.

Named in the table so the class a reader meets is the class the contract
declares, rather than one they have to infer from a family paragraph forty
lines up.

Co-Authored-By: Claude Fable 5 <[email protected]>
Copilot AI review requested due to automatic review settings September 2, 2026 15:59

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.

🔵 Needs a closer look

It makes substantial, policy-sensitive changes to a core doc-health family’s behavior and introduces a large new test surface, warranting final human review.

Review details

Suppressed comments (1)

scripts/doc_health/release_tag_publication.py:675

  • blobs_at() reports per-path absence as None (scripts/doc_health/corpus.py:518-564), so changelog is None can mean the file is missing at the published tip (not necessarily an unfetched tip). The current comment/reason text only discusses the “not fetched” case, which makes the Skip reason misleading when the changelog simply isn’t present at that commit; consider broadening the wording to cover both cases.
    if changelog is None:
        # THE SAME GUARD ONE DOCUMENT OVER, and this family has already been
        # caught by the #338 conflation once. `blobs_at` answers None PER PATH
        # for a blob it cannot read, and the commonest cause is a checkout that
        # has not fetched the published tip. NOT FETCHED IS NOT AN ANSWER — in
  • Files reviewed: 5/5 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@brettheap

Copy link
Copy Markdown
Contributor Author

Merging with --admin per Brett Heap's ruling on #575 (2026-09-02 14:13Z, lane openxfactory-1d): "merge the realization on the dispositioned red." pytest-suite run 33652111769's ONLY failure is test_this_repository_reads_zero_and_the_probe_can_fire, which reads the LIVE origin/main changelog and goes green at this squash; the other three checks are green.

@brettheap
brettheap merged commit 3fa222f into main Sep 2, 2026
4 of 5 checks passed
@brettheap
brettheap deleted the feat/declare-spent-bundle-state branch September 2, 2026 16:19
brettheap added a commit that referenced this pull request Sep 2, 2026
…thing

The ladder is #587's and its box stays as #587 left it. One dated line names
PR #589, the ten escapes it measured against main's reader, and the seven that
let a declaration be accepted from outside its superseding bundle's entry — so
the packet's record says what was hardened over it rather than leaving the
repair discoverable only from a PR conversation.

Group 5's archive is not this PR's.

Lane: openxfactory-1d
Co-Authored-By: Claude Fable 5.1 <[email protected]>
brettheap added a commit that referenced this pull request Sep 3, 2026
… stale (§9.2 style) (#592)

* add-clearing-dispatch-boundary: file forward what #555's landing made stale (§9.2 style)

#555 (this packet) merged as squash ab0bb2d on 2026-09-02, and PR #191
(xFactory realization), PR #557 and PR #568 (the two inherited-red fixes)
have all landed since the packet's own text was last written. File forward
dated CORRECTION entries beside each now-stale statement, per this repo's
convention (no deletion or rewording of retained text):

- proposal.md Ratification section: "#555's own merge stays gated on..."
  corrected — #555 has merged.
- tasks.md §9.2: the "CONSEQUENCE FOR THIS PULL REQUEST... MERGE WAITS..."
  clause corrected — the wait ended; #555 merged. Also notes the later,
  unrelated release-tag-publication red (#575) and its fix (PR #587) so a
  reader does not conflate it with this packet's own already-resolved reds.
- tasks.md §3 heading: "authored IN PARALLEL... is being authored beside
  this one" corrected — it landed as xFactory#191, verified against the
  provider API.
- design.md OQ3 heading: "PENDING RATIFICATION" corrected — ratification
  landed 2026-09-01 and confirmed OQ3 (tasks.md §2.1).

Ticks §9.1 and §9.2 with evidence produced in this same commit:
OPENSPEC_TELEMETRY=0 openspec validate add-clearing-dispatch-boundary
--strict and --all --strict both green (84/84); python3 -m pytest -q
tests/doc-health tests/sequenced_after: 1529 passed. §9.3 (release-
realization archiving) is left untouched and not claimed.

Lane: openxfactory-f2
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNxTJoaJQkcDi2ybmLCZgW

* Address bot review: fix leftover-fragment wording, add whole-suite CI evidence for 9.2

Copilot (thread on tasks.md:562/566): the §9.1/§9.2 DONE annotations I
added interrupted the original retained sentences mid-thought, reading as
duplicated/leftover fragments. Fix: reordered so each original sentence
stays intact and contiguous (no deletion or rewording of retained text,
per this repo's file-forward rule), with my own DONE evidence now
following rather than interrupting it — this only reorders text this PR
itself introduced, not yet part of any landed record.

Codex (P2 on tasks.md:567): the local `tests/doc-health tests/sequenced_after`
run alone doesn't speak for the required `pytest-suite` check, which runs
the whole `tests/` tree. Fix: added the required check's own result on
this head as evidence — opensoft/openxFactory run 33693230302 passed
(`8671 passed, 21 skipped, ... failures=0 errors=0`, freshness verifier
passed) — so §9.2's tick is now backed by both the targeted suites and
the full required suite, not the targeted suites alone.

Lane: openxfactory-f2
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01WNxTJoaJQkcDi2ybmLCZgW

---------

Co-authored-by: Claude Fable 5.1 <[email protected]>
@brettheap

Copy link
Copy Markdown
Contributor Author

Orchestrator decisions AFFIRMED — Brett Heap, 2026-09-02, in session (doxBench stewardship lane), recorded by the steward.

  1. Unreadable declaration SUBJECT → error on contracts/CHANGELOG.md (not the orphan warning): affirmed as the fail-closed reading.
  2. No code-fence tracking — the **SPENT BUNDLE:** opener is reserved over the whole document: affirmed; prose that needs to illustrate the form writes it correctly or paraphrases.
  3. Task 3.1 (policy-side SPENT paragraph in docs/contract-versioning-policy.md) deferred to the next cut per OD-6's shape argument: affirmed; the section heading keeps reading NOT here (OD-6).
  4. Disclosed consequence — a bundle-declaring repo with no contracts/CHANGELOG.md at its published tip skips this family with an info: acknowledged as-is; nothing in the estate is affected today; revisit if a new bundle-declaring repo appears.

Remaining open work on the packet: tick task 2.9 citing main pytest-suite run 33654163291, then Group 5 archive via scripts/proposal-support.py . archive.

brettheap added a commit that referenced this pull request Sep 3, 2026
…loses an entry, fences are opaque, and the floor holds (#589)

* Harden the SPENT-state containment guard: every structural boundary closes an entry, fences are opaque, and the floor holds

The containment rule is the guard `declare-spent-bundle-state` leans on
hardest — a declaration is accepted only where the changelog entry CONTAINING
it is the entry of the bundle it names as superseding — and every way of
closing an entry the reader does not know about is an ACCEPT: the declaration
keeps the previous release entry's authority and quiets the
superseded-and-never-published `error` the family exists to raise.

Ten escapes were measured against main's reader before a line was written, each
probed through main's own functions rather than inferred (F1 a non-release `##`
heading; F2 an incomplete version token; F7 a level-one heading; F9a a heading
inside a code fence; F9b an indented ATX heading; L2 Setext headings; L3 an
empty ATX heading; F8 a below-floor repository with no changelog now skipped
entirely; F11 a batch-read skip naming one of two members; L4 a spurious orphan
warning on a below-floor subject). Seven of the ten let a declaration be
accepted from outside its superseding bundle's entry.

The rule now passes through ONE structural-boundary function rather than one
regex a reader has to re-derive, and is pinned as ONE parametrized table
carrying the stays-open rows beside the closes rows — so the next shape of
heading somebody invents is a row rather than a round. Fenced blocks are
declared OPAQUE to headings and to the reserved opener alike, which is
fail-closed both ways: an example inside a fence cannot spend a bundle, and a
declaration hidden in one does not count, leaving the `error` standing. The
changelog guard moves below `parse_bundle` and is gated on in-scope-ness, so a
repository with no bundle at or above the enforcement floor is answered as it
always was.

Over-closing is the fail-closed error and under-closing is not, which picks
every judgment here — but a rule tightened past the live document would refuse
the declaration that makes main green, so the live read is a test: it reads
`contracts/CHANGELOG.md` from disk, pins `entry == contract-v3.0`, and carries a
spliced-heading control over the same bytes.

Family file 46 -> 73 tests; `tests/doc-health` 1411 -> 1438 passed, zero
failures on both sides. doc-health `--single-repo` over the live corpus: 54
findings before and after, the two finding lists BYTE-IDENTICAL.

Re-scopes #584, whose realization half landed as #587 (`3fa222f3`); its Speckit
feature `specs/027-spent-bundle-state/` is carried and re-framed, with
`evidence/hardening-red-first.md` measuring each escape before and after.
`contracts/CHANGELOG.md`, `contracts/manifest.yaml`, `contracts/releases/*`,
`docs/contract-versioning-policy.md` and `health/dispositions.yaml` are
untouched.

Lane: openxfactory-1d
Co-Authored-By: Claude Fable 5.1 <[email protected]>

* Record the containment hardening under the packet's § 2.3, ticking nothing

The ladder is #587's and its box stays as #587 left it. One dated line names
PR #589, the ten escapes it measured against main's reader, and the seven that
let a declaration be accepted from outside its superseding bundle's entry — so
the packet's record says what was hardened over it rather than leaving the
repair discoverable only from a PR conversation.

Group 5's archive is not this PR's.

Lane: openxfactory-1d
Co-Authored-By: Claude Fable 5.1 <[email protected]>

* Take round 1: a fence opener out of phase is worse than no fence tracking

Codex P1 — a backtick fence whose info string carries a backtick opens no
CommonMark fence, so the reader ran ONE FENCE OUT OF PHASE with the document:
the next bare fence closed its fictitious block while opening a real one, every
boundary between them was swallowed as code, and a declaration inside the real
block was read as a record. Measured: read AND accepted, from under a `## Notes`
heading, inside a code block — both halves of the containment rule defeated by
one line. The opener splits in two because the rule is not shared: a backtick
fence's info string may not contain a backtick, a tilde fence's may. The test
carries controls on both sides, a one-sided fix stopping tilde fences from
opening at all.

Codex P2 — a run of dashes below a thematic break was read as a Setext
underline, refusing a correctly contained declaration. Taken for that shape,
which CommonMark is unambiguous about, plus a Setext underline as the preceding
line. The broader ask is refused with a measurement: every block form added to
the exclusion list moves the reader toward UNDER-closing, whose failure is
silence about the finding this family exists to raise, where over-closing's
failure is one error standing beside the superseded error and quieting nothing —
and indented code is the case against a blanket exclusion, since an indented
line cannot interrupt a paragraph and the dashes below it genuinely are an
underline. The residue is stated in `_setext_content`'s docstring.

Copilot — the live-read test's `len(read) == 1` reds for the wrong reason the
day a second number is spent. The declaration is looked up by subject now, and
the anti-over-read half the count was standing in for is stated properly: the
reserved form spliced INSIDE the live document's own fenced block must add no
declaration.

Neither shape exists in the live changelog — zero thematic breaks, zero backtick
fence lines CommonMark would decline to open — so both were latent, and are
recorded as latent rather than banked as harmless.

Family file 73 -> 76; `tests/doc-health` 1438 -> 1441 passed, zero failures.

Lane: openxfactory-1d
Co-Authored-By: Claude Fable 5.1 <[email protected]>

* Take round 2: ask what the previous line DID, not what it looks like

Codex P1 — a hole round 1's own fix opened, and the third time on this guard
that a fix has been the next finding's cause. That fix excluded any line
MATCHING the underline pattern; in `## contract-v3.0` / `===` / `---` the `===`
matches while acting as nothing — no paragraph precedes it, so CommonMark makes
it paragraph text and the `---` below it a real Setext H2. Excluding it by
syntax lost the boundary and the entry stayed open. Measured: ACCEPTED.

The repair is structural rather than another exclusion. `_setext_content` is
gone; `_paragraph_line(line, closes, opaque)` takes the boundary decision the
caller already made, and the loop carries a boolean forward instead of the
previous line's text — so `_entry_boundary(line, after_paragraph, in_fence)`
cannot be handed a syntax question in place of a state one. An underline that
really underlined sets `closes` and ends the paragraph; one that only looked
like an underline does not. All five Setext-family shapes are now measured
together rather than one at a time, which is what the previous two rounds each
failed to do.

Copilot — the live-corpus anti-over-read guard was VACUOUS. It spliced at a byte
offset into the fence opener line, so the reserved opener landed after ```y and
was unreadable for a reason that had nothing to do with fences; the assertion
passed whatever the fence rule did. Spliced as a real line at the start of the
fenced content now, and the non-vacuity is itself asserted: the same line with
the fence opener removed MUST be read. That assertion is the one that would have
caught this, and it fails loudly for any future splice landing somewhere
unreadable.

Family file 76 -> 78; `tests/doc-health` 1441 -> 1443 passed, zero failures.

Lane: openxfactory-1d
Co-Authored-By: Claude Fable 5.1 <[email protected]>

* Take round 3: an ATX marker is followed by a space or a tab, not by \s

Codex P1 — Python's `\s` matches U+00A0 and the other Unicode spaces, while
CommonMark's ATX opening sequence admits only a space, a tab or end of line. A
`##<U+00A0>contract-v3.0` line is paragraph text to every renderer and opened a
FICTITIOUS entry here; measured with a base entry of contract-v2.9 so that
"opened a fictitious entry" and "closed the real one" are distinguishable, a
declaration below it was ACCEPTED under a heading that does not exist. Fixed in
all three patterns and in both space classes of the entry heading — the
separator after `##`, and the one after the version token so a name followed by
U+00A0 is not read as a complete token.

THE REGRESSION TESTS AIM AT THE HOLE THIS FIX COULD OPEN, not only at the one it
closes. Narrowing `\s` invites narrowing it too far, so a TAB separator is a row
of its own and must still OPEN, and a tab-separated H1 must still CLOSE.

And one hole the fix opened in the TEST rather than the code, closed with it:
three rows turn on a literal U+00A0, which an editor or a formatter can
normalise to an ordinary space — after which they would pass for the wrong
reason, exercising a plain heading and proving nothing. Written against a named
NBSP constant now, because an escape cannot be normalised silently.

Latent, not live: the changelog carries zero ATX lines using non-space/tab
whitespace.

Family file 78 -> 83; `tests/doc-health` 1443 -> 1448 passed, zero failures.

Lane: openxfactory-1d
Co-Authored-By: Claude Fable 5.1 <[email protected]>

* Take round 4: split on CommonMark's line endings, not on Python's

Codex P1 — round 1's class one layer down, in the line splitter rather than in
the opener pattern. `str.splitlines()` breaks on eight separators CommonMark
does not, so an INVALID backtick opener like ```bad<U+2028>`info — one line to
CommonMark, its info string carrying a backtick — reached the reader as a VALID
opener plus content. One fence out of phase again: the `## Notes` boundary
swallowed as code, the next bare fence closing the fictitious block while
opening a real one, and the declaration inside the real block read under the
earlier entry. Measured ACCEPTED for all eight of U+2028, U+2029, U+0085, VT,
FF, FS, GS and RS. Now split on `\r\n|\r|\n` and nothing else.

THE CONTROL IS AIMED AT THE HOLE THIS FIX OPENS, which on this guard is not
hypothetical: narrowing the splitter invites narrowing it to `\n` alone, and a
CRLF document would carry a stray `\r` at the end of every line — defeating the
fence closer's `[ \t]*$`, the ATX lookahead's `[ \t]|$` and the Setext
underline's anchor all at once and silently. LF, CRLF and lone CR are each
pinned in BOTH directions, because a splitter that broke only the reading half
would look correct from the accepting half.

`_lines` drops a single trailing empty element so a document ending in a newline
keeps the line count a human repairing a declaration would count. The eight
separators are named in a table rather than typed as literals, for the reason
NBSP was named in round 3; the test file now carries zero literal exotic
characters, checked.

Latent, not live: the changelog carries none of the eight.

Family file 83 -> 94; `tests/doc-health` 1448 -> 1459 passed, zero failures.

Lane: openxfactory-1d
Co-Authored-By: Claude Fable 5.1 <[email protected]>

* Take round 5: one opaque-region machine, and the out-of-phase class closes

Codex P1 — a fence-shaped line inside a RAW HTML BLOCK is HTML content, and
treating it as a delimiter put the reader one fence out of phase for the third
time by a third route. Measured ACCEPTED for all eight CommonMark kinds that can
hold such a line: <pre>, <script>, <!--, <?, <!DOCTYPE, <![CDATA[, <div>, and
any complete tag alone on its line.

ONE STATE MACHINE decides both regions, not two side by side, and that is
load-bearing: a fenced block and a raw HTML block are mutually exclusive in
CommonMark — a fence-shaped line inside an HTML block is content, an HTML opener
inside a fence is code — so two machines would each be wrong about the other's
region. Both directions are pinned.

OVER-APPROXIMATION IS ITS OWN ESCAPE, in the same silent direction, and that is
the hole this fix could open: prose read as HTML content would make a region
opaque, swallow a real `## Notes` boundary, and leave a declaration holding an
entry it is not inside. So kind 6 is CommonMark's own tag list and nothing
wider, kind 7 demands a complete tag and may not interrupt a paragraph, and
`<not a tag` opens nothing. Five rows pin that direction, plus the kind-6/7
asymmetry, plus the case where over-closing would refuse a correctly contained
declaration.

AND THE CLASS TERMINATES HERE. A phase error needs a line the reader calls a
fence delimiter and CommonMark does not, at column 0-3. Every construct that can
hold one is now accounted for: another fence (this machine's state), a raw HTML
block (these eight kinds), an indented code block (content at column 4+, which
every `^ {0,3}` here excludes), and a block quote or list item (content carries
its marker, and a fence cannot be lazily continued). The reverse error — missing
a real fence at column 0-3 — cannot happen either, because `_fence_opener` now
rejects exactly what CommonMark rejects there.

Copilot — the carried evidence transcripts published PR #584's gate counts
unmarked, so the evidence set read as internally inconsistent (85 vs 84 openspec
items, 32 vs 31 active changes). Each carried transcript now names its BASE in a
provenance banner, with a table of the three readings that differ by base rather
than by disagreement, and points at this branch's own gates. Kept unedited
otherwise, because a transcript that gets rewritten stops being one.

Family file 94 -> 110; `tests/doc-health` 1459 -> 1475 passed, zero failures.

Lane: openxfactory-1d
Co-Authored-By: Claude Fable 5.1 <[email protected]>

* Take round 6: an HTML block ends on its own line and on its own tag

Both findings are holes ROUND 5's fix opened, and both bots found both
independently within twenty-five minutes — two reviewers agreeing on a precise
mechanism being a much stronger signal than either alone.

A kind 1 to 5 block may open AND close on ONE line. Returning the new state
without testing that line kept the block open past its own close: measured,
`<!-- first -->` stayed open THROUGH a real `## Notes` heading and used
`<!-- second -->` as its delayed close, so the declaration kept the earlier
entry and was ACCEPTED. Reproduced for comment, declaration, processing
instruction, CDATA and <pre>. The opening line is now tested against its own end
condition.

And a kind-1 block ends on ITS OWN tag, not on any of the four. A shared closer
let </script> end a <pre> block, after which lines CommonMark still reads as
<pre> content stopped being opaque — a fence-shaped line there put the reader
back out of phase and a declaration was ACCEPTED. The state carries the tag that
opened the block.

Both fixes ship with the control for the hole THEY could open: an unclosed <pre>
runs to end of document, pinned along with why that is acceptable (every
boundary after it is lost, but so is every declaration, so the superseded error
stands rather than being quieted); and a boundary after a MISMATCHED closer is
still content, so a declaration below the real </pre> is still inside the entry
— over-closing there would refuse a correctly contained declaration.

Family file 110 -> 117; `tests/doc-health` 1475 -> 1482 passed, zero failures.

Lane: openxfactory-1d
Co-Authored-By: Claude Fable 5.1 <[email protected]>

* Take round 7's floor finding and Copilot's quickstart finding

Codex P2 — a below-floor SUBJECT left only the orphan branch of the refusal
sweep and then continued through the rest of the ladder. Measured: a legacy
repository declaring `contract-v1.6` and naming it spent emitted a `live-bundle`
error, and malformed and wrong-entry below-floor declarations emitted theirs —
each on an inventory path for a bundle this family does not grade. The
enforcement floor says the family reports NOTHING about a bundle under
contract-v1.7, so such a declaration disposes nothing whatever its shape and now
leaves the whole sweep. This also makes the floor rule ONE rule with F8's:
a repository with nothing in scope is answered exactly as it always was.

THE HOLE THE EXCLUSION COULD OPEN IS PINNED IN BOTH DIRECTIONS. `_below_floor`
is false for a name of the wrong SHAPE and for no name at all, and that gap is
the distinction: `contract-v1.3` is an out-of-scope NAME and leaves the sweep,
while `not-a-bundle` and a line carrying the reserved opener and nothing else
are DEFECTS and stay in it.

Copilot — the carried quickstart could not run. It was written against PR #584's
reader (`read_spent_declarations`, `spent_refusal`, `SpentDeclaration.ruling`/
`defect`/`count`), none of which exists in the implementation that landed. A
quickstart that cannot run is worse than none because it looks like a reference,
so it is rewritten against the real module with EVERY BLOCK RUN AND ITS OUTPUT
PASTED, and it gains a fifth block showing the containment rule as a table of
seven placements. Two stale claims go with it: the declaration is at changelog
line 389, not 374, and this branch carries no declared red.

Family file 117 -> 121.

Lane: openxfactory-1d
Co-Authored-By: Claude Fable 5.1 <[email protected]>

* VARIANT A (DRAFT, unpushed): round 7's two HTML-pattern findings

Codex round 7, taken in part and refused in part, both with measurements.

TAKEN — CommonMark's whitespace class after a kind-1 tag name is space, tab, VT
and FF, and `[ \t>]` missed the last two. That gap became reachable only when
ROUND 4 stopped splitting lines on VT and FF, so it is round 4's own tail:
`<pre<VT>x>` is an opener CommonMark recognizes, the fence-shaped line inside
the block opened a fictitious fence, and the declaration below was ACCEPTED.
Measured for both characters. The same class is widened in the kind-6 and
kind-7 patterns for consistency.

TAKEN — a kind-4 declaration needs an UPPERCASE letter. GFM (CommonMark 0.29,
which is what renders this document on GitHub) says `<!` followed by an
uppercase ASCII letter; CommonMark 0.30 later relaxed it. Accepting `<!doctype`
made this reader MORE OPAQUE than the renderer, so a real `## Notes` was
swallowed and the declaration below kept an entry it is not inside. The control
for the hole this narrowing could open ships with it: uppercase must still open.

REFUSED, with the measurement — U+00A0 is NOT CommonMark whitespace (the spec's
whitespace character is space, tab, newline, VT, FF or CR), so `<pre<U+00A0>x>`
is not a kind-1 opener and the lines below it are ordinary prose. A reader that
treated it as one would be MORE OPAQUE THAN ANY RENDERER, which is the
under-closing direction this guard exists to close. The reader's current answer
for that line is already the CommonMark-correct one, and it is now pinned as
such rather than left to be re-found.

Family file 121 -> 127.

Lane: openxfactory-1d
Co-Authored-By: Claude Fable 5.1 <[email protected]>

* Revert round 6's matching-closer rule: it was an escape, not a fix

CommonMark's end condition for a kind-1 HTML block reads, in words: "line
contains an end tag </script>, </pre>, </style>, or </textarea>
(case-insensitive; IT NEED NOT MATCH THE START TAG)". Round 6 shipped the
opposite.

Codex and Copilot INDEPENDENTLY asked for a matching closer, twenty-five minutes
apart, and their agreement was recorded as corroboration. Both were wrong on the
specification, and the fix they asked for INTRODUCED the escape class it claimed
to close: requiring </pre> made this reader MORE OPAQUE than CommonMark, so a
real `## Notes` heading after a `</script>` was swallowed and the declaration
below it was ACCEPTED under an entry it is not inside. Measured at the pushed
head: entry='contract-v3.0'. After this revert: entry=None, refused, and the
superseded error stands.

It surfaced under a DIFFERENTIAL against a reference CommonMark implementation
over the 31 constructs this branch has touched — not from a bot round. Both bots
had reviewed the wrong fix on two later heads and neither retracted it. Bot
agreement is not evidence about a specification.

The differential's other two disagreements are not defects: `###` not closing an
entry is deliberate and load-bearing (the live declaration sits inside one), and
`<pre<U+00A0>x>` is a case where markdown-it and cmark-gfm disagree with each
other — this reader follows the spec letter and GitHub's renderer, and the
direction is over-closing rather than an accept.

The instrument itself needed fixing first, and that is recorded: the first
harness invented five of the six disagreements it reported, and two probe files
had literal U+00A0 and U+2028 normalised to plain spaces on write — the round-3
lesson arriving again, in the probes rather than the tests.

Family file 127 (net: one test replaced by one that asserts the spec's rule over
all sixteen opener/closer pairs).

Lane: openxfactory-1d
Co-Authored-By: Claude Fable 5.1 <[email protected]>

* Take Copilot's naming nit: commonmark, not commonmarks

The neighbouring test reads `..._commonmark_does_recognise_still_work`, and
one possessive out of step makes grep and failure output inconsistent for no
reason. Rename only; no behaviour.

Lane: openxfactory-1d
Co-Authored-By: Claude Fable 5.1 <[email protected]>

* Rule B: the reader refuses raw HTML instead of parsing it — one contested error, nothing read below the opener

RULED BY BRETT HEAP, 2026-09-03, on PR #589: *"VARIANT B — fail closed on raw
HTML. The reader parses NO raw-HTML blocks. Fenced code stays the ONLY opaque
region. A top-level raw-HTML block opener in `contracts/CHANGELOG.md` (any
CommonMark kind 1-7 start condition, at <=3 leading spaces, outside a fence)
makes the family emit ONE `contested` `error` on the changelog naming the line,
read NO declaration below that line, and leave declarations ABOVE it standing;
the superseded-and-never-published `error` for any bundle whose declaration was
below the opener stands beside it."*

WHAT IT DECIDES BETWEEN. Rounds 5 to 8 tried to MODEL CommonMark's raw HTML
blocks, because a ```-shaped line inside one is HTML content and a reader that
calls it a fence delimiter runs one fence out of phase with the document. Each
fix produced the next finding — the single-line block, the mismatched kind-1
closer, the opener's whitespace class, the case of the kind-4 letter — and then
a differential against a reference CommonMark implementation found that round
6's fix, which BOTH bots had asked for independently and neither retracted, had
itself introduced a live containment escape. Fidelity here means a Markdown
block parser inside a doc-health family, which is a change with a proposal and
not a line in a review round.

WHY REFUSING IS STRONGER THAN PARSING. A construct the reader cannot parse can
never quiet the superseded-and-never-published `error`, whatever a renderer
makes of the lines below it — fail-closed BY CONSTRUCTION rather than by
fidelity, needing no oracle outside the review loop to stay true. The error
direction inverts with it: under the fidelity reading a line of prose mistaken
for HTML swallowed a boundary SILENTLY; here an over-recognized line produces a
VISIBLE error an author repairs by moving one line.

SO TWO NARROWINGS THIS BRANCH HAD ALREADY MADE ARE REVERSED, deliberately and
on the record. Kind 4 admits any ASCII letter again (CommonMark 0.30's rule, a
superset of GFM 0.29's uppercase-only, written as an explicit class rather than
left to the `re.I` flag), and kind 7 is no longer gated on whether a paragraph
is open. Both were right while over-opacity was the danger; both are the unsafe
direction now, because an opener this reader fails to recognize is one it reads
PAST. The patterns stay CommonMark's wherever CommonMark is unambiguous — a
finding a reader cannot predict is its own defect.

AND THE COST IS STATED RATHER THAN HIDDEN: three of the seven probe documents
are ones a renderer reads as containing a valid, correctly contained
declaration, and the family now declines to read them. `contracts/CHANGELOG.md`
has never carried raw HTML and a live test asserts it, so the rule costs this
estate nothing today and reds the day that changes.

REMOVED — 11 test functions, 29 parametrized cases, of raw-HTML-fidelity
behaviour, with the code they covered (`_HTML_TYPE1_OPEN`, `_HTML_OPENERS`,
`_HTML_CLOSERS`, `_HTML_TYPE7`, `_html_opener`, `_html_closed`,
`_opaque_state`): the eight-kind opacity table, the over-approximation table,
the kind-6/kind-7 asymmetry, the declaration-inside-`<pre>` rule, the
fence/HTML mutual exclusion, the single-line-block table, the sixteen-pair
kind-1 closer rule, the unclosed-block-to-EOF trade, and round 7's three
whitespace-and-case tests. `_fence_state` is restored, because fences are again
the only region there is.

ADDED — 7 test functions, 22 cases: a twelve-row opener table each row carrying
its own control (the identical declaration WITHOUT the opener is accepted), a
five-row not-an-opener table, the fenced-example rule, declarations-above-the-
opener, the kind-7 widening, the reported `error` asserted in the ruling's own
words with the superseded `error` beside it and no `info` anywhere, and a live
check that this estate's changelog carries no raw HTML at all.

Docs: plan.md gains decision record D7; evidence/hardening-red-first.md gains
section L with the ruling verbatim, the seven-document before/after probe and
the two reversed narrowings (lettered L because the differential took K);
docs/doc-health.md gains one paragraph stating the fail-closed rule; the
quickstart gains section 5 for the refusal, with every block re-run — and a
rendering defect fixed in its own section 3, where a literal triple-backtick
inside a fenced block closed that block early on GitHub.

Family file 127 -> 120; `tests/doc-health` 1492 -> 1485 collected, 1485 passed,
zero failures — 1411 (`main`) - 46 + 120.

Lane: openxfactory-1d
Co-Authored-By: Claude Fable 5.1 <[email protected]>

* Take both of Copilot's round-10 findings: the ruling's date, and a doubled word in a user-facing skip

BOTH TAKEN, and both are exactly the class of finding a bot is better at than
the author of the diff.

THE RULING DATE — the raw-HTML block comment in the reader, and the matching
header in the test file, both carried 2026-09-02, which is the date of the
`declare-spent-bundle-state` ratification and of the SPENT declaration's own
`RULED BY` line, not of the variant-B ruling. The ruling is 2026-09-03. The
comment is the justification a future reader will find first — plan.md § D7,
evidence § L and the quickstart all say 2026-09-03, so this was the one place
the archaeology would have gone wrong.

THE DOUBLED "for" — this branch's own, not `main`'s. `main` reads *"a SPENT
declaration could not be looked for — which is not the same fact as there being
none"*; the batch-read repair added the bundles it declined to answer for and
produced *"could not be looked for for contract-v2.0"*. It is USER-FACING skip
text, so it reads as a typo rather than as a fact about a read. Rewritten to put
the bundles where the sentence already had a slot: *"so a SPENT declaration for
contract-v2.0 could not be looked for — which is not the same fact as there
being none"*. The two existing assertions on this message are on the parts that
carry meaning (the tip read, "not the same fact as there being none", and the
bundle name), so the rule is unchanged and still pinned.

`tests/doc-health` 1485 passed, zero failures; family file 120.

Lane: openxfactory-1d
Co-Authored-By: Claude Fable 5.1 <[email protected]>

* Take Copilot's round-11 finding: a blank line is spaces and tabs, not str.strip()

`_paragraph_line` used `not line.strip()` to detect a blank line. `str.strip()` is
Python's and strips every Unicode space; CommonMark's blank line is "a line
containing no characters, or a line containing only spaces (U+0020) or tabs
(U+0009)". MEASURED: a line holding only U+00A0 (also U+2028, VT, FF) is
PARAGRAPH CONTENT to CommonMark, so a run of `=` below it is a Setext underline
that CLOSES the entry; read as blank, the underline was not recognized, the
entry never closed, and a declaration below it was ACCEPTED under an entry it
is outside of — an UNDER-CLOSING escape, the direction this guard exists to
close. New `_blank()` = `not line.strip(" \t")`; positive tests for U+00A0,
U+2028, VT, FF alone and inside a paragraph; control that spaces/tabs are still
blank. Evidence § M; quickstart block re-run.

Gates at this commit: family 128 passed; tests/doc-health 1493 passed;
sequenced_after 118 (33 active, no pin moved); openspec --all --strict 86/86;
proposal-support verify ok; live declaration reads entry contract-v3.0.

Lane: openxfactory-1d
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LAWoydPqwc9TxqDb8bWcWy

* Take Copilot's round-12 comments: the attribute token uses CommonMark's whitespace class, and the splice test uses the parser's line splitter

The kind-7 unquoted attribute-value token in `_HTML_ATTR` was still
`[^\s"'=<>` `]+`, Python's whitespace class, even though every other
whitespace slot in the same pattern (the separator before an attribute
name, and around `=`) had already been narrowed to CommonMark's
`[ \t\v\f]` in an earlier round, and the comment above the pattern
already claimed that class for the whole thing. Measured on head
`c1b6eb3e` with a kind-7-only tag name (`div` is a kind-6 tag and
matches on the name alone regardless, so it cannot exercise this):

  before: _HTML_OPENER.match('<mytag class=a\xa0b>') -> None
  after:  _HTML_OPENER.match('<mytag class=a\xa0b>') -> a Match

Direction, stated honestly against Copilot's "unsafe direction" framing:
a missed opener does not make the reader ACCEPT anything. It just keeps
reading the lines that follow as ordinary prose instead of stopping;
if one of those lines is heading-shaped, the reader closes an entry on
it the way it would for any other heading-shaped line, which can only
move a real declaration OUT of the entry it belongs in — an over-closed
FALSE REFUSAL, never an accept. So this is a consistency defect against
the module's own stated whitespace rule, not a containment escape, and
it is fixed for that reason regardless of which direction it fails in.

Also switched the live-changelog splice test off `text.splitlines()`
(which breaks on the same eight separators round 4 removed from the
parser's own `_lines`) onto `rtp._lines(text)`, so the splice lands on
a line boundary the parser actually recognizes.

Added one parametrized test (7 cases) pinning the fixed token class:
U+00A0 and U+2028 stay inside an unquoted value (kind-7 opener,
recognized); a plain letter run is the control; a real space, tab, VT
or FF splits the token, and a bare digit right after the split can
never open a new attribute name, so the opener is refused.

Gates: family file 135 passed (128 -> 135), tests/doc-health 1500
passed 0 failed (1493 -> 1500), tests/sequenced_after 118 passed.
Catch-up merge of origin/main (3c237cd, update-standards-body-current-
publications) included; family file re-run clean after the merge.

Lane: openxfactory-1d
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LAWoydPqwc9TxqDb8bWcWy

---------

Co-authored-by: Claude Fable 5.1 <[email protected]>
Co-authored-by: openRepoShape CI <[email protected]>
brettheap added a commit that referenced this pull request Sep 3, 2026
…e follows the HARDENED reader, and the pin is re-derived rather than adjusted

PR #611 was authored 2026-09-03T03:55Z by a sibling session that then ended,
against the `main` of 2026-09-02 (`ee294f9f`). Two commits landed on `main`
before it could merge and it went CONFLICTING; lane openxfactory-1d adopted it
on the owner's word and fixes it forward here. Nothing about the archive act is
redone: the promotion, the README move and the `docs/doc-health.md` retarget are
#611's and stand.

## What landed on `main` in between, and why each one matters here

- PR #593 (`3c237cd0`) ADOPTED `update-standards-body-current-publications` as
  an ACTIVE change and re-baselined three `sequenced_after` pins.
- PR #589 (`6da1e1f5`) HARDENED the SPENT containment guard on top of the
  realization #587 landed, and recorded that hardening under this packet's
  § 2.3 without re-ticking anything.

## Conflict resolutions, each taken deliberately

`openspec/changes/declare-spent-bundle-state/tasks.md` — a delete/modify shape
that git's rename detection resolved into the archived copy, and the result was
CHECKED rather than trusted: the archived
`openspec/changes/archive/2026-09-03-declare-spent-bundle-state/tasks.md` now
carries `main`'s POST-#589 file, § 2.3's thirteen-line hardening note included,
with #611's group-5 ticks re-applied over it.

`tests/sequenced_after/test_sweep.py` — the MOVEMENT LOG conflicted: #611's
entry against #593's two. #611's entry is REPLACED rather than kept beside them,
because the two contradict on the active/archived split, and the replacement
says so in terms. Every pin was RE-MEASURED on both trees with
`python3 scripts/validate-sequenced-after.py . --sweep` rather than adjusted by
arithmetic: `origin/main` at `6da1e1f5` reads `34 active + 124 archived` = 158
change ids, `108` co-modified, `50` sole modifiers, `21 / 13` active
co-modified/sole; this merge reads `33 active + 125 archived` = 158, `108`,
`50`, `20 / 13`. EXACTLY ONE PIN MOVES — `active_co_modified` 21 -> 20 — and
`main`'s own reading is the by-exclusion control, this archive being the only
difference between the two trees. #611's "32 active + 125 archived = 157" prose
was arithmetically stale, not wrong in its reasoning: both addends were one
lower than the corpus now carries, and the TOTAL-unchanged invariant it was
making survives the correction.

`README.md` and `docs/doc-health.md` — both auto-merged and both verified:
#593's new ACTIVE row for `update-standards-body-current-publications` is kept
AND `declare-spent-bundle-state` moves from Active to Archived the way #571 did;
`docs/doc-health.md` carries BOTH sides — #589's two new containment paragraphs
and #611's retarget of the one stale link to the archived path — with the family
count sentences untouched.

## Task 3.1's tick is REVERTED, and that is the one substantive change here

#611 ticked 3.1 on the reading that the DECISION the box posed was made. What
the box names is the PARAGRAPH in `docs/contract-versioning-policy.md`, which is
deliberately owed to the next contract cut under the owner's 2026-09-02 ruling
to CARRY #577's drift. It is un-ticked, #611's note is kept in full, and one
dated sentence records the revert and its reason. The box travels OPEN into the
archived packet the way 3.2 does. Group 5's ticks stand and gain the #589
evidence: run `33719770363` (`success`) on `main` at `6da1e1f5`, the Speckit
feature `specs/027-spent-bundle-state/`, and the family file at 46 -> 135 tests.

## § 5.2 re-verified on the post-#589 tree rather than carried forward

The archived delta's `### Requirement: Release-tag publication` block and the
promoted requirement in `openspec/specs/doc-health/spec.md` were extracted from
the MERGED tree and diffed: ZERO lines of difference, 392 lines, 24 scenarios.
Against `main`'s pre-promotion requirement (129 lines, 11 scenarios): 263 lines
added, ZERO REMOVED, and the canon file's whole-file diff is `263
insertions(+), 0 deletions(-)` over 43 requirements on both sides. #589 touches
`scripts/doc_health/`, `tests/doc-health/` and `docs/doc-health.md` and NOT the
canon spec, so the block could not have moved — checked anyway.

## Gates, on the merged tree

`OPENSPEC_TELEMETRY=0 openspec validate --all --strict`: 86 passed, 0 failed —
one fewer than `origin/main`'s 87, which is the archived change leaving the
active corpus. `python3 scripts/validate-sequenced-after.py .`: passed (33
active, 1 declaring). `pytest tests/sequenced_after`: 118 passed.
`pytest tests/doc-health -p no:cacheprovider`: 1500 passed, 0 failed.
`pytest tests/doc-health/test_release_tag_publication.py`: 135 passed (46 at
#587's `3fa222f3`). doc-health `--single-repo` before and after: 55 findings on
both, 6 critical / 6 error / 29 warning / 14 info on both, and the two finding
lists BYTE-IDENTICAL once the repo-identity string is normalized. No
`health/dispositions.yaml` row is owed and no carriage-ledger or
`modified-block-currency` test names this change.

Lane: openxfactory-1d
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LAWoydPqwc9TxqDb8bWcWy
brettheap added a commit that referenced this pull request Sep 3, 2026
…en (run 33654163291), decisions affirmed, promoted (#611)

Brett Heap ordered the archive 2026-09-02 after affirming the four orchestrator
decisions raised on the realization (PR #587 comment). Group 5 of tasks.md is
"open until the merge it follows exists" — that merge landed as PR #587
(squash `3fa222f3f9e1486dc9618d25d0a665f276fbe964`, merged `--admin`
2026-09-02T16:19Z per Brett Heap's ruling "merge the realization on the
dispositioned red") — so the archive act follows here.

## Tasks ticked

- 2.9: was deliberately unticked pending confirmation that `main`'s own
  `pytest-suite` goes green at the squash. Confirmed: run `33654163291`
  (`success`, head `3fa222f3`) is fully green, the previously-red
  `test_this_repository_reads_zero_and_the_probe_can_fire` included, unedited.
- 3.1: the box's own question — land the policy-side paragraph in
  `docs/contract-versioning-policy.md` now, or leave the routing deferred to
  the next contract cut per OD-6 — was "awaiting Brett's affirmation". Brett
  affirmed the deferral on PR #587 (comment, 2026-09-03T02:49:08Z): "deferred
  to the next cut per OD-6's shape argument: affirmed". Ticked because the
  decision is made, NOT because the paragraph was written — it was not, and
  is not owed by this archive.
- 5.1, 5.2: the archive act itself, and its promotion verification (below).

3.2 is left OPEN: it names a future event (the editorial drift `info` and the
policy `error` clearing on their own at the next contract cut), not a task
this act can discharge, and travels open into the archived packet.

## Archive method

The wrapper (`scripts/proposal-support.py . archive`) was tried first and
refused: `re.search(r"^- \[ \]", tasks.md)` is unconditional on which box, and
task 3.2 is genuinely, correctly open. Ticking it to satisfy the wrapper would
be writing a false completion. Followed the precedent
`govern-sibling-added-modified-deltas` set (PR #571, squash `3bcde7e2`):
`OPENSPEC_TELEMETRY=0 openspec archive declare-spent-bundle-state --yes`
(task status 21/24, 3 incomplete boxes named, continuing on `--yes`).

## Promotion verified per requirement, byte-for-byte

`openspec/specs/doc-health/spec.md` sliced on every `### Requirement:` header,
before and after the archive commit: all 42 requirements other than
`Release-tag publication` are byte-identical, and the promoted `Release-tag
publication` body is byte-for-byte identical to the delta's own requirement
text (392 lines, zero diff) — MODIFIED replaced the requirement wholesale.
`git diff --stat` on the canon file: 263 insertions(+), 0 deletions(-),
consistent with the proposal's 11-of-11-scenario / one-`AND`-bullet claim.

## README and docs

Moved the entry from "Active changes" to "Archived changes" (top of the list,
archived 2026-09-03 being the most recent). Retargeted the one stale link
(`docs/doc-health.md:159`) from the active path to the archived one; no other
links under `docs/`, `README.md` or `contracts/` referenced the active path.

## Gates

`OPENSPEC_TELEMETRY=0 openspec validate --all --strict`: 85 passed, 0 failed
(85 items = 32 active changes + 53 specs, one fewer active change than
origin/main's 86 before this archive, as expected).

`python3 -m pytest tests/doc-health tests/sequenced_after -q`: 1529 passed, 0
failed (full clean run; an earlier run showed one apparent failure in
`test_the_report_moves_only_in_this_family_s_lines` that did not reproduce on
an isolated rerun or a second full clean run — a transient artifact, not a
regression from this archive).

`--single-repo . --family release-tag-publication`: 0 error, 1 `info`
(`contested`) on `contracts/releases/contract-v2.6.digests.yaml`, as expected.
`--family promotion-fidelity`: 0 findings.

## sequenced_after pin moved in the same commit

Archiving a co-modified ACTIVE change (this one, whose `## MODIFIED
Requirements` block over `doc-health`'s `Release-tag publication` requirement
is now canon) lowers `active_co_modified` while leaving the corpus-wide
`co_modified` untouched — the same shape #563's and #571's archives moved.
Re-derived with `python3 scripts/validate-sequenced-after.py . --sweep`:
32 active + 125 archived = 157 change ids (unchanged), 108 co-modified
(unchanged), 49 sole modifiers (unchanged), 20/12 active co-modified/sole
(`active_co_modified` 21 -> 20, `active_sole` unchanged at 12). MOVEMENT LOG
entry added in `tests/sequenced_after/test_sweep.py` naming which subject
moved and why.

No `health/dispositions.yaml` row is owed: the 2026-09-02 aggregation health
report (`opensoft/xFactory` `health/reports/2026-09-02.md`) carries no
contested finding keyed to `openspec/changes/declare-spent-bundle-state/...`.

Co-authored-by: Claude Fable 5 <[email protected]>
brettheap added a commit that referenced this pull request Sep 3, 2026
…611/#614/#602/#604: README both sides; corpus pin re-derived a third time

`main` moved seven merges past this branch's base `6da1e1f5` while PR #608
sat awaiting the convener's merge word — #611 (archived
`declare-spent-bundle-state`: realized #587 `3fa222f3`, `main` green run
`33654163291`, four orchestrator decisions affirmed, promoted), #614 (pins
one `--as-of` clock across the self-gate's two report renderings), #602
(re-points a stale workspace record instead of returning "reconcile by
hand"), #604 (closes the oversized-upload duplicate-minting hole), plus
three more (#601, #599, #603) that touch neither conflicted file. GitHub
could no longer build the test-merge commit. Force-pushing is forbidden
here, so this is a CATCH-UP MERGE and not a second rebase.

TWO FILES CONFLICTED. `README.md` auto-merged cleanly — main removed the
`declare-spent-bundle-state` active row and added its archive entry, and
this branch's `create-medxchart-overlay-boundary` row stands exactly as
this branch wrote it; the diff against `origin/main` is that one row and
nothing else.

`tests/sequenced_after/test_sweep.py` conflicted. MAIN'S PIN BLOCK AND
MOVEMENT LOG ARE THE BASE (`git checkout --theirs`, keeping every entry
main has, #611's included), and the pin is then RE-DERIVED ON THE MERGED
TREE rather than netted out of arithmetic:

  main at 2b0615d                  33 active + 125 archived = 158 change
                                    ids, 108 co-modified, 50 sole
                                    modifiers, 20 / 13 active
                                    co-modified/sole
  merged tree                       158, 109, 49, 21 / 12
  merged tree, with only
  .../create-medxchart-overlay-boundary/specs/domain-descendant-boundary/
  moved aside                       158, 108, 50, 20 / 13
  origin/main at 2b0615d           158, 108, 50, 20 / 13

The exclusion reproduces main's own reading EXACTLY, and main's own tree
confirms that reading independently, so this branch's single `## MODIFIED
Requirements` delta over `domain-descendant-boundary` is the whole of the
difference between the two trees a third time: +1 `co_modified`, +1
`active_co_modified`, -1 `sole_modifiers`, -1 `active_sole`, and
`change_ids` and `active` not at all. No fourth change moved in the
window; #614/#602/#604 touch no `openspec/changes/**/specs/**` delta
(confirmed via `git diff --stat 6da1e1f..2b0615d -- openspec/changes/`,
which shows only #611's own rename).

The five pinned values become, all measured and none inferred:

  sweep.co_modified          == 109
  sweep.active_co_modified   == 21
  sweep.change_ids - 1       == 157   (held through #611's archive and this
                                      ratification alike)
  sweep.sole_modifiers - 1   == 48    (was 49 on main after #611)
  sweep.active_sole - 1      == 11    (was 12 on main after #611)

The pin moves in the SAME COMMIT as the corpus, which is that test's own
protocol.

VALIDATION ON THE MERGED TREE:

  openspec validate create-medxchart-overlay-boundary --strict   valid
  openspec validate --all --strict                               86 passed,
                                                                 0 failed
                                                                 (86 items)
  python3 -m pytest tests/sequenced_after -q                     118 passed
  scripts/doc-health.py --single-repo .                          6 critical,
                                                                 6 error,
                                                                 29 warning,
                                                                 14 info,
                                                                 0 new
                                                                 regressions

The `--all --strict` total moved 87 → 86 because #611 ARCHIVED an active
change (`declare-spent-bundle-state`) without adding a replacement; this
packet adds none and moves it not at all. The doc-health report is
IDENTICAL to the same run on `origin/main` at `2b0615da` in every finding
and count once the checkout directory name is normalised — the two runs
differ only in one `staged-candidate-aging` trend line's `min=` day count
(0 vs 1, both `class="contested"`, no action required), a clock artifact
of the two runs' wall time and not a corpus difference. `grep -c
create-medxchart-overlay-boundary` on this branch's report is 0.

The two `review/` records still state the pre-merge readings and are
corrected in the commit that follows this one, before capture — capture
is the merge of PR #608, which has not merged.

Lane: openxfactory-max001

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_012RQo21NbWtnTVsb6JU67at
brettheap added a commit that referenced this pull request Sep 3, 2026
… a third time pre-capture (main at 2b0615d)

CAPTURE IS MERGE, AND NOTHING IS MERGED. `record-immutability` forbids editing a
`Status: record` document AFTER capture; capture is the merge of the pull
request that establishes it, and PR #608 has not merged. These two records have
therefore never been captured, and correcting them on the branch is lawful. No
capture happened before this merge and none is claimed.

WHAT MOVED, AND WHY. `main` moved seven merges past this branch's previous
catch-up point `6da1e1f5` — #611 (archived `declare-spent-bundle-state`:
realized #587 `3fa222f3`, `main` green run `33654163291`, four orchestrator
decisions affirmed, promoted), #614, #602, #604, plus #601/#599/#603, which
touch neither this file nor the corpus pin — and this branch took the second
catch-up merge at `5cf9a67b` in the commit directly below. Of the seven, only
#611 moves the live corpus pin, and it moves exactly one of its five readings:
archiving a co-modified ACTIVE change lowers `active_co_modified` alone,
leaving the corpus-wide `co_modified`, `sole_modifiers`, `active_sole` and
`change_ids` untouched.

COUNTS MOVED, AND ONLY COUNTS:

  openspec validate --all --strict        87/87 -> 86/86
                                          (#611 ARCHIVED one ACTIVE change
                                          without adding a replacement; this
                                          packet adds none and moves this
                                          total not at all)

  this branch's own sweep                 158 / 109 / 49 / 22 / 12
                                          -> 158 / 109 / 49 / 21 / 12
                                          (change ids / co-modified / sole
                                          modifiers / active co-modified /
                                          active sole)

  measured-by-exclusion baseline,         158 / 108 / 50 / 21 / 13
  which is main's own reading             -> 158 / 108 / 50 / 20 / 13

so this packet's contribution, restated from main's newer baseline, still
reads `co_modified` 108 -> 109, `active_co_modified` 20 -> 21, `sole_modifiers`
50 -> 49 and `active_sole` 13 -> 12 — the same +1 / +1 / -1 / -1 shape it has
carried through every re-derivation, with `change_ids` and `active` still
moving not at all.

MEASURED BY EXCLUSION, NOT INFERRED. The baseline above was proved by moving
`openspec/changes/create-medxchart-overlay-boundary/specs/domain-descendant-boundary/`
aside on the merged tree and re-running
`python3 scripts/validate-sequenced-after.py . --sweep`, and independently
confirmed by running the same sweep on `origin/main` at `2b0615da` itself,
which prints the same 158 / 108 / 50 / 20 / 13.

NOTHING ELSE IN THE RECORDS CHANGED. Beyond those counts and the `Captured:`
header naming the third tree, no governance statement, no evidence block, no
console output, no finding and no citation moved. The full account is
`verification-2026-09-03.md` § 9's "RE-DERIVED A THIRD TIME" paragraph and the
matching line added to `ratification-2026-09-03.md`'s corrected-pre-capture
paragraph.

Lane: openxfactory-max001

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_012RQo21NbWtnTVsb6JU67at
brettheap added a commit that referenced this pull request Sep 3, 2026
…te's 3.1, owed at this cut

The obligation-side half of declare-spent-bundle-state task 3.1, deliberately
left owed to the next contract cut under OD-6's shape argument and affirmed
there by Brett Heap on PR #587 (2026-09-03T02:49:08Z). This is that cut.

WHAT #577 ALREADY DISCHARGED AND IS NOT RE-AUTHORED HERE: the consumer-facing
record that contract-v2.6 is superseded and not dischargeable. That lives in
this same document as Instance Six and is cross-referenced, not restated --
"two records of one measurement is how they drift apart". Instance Six RECORDS
the supersession; the new subsection DEFINES the state, which is precisely what
#577 declined to do ("No sentinel is invented ... Building one here would be
exactly the failure that check exists to catch").

Placed as a ### subsection of ## Immutable Tag Correction, LAST in that section
-- after ### contract-v1.36 Was Moved, whose opening sentence says "the rule
immediately above" and would have been broken by an insertion between it and
its parent. It sits beside Immutable Tag Correction because the SPENT remedy IS
that section's remedy for a defective release applied one step earlier in the
lifecycle, and because its "its version number is never reused" is the sentence
the v2.6 disposition leans on.

The paragraph states, quoting openspec/specs/doc-health/spec.md
### Requirement: Release-tag publication rather than paraphrasing it where the
wording carries weight: the third state between published and owes-a-tag;
entry ONLY by explicit declaration, never by silence, age or any absence; the
declaration's home in contracts/CHANGELOG.md inside the SUPERSEDING bundle's
own entry, in the reserved single-line form, with the opener reserved and an
incomplete line malformed rather than prose; that a bundle cannot declare
itself spent; the successor guard in all three of its conjuncts (cut,
published, strictly later); the three severities -- info accepted, warning
provisional, error refused with the superseded error standing beside it; and
that the number is never reused while the manifest, the inventory and the
spent bundle's own entry are left exactly as written.

The reserved form is shown as a 4-space indented code block, per the
requirement's own reason for doing so. Measured, not assumed: zero lines of
this document begin with the reserved opener, and the family reads only
contracts/CHANGELOG.md in any case (line.startswith, no lstrip).

doc-health --single-repo vs the pre-edit tree at the same origin/main
(0f1edc0): 6 critical / 4 error / 29 warning / 13 info on both, no family
gains or loses a finding, release-tag-publication included.

Lane: repo-shape
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01HGKwdQsmvRZx4fGQESdFGZ
brettheap added a commit that referenced this pull request Sep 3, 2026
…the inventory over the bytes as cut

The changelog half first, then the inventory LAST, because the inventory
digests the changelog.

contracts/CHANGELOG.md, inside the existing ## contract-v3.1 entry and
immediately after the paragraph disclosing #577's between-cuts drift: three
paragraphs saying that docs/contract-versioning-policy.md moves a SECOND time
at this cut and why. The first movement is #577's bytes carried forward
unaltered (that paragraph is not edited); the second is
declare-spent-bundle-state task 3.1's SPENT-state definition, routed by OD-6 to
"the next contract cut" and affirmed there by Brett Heap on PR #587
(2026-09-03T02:49:08Z). One rebuilt inventory re-baselines both, which is what
discharges that packet's § 3.2 -- this changelog's editorial drift info and the
policy document's release-inventory-drift ERROR "both clear on their own when
the inventory re-baselines".

NOTHING IS DECLARED SPENT BY THIS CUT and the entry says so in terms.
contract-v2.6's declaration stands exactly where it was written, in
§ contract-v3.0's own entry; no declaration is added or edited. Measured, not
asserted: contracts/CHANGELOG.md still carries EXACTLY ONE line beginning with
the reserved opener, the v2.6 declaration at what is now line 538, and this
commit introduces no new ## heading that could move an entry boundary under it.

contracts/releases/contract-v3.1.digests.yaml rebuilt with the command the cut
itself used (01489fc): scripts/validate-contract-release.py build --tag
contract-v3.1 --output contracts/releases/contract-v3.1.digests.yaml. 283
entries in, 283 out -- the closed release surface gains and loses no member.
THREE digests move, and all three are this ruling's own edits, each of which is
a registered member:

  contracts/CHANGELOG.md                        6f89cc40 -> 8be8bc65
  docs/contract-versioning-policy.md            094bd83b -> 280691a5
  tests/intent-compliance/test_release_boundary.py  2d600127 -> 6c9dd003

So the inventory DOES digest the policy document -- artifact_id
docs-contract-versioning-policy.md, a NORMATIVE_DOCS member -- and the v3.1
inventory now records the tree as cut rather than as contract-v3.0 recorded it.

Lane: repo-shape
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01HGKwdQsmvRZx4fGQESdFGZ
brettheap added a commit that referenced this pull request Sep 3, 2026
* Cut contract-v3.1: add-project-repo-schema's project-register election is realized

Realizes add-project-repo-schema tasks.md 9.3 -- the archive blocker that
packet's own realization left to the cutting session. contract-v3.0 is the
declared+tagged bundle and contracts/releases/ holds inventories through it
with no member for this family, so the next additive number is contract-v3.1,
taken here.

Change class: ADDITIVE (minor). git diff --name-status contract-v3.0 HEAD --
contracts/schemas/project-register.schema.yaml
scripts/validate-ideation-dashboard-contracts.py shows the schema gaining
three OPTIONAL fields (schema, reference, repository_roles) and the validator
gaining four new rules over those fields alone, with repositories unchanged
as strings and every existing rule's behaviour untouched -- no consumer
pinned at contract-v3.0 is made non-conformant.

contracts/manifest.yaml: contract_bundle_version contract-v3.0 -> contract-v3.1.
contracts/CHANGELOG.md: the contract-v3.1 entry, naming the four realized
artifacts (docs/project-repo-schema.md, contracts/openreposhape-pin.yaml,
scripts/validate-openreposhape-pin.py + its gate workflow, and the ONE
registered row that actually moves -- scripts/validate-ideation-dashboard-
contracts.py, row 1417 of the v3.0 inventory), and disclosing an unrelated
re-baseline: docs/contract-versioning-policy.md drifted since v3.0 via PR
#577 (the contract-v2.6 Instance Six recording), carried forward unchanged.
contracts/README.md: the project-register.schema.yaml row's editorial
description grown to name the new fields and add-project-repo-schema.
contracts/releases/contract-v3.1.digests.yaml: built LAST via
scripts/validate-contract-release.py build --tag contract-v3.1, 283 entries
in, 283 out -- the closed release surface gains and loses no member; only the
two named files' bytes moved.

NOT HERE, deliberately: the contract-v3.1 annotated tag. Policy step 5
publishes it against the commit that actually lands on main; the post-merge
commands are in the pull request body.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01HGKwdQsmvRZx4fGQESdFGZ

* Tick add-project-repo-schema 9.2-9.4: archive preflight complete

9.2: re-verified contracts/openreposhape-pin.yaml against the real
opensoft/openRepoShape bytes at deacbdcce4f52af427bcb4edd075fcc992e3dabe via
scripts/validate-openreposhape-pin.py --from-gh (16 digests recomputed, 18
members present, 34 files declared, none undeclared, exit 0), and re-ran the
four validator lines slices 4 and 5 recorded -- all green.

9.3: DONE, AS contract-v3.1, in the prior commit of this pull request.

9.4: python3 scripts/proposal-support.py . package add-project-repo-schema
--date 2026-09-03 --apply converts supporting-docs/ into
supporting-docs.tar.gz + supporting-docs.manifest.yaml, a verified
deterministic bundle (proposal-support.py . verify -> "proposal support
verification ok"), satisfying release-realization's proposal-support archive
gate ahead of openspec archive.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01HGKwdQsmvRZx4fGQESdFGZ

* Archive add-project-repo-schema: realized at contract-v3.1, promoted

openspec archive add-project-repo-schema --yes: merged-plus-green realization
evidence exists (contract-v3.1, cut in this pull request), so the
release-realization archive gate opens. Moved to
openspec/changes/archive/2026-09-03-add-project-repo-schema/. Promotes:
project-repo-schema (11 ADDED requirements, new capability) and
ideation-dashboard's "Project grouping hierarchy" (1 MODIFIED requirement --
the register's optional schema/reference/repository_roles election, carried
verbatim with every original scenario retained).

openspec/specs/project-repo-schema/spec.md: Purpose set from the proposal
(elective, confers nothing, the double pin, the manifest-is-the-source rule,
the ownership split with openRepoShape) rather than left TBD.

README.md: moved the OpenSpec Records entry from Active to Archived, per the
README's own convention, with the realization evidence (contract-v3.1,
the MedxScribe pilot, and the real MedxEHR/MedxGlass adoptions) and the
sequenced-after pin's movement recorded.

ideation/README.md: the promoted-from-staging pointer now names the archive
path; docs/project-repo-schema.md's own inline references to the pre-archive
proposal.md path are left as originally written, mirroring this repository's
own precedent (docs/contract-versioning-policy.md:341 still cites
openspec/changes/add-release-inventory-drift-check/proposal.md, archived
2026-08-25, uncorrected) -- a record is not rewritten to match today's state.

tests/sequenced_after/test_sweep.py: the live corpus pin moves in this same
commit, its own protocol. Archiving this co-modified ACTIVE change moves
active_co_modified alone, 20 -> 19 (measured: origin/main at 7af2725 reads
33 active + 125 archived = 158, 108, 50, 20/13; this commit reads
32 active + 126 archived = 158, 108, 50, 19/13) -- co_modified, sole_modifiers
and active_sole are untouched, exactly the shape #563's, #571's and
declare-spent-bundle-state's own archives moved.

NOTE: this branch was authored against origin/main at 7af2725 while PRs
#608 and #609 were landing separately per the coordinating session's
instruction not to rebase repeatedly. The README OpenSpec Records block and
this sequenced-after pin are the expected conflict points and must be
re-measured against main's post-#608/#609 state before merge.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01HGKwdQsmvRZx4fGQESdFGZ

* Floor pin: advance the merge-master core to codexFactory 605d48a — the floor now enumerates project-repo-schema (57 → 58)

codexFactory PR #183 merged as 605d48acd129d25e5dd5dac48201f53c11de08ae
(codexFactory main tip), regenerating
scripts/merge_master/openxfactory-review-authority-floor.yaml's
machine-generated block at openxFactory 6f80e67 — this pull request's own
branch tip, where add-project-repo-schema was archived, realized at
contract-v3.1, promoted — to carry openspec/specs/project-repo-schema/spec.md
onto the floor. Generated block: 53 -> 54 tracked paths. Floor total
(four hand-reasoned chokepoints + the generated block): 57 -> 58
never-clearable paths.

Per codexFactory docs/repository-gate-floor-repair-runbook.md and
openxFactory PR #569 (47f9008), every site that names the core commit moves
together, in one commit:

* contracts/review-lane-pin.yaml: core_commit db157dbb -> 605d48ac;
  declared_at/declared_from restated; the floor_snapshot sha256
  bf7a6b69... -> 6ab79400..., entry_count 57 -> 58; prose restated to 58
  entries and the PR #183 regeneration.
* .github/workflows/merge-master-approval.yml: PINNED_CORE_COMMIT and the
  core checkout ref: literals advance to 605d48ac; a dated note records the
  advance beside the existing divergence note.
* .github/workflows/pytest-suite.yml: the pinned-core checkout ref: (the
  fourth site the core commit is written, per
  tests/review_lane_pin/test_floor_snapshot.py::
  test_the_required_suite_checks_out_the_pinned_core) advances to 605d48ac.
* contracts/review-lane-floor-snapshot.yaml: re-copied byte-for-byte from
  codexFactory's floor document at 605d48a (sha256
  6ab7940009e0d15117bf749266beb29bfbe4bf10be3c93cd5c6a0ea8362ea819),
  never hand-edited.

Verified: `tests/review_lane_pin` 55 passed / 1 skipped locally (legitimate
skip, no core checkout on disk), 56 passed / 0 skipped with a real
codexFactory checkout at 605d48a supplied via PINNED_CORE_COMMIT (the
byte-identity and freshness-verifier-by-name tests both ran and passed for
real). `doc-health.py --single-repo .` run before and after this edit is
identical modulo repo-identity naming and one run's transient
release-tag-publication network skip (reproduced clean on re-run) — no
family gains or loses a finding because of this change. `pytest
tests/doc-health -q -m "not postgres"` and `openspec validate --all --strict`
(86/86) both pass.

Lane: repo-shape
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01HGKwdQsmvRZx4fGQESdFGZ

* Define the SPENT state in the pinned policy: declare-spent-bundle-state's 3.1, owed at this cut

The obligation-side half of declare-spent-bundle-state task 3.1, deliberately
left owed to the next contract cut under OD-6's shape argument and affirmed
there by Brett Heap on PR #587 (2026-09-03T02:49:08Z). This is that cut.

WHAT #577 ALREADY DISCHARGED AND IS NOT RE-AUTHORED HERE: the consumer-facing
record that contract-v2.6 is superseded and not dischargeable. That lives in
this same document as Instance Six and is cross-referenced, not restated --
"two records of one measurement is how they drift apart". Instance Six RECORDS
the supersession; the new subsection DEFINES the state, which is precisely what
#577 declined to do ("No sentinel is invented ... Building one here would be
exactly the failure that check exists to catch").

Placed as a ### subsection of ## Immutable Tag Correction, LAST in that section
-- after ### contract-v1.36 Was Moved, whose opening sentence says "the rule
immediately above" and would have been broken by an insertion between it and
its parent. It sits beside Immutable Tag Correction because the SPENT remedy IS
that section's remedy for a defective release applied one step earlier in the
lifecycle, and because its "its version number is never reused" is the sentence
the v2.6 disposition leans on.

The paragraph states, quoting openspec/specs/doc-health/spec.md
### Requirement: Release-tag publication rather than paraphrasing it where the
wording carries weight: the third state between published and owes-a-tag;
entry ONLY by explicit declaration, never by silence, age or any absence; the
declaration's home in contracts/CHANGELOG.md inside the SUPERSEDING bundle's
own entry, in the reserved single-line form, with the opener reserved and an
incomplete line malformed rather than prose; that a bundle cannot declare
itself spent; the successor guard in all three of its conjuncts (cut,
published, strictly later); the three severities -- info accepted, warning
provisional, error refused with the superseded error standing beside it; and
that the number is never reused while the manifest, the inventory and the
spent bundle's own entry are left exactly as written.

The reserved form is shown as a 4-space indented code block, per the
requirement's own reason for doing so. Measured, not assumed: zero lines of
this document begin with the reserved opener, and the family reads only
contracts/CHANGELOG.md in any case (line.startswith, no lstrip).

doc-health --single-repo vs the pre-edit tree at the same origin/main
(0f1edc0): 6 critical / 4 error / 29 warning / 13 info on both, no family
gains or loses a finding, release-tag-publication included.

Lane: repo-shape
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01HGKwdQsmvRZx4fGQESdFGZ

* Advance the intent-compliance release boundary to contract-v3.1, by hand as the tripwire requires

The contract-v3.1 cut moved contracts/manifest.yaml and left this file behind:
ValueError: 'contract-v3.1' is not a valid ReleaseState, failing
test_release_membership_when_registration_changes_then_transition_is_atomic
and test_release_inventory_when_registration_changes_then_schema_pins_are_atomic
(2 failed, 286 passed, reproduced before the edit).

That failure is the tripwire working, not a bug. The enum's own docstring says
why it must be a HAND act: INTENT_RELEASE_FLOOR is an at-or-after comparison,
so nothing here notices a bump on its own, and every cut past the floor states
on the record which side of the boundary its bundle falls on.

FEATURE_SUCCESSOR_5 = "contract-v3.1" added, mirroring the four successors
above it, and wired into both match statements' successor arm exactly as
v2.5, v2.6 and v3.0 are wired -- the arms are exhaustive over the enum and
guarded by assert_never, so a value added without wiring would fail there
instead.

The docstring gains the paragraph the tripwire exists to collect: the v3.1 cut
is add-project-repo-schema's project-register election and its openRepoShape
consumption pin; the ONE registered row it moves is
scripts/validate-ideation-dashboard-contracts.py; it touches NO
intent-compliance member; so the membership this file asserts is UNCHANGED --
said by hand, because "unchanged" is the one thing the library cannot tell
from "unnoticed".

python3 -m pytest tests/intent-compliance -q: 288 passed.

This file is itself a member of the intent-compliance release surface, so its
new bytes are part of what the v3.1 inventory rebuild in the next commit
records.

Lane: repo-shape
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01HGKwdQsmvRZx4fGQESdFGZ

* Record the SPENT-state carry in the contract-v3.1 entry, and rebuild the inventory over the bytes as cut

The changelog half first, then the inventory LAST, because the inventory
digests the changelog.

contracts/CHANGELOG.md, inside the existing ## contract-v3.1 entry and
immediately after the paragraph disclosing #577's between-cuts drift: three
paragraphs saying that docs/contract-versioning-policy.md moves a SECOND time
at this cut and why. The first movement is #577's bytes carried forward
unaltered (that paragraph is not edited); the second is
declare-spent-bundle-state task 3.1's SPENT-state definition, routed by OD-6 to
"the next contract cut" and affirmed there by Brett Heap on PR #587
(2026-09-03T02:49:08Z). One rebuilt inventory re-baselines both, which is what
discharges that packet's § 3.2 -- this changelog's editorial drift info and the
policy document's release-inventory-drift ERROR "both clear on their own when
the inventory re-baselines".

NOTHING IS DECLARED SPENT BY THIS CUT and the entry says so in terms.
contract-v2.6's declaration stands exactly where it was written, in
§ contract-v3.0's own entry; no declaration is added or edited. Measured, not
asserted: contracts/CHANGELOG.md still carries EXACTLY ONE line beginning with
the reserved opener, the v2.6 declaration at what is now line 538, and this
commit introduces no new ## heading that could move an entry boundary under it.

contracts/releases/contract-v3.1.digests.yaml rebuilt with the command the cut
itself used (01489fc): scripts/validate-contract-release.py build --tag
contract-v3.1 --output contracts/releases/contract-v3.1.digests.yaml. 283
entries in, 283 out -- the closed release surface gains and loses no member.
THREE digests move, and all three are this ruling's own edits, each of which is
a registered member:

  contracts/CHANGELOG.md                        6f89cc40 -> 8be8bc65
  docs/contract-versioning-policy.md            094bd83b -> 280691a5
  tests/intent-compliance/test_release_boundary.py  2d600127 -> 6c9dd003

So the inventory DOES digest the policy document -- artifact_id
docs-contract-versioning-policy.md, a NORMATIVE_DOCS member -- and the v3.1
inventory now records the tree as cut rather than as contract-v3.0 recorded it.

Lane: repo-shape
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01HGKwdQsmvRZx4fGQESdFGZ

---------

Co-authored-by: Claude Fable 5.1 <[email protected]>
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.

2 participants