Skip to content

Realize gate-code-surface-declarations § 3: gate the code_surface: head - #1029

Merged
brettheap merged 33 commits into
mainfrom
change/gate-code-surface-declarations-realization
Sep 16, 2026
Merged

brettheap merged 33 commits into
mainfrom
change/gate-code-surface-declarations-realization

Conversation

@brettheap

@brettheap brettheap commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Lane: openxfactory-5 (openXfactory-5)

This realizes openspec/changes/gate-code-surface-declarations/tasks.md § 3 (and § 3.5/§ 3.5a/§ 3.5b/§ 3.6/§ 3.6a/§ 3.7 within it) — the house validator, the closed register and the tests for the ratified packet gate-code-surface-declarations, ratified by Brett Heap on 2026-09-13 at 00:41Z, verbatim "ratify", recorded at PR #1018, comment 5649742729, landed on main at b4e0087a. The packet gates the OTHER half of Realization axis declaration — code_surface: — the way its sibling gate-realization-axis-vocabulary gated target_release:. Nothing under openspec/specs/ is touched by this pull request; it is a code-only diff over the packet's own tasks.md.

Ruling

RULED 2026-09-16 by Brett Heap, in session (multichoice round), on the governance note that put the register's 7→8 growth to him (issuecomment-5662333218), verbatim:

"Keep the eighth entry"

and, in the same round, "Un-draft and land now." Recorded at issuecomment-5702650701.

The eighth entry (encode-wallet-authority-rulings-r6-r12, class list-runs-into-prose) STANDS, and the register lands at EIGHT. The ruling's reasons are the packet's own: design.md D3's ruling line fixes the DISPOSITION and never the count; the scenario The corpus moves between drafting and landing orders a new carrier disposed of at the landing head; and the baseline is defined as "the entries the register holds when the gate lands". So the growth 7→8 before landing is D3's disposition applied at the landing head, not a count D3's ruling fixed. NOTHING THE RULING KEEPS IS EDITED BY THE RECORDING OF IT — not CLOSED_REGISTER, not the entry's declaration text, not its sha256; a byte moved there would move the digest the closure pins. The ruling is written into all three records that keep this packet's register facts, in the same words: the entry's own why: in scripts/code-surface-register.yaml, CLOSED_REGISTER's provenance comment in scripts/code_surface.py, and tasks.md § 3.4.

Realized-vs-requirement map

Requirement (spec delta) Realized by Pinned by
Code-surface declaration grammar is gated (10 scenarios) — refuse an active declaration whose head is neither none nor a comma/and/+-separated repository list, the two exclusive; require a gloss opener; refuse a YAML block scalar by name; refuse a repeated declaration; treat absence as the default and a present-empty value as a finding; read the archive and never judge it scripts/code_surface.py: parse_head() (head grammar, none/list exclusivity, _GLOSS_OPENER_RE), _BLOCK_SCALAR_RE + the named block-scalar refusal, declaration() (strict-loader read via frontmatter_strict.read_front_matter + repeat refusal via _REPEATED_HEADER_RE), scan()/_proposals() (active-vs-archive walk). CLI: scripts/validate-code-surface.py (exit 1 on an unreadable head) tests/code_surface/test_code_surface_gate.py — test_a_mixed_none_head_is_refused_wherever_the_token_sits, test_the_block_scalar_refusal_is_not_merely_an_unreadable_head, test_a_conforming_declaration_passes, test_an_active_unreadable_head_is_refused; groups: head+opener (19), reserved sentinel (7), block scalar by name (7), declaration read incl. repeat (7), absence/empty (3), gate end-to-end (5), archive read-never-judged (2), corpus-walk path boundary (7, § 3.6a)
The declared repository set is derived from the head and never from the gloss (4 scenarios) — one shared derivation, none → empty set, a registered (grammar-unreadable) head fails closed on any consumer, both substitutes (whole-declaration fallback, empty-set substitution) forbidden by name scripts/scope_globs.py: narrowed code_surface_repositories() deriving through code_surface.parse_head (one reader, not two); NoDeclaredRepositories (frozen dataclass, the typed absence carrier, naming the change id + register entry); validate_cross_consistency() raising CodeSurfaceHeadError (a ScopeGlobsError subclass beside ScopeGlobsResolutionError) test_the_refusal_forbids_the_whole_declaration_fallback_by_name, test_the_refusal_forbids_the_empty_set_substitution_by_name, test_an_unreadable_head_the_register_does_not_name_also_fails_closed, test_a_registered_packet_declaring_a_scope_reds_the_scope_gate_end_to_end, test_a_registered_packet_declaring_a_scope_is_refused, test_a_bare_iterable_still_works_as_a_head_derived_set — § 3.5 derivation (6) + § 3.5a fail-closed (7)
Standing code-surface divergence is named in a closed register (4 scenarios) — a closed, removable-never-addable register naming every standing divergence the gate doesn't correct; closure enforced by a baseline, not merely declared; the two refusals (unregistered-unreadable vs. stale-entry) stay asymmetric; the register is re-measured at the landing tree scripts/code-surface-register.yaml (8 entries, 4 classes, each carrying its declaration verbatim); scripts/code_surface.py: load_register(), register_entry_for(), declaration_digest(), the CLOSED_REGISTER tuple of (change, sha256-of-declaration). CLI: scripts/validate-code-surface.py (exit 2 on an unusable/stale register) test_every_register_entry_carries_the_live_declaration_byte_for_byte, test_an_entry_outside_the_closed_baseline_refuses, test_an_entry_whose_declaration_moved_off_the_baseline_refuses, test_a_symlinked_register_refuses, test_a_dangling_register_symlink_refuses_as_a_symlink_not_a_crash, test_a_register_reached_through_a_symlinked_ancestor_refuses, test_the_default_register_path_is_checked_by_the_same_guard — shape refusals (18), closed baseline (5), register-path boundary (8, § 3.6a), registered/stale asymmetry (6)

test_corpus_code_surface_validates runs the CLI over the live tree so a new divergence reds the required pytest-suite with no workflow edit (§ 3.7 — confirmed by running python3 -m pytest tests/ -q -m "not postgres", the exact command .github/workflows/pytest-suite.yml runs, rather than by reading the workflow). All three symlink/path-boundary surfaces (§ 3.2a/§ 3.6a) mirror scripts/target_release.py's two guards exactly rather than approximating them: the register refused unread on a symlinked file OR a symlinked ancestor directory, and every discovered proposal path admitted only through the anchored resolve-both-sides test, a failure being a DROP and never a finding.

Register population

EIGHT standing divergences — every one of them another lane's already-ratified prose, none swept (design.md D3, ruled option 1) — in four classes:

class count changes
block scalar 1 adopt-configured-notebook-hosting-identity
possessive 1 amend-kill-switch-to-declared-test-companion
apposition 1 add-substantive-review-lane
list runs into prose 5 admit-review-lane-repin-to-merge-approval-envelope, amend-mirror-floor-regeneration-merge-authority, extend-merge-master-envelope-to-floor-bot-lanes, split-opendox-two-layer-product, encode-wallet-authority-rulings-r6-r12

IT WAS SEVEN AT THIS BRANCH'S ORIGINAL BASE AND IT IS EIGHT AT THE HEAD THE GATE LANDS ON, WHICH IS THE REGISTER REQUIREMENT'S OWN SCENARIO FIRING RATHER THAN A NUMBER DRIFTING. The corpus moves between drafting and landing directs that "the register MUST be re-measured at the head the gate lands on, and the new carrier disposed of there". THE SCENARIO HAS BEEN OBEYED AT TEN RE-MEASUREMENTS AND HAS MOVED THE REGISTER AT EXACTLY ONE OF THEM — the second, bfa90db6, where the eighth carrier arrived and was disposed of; the nine since have cost nothing, which is the shape the scenario is supposed to have when the corpus moves without a divergence in it. (An earlier draft of this description said "it has now fired twice", which named no event this record contains — the disposition arm fired ONCE and the corpus moved TEN times, and neither count is two. The sentence is replaced by the two counts it was trying to hold; tasks.md § 3's preamble and the register header have said "FIRED ONCE, at the second" throughout.) Every row below is a measurement at the main head this branch had merged when it was taken, never a number carried forward:

re-measured at active declaring none repo list registered outside
54885296 (this branch's original base) 44 44 4 33 7 0
bfa90db6 (before disposition) 46 46 4 34 7 1
bfa90db6 (after disposition) 46 46 4 34 8 0
e6e1c968 (the third re-measurement; dd073746 and 92d519b0 read the same) 47 47 4 35 8 0
8944758c (the sixth, merged at d4c5a7f9) 46 46 4 34 8 0
79ac94b7 (the seventh, merged at 556eac00, measured at 304bf7af) 46 46 4 34 8 0
3c614d34 (the eighth, merged at 76492170, measured at 5c4b7eed) 46 46 4 34 8 0
b1df95ee (the ninth, merged at 48bc7de7, measured at 2561420f) 45 45 4 33 8 0
fa39141c (the tenth, merged at 49007dc4, measured at 4385d6d3) 47 47 5 34 8 0

The eighth is encode-wallet-authority-rulings-r6-r12 (#1017 → bfa90db6), whose declaration names four FILE PATHS where the grammar wants repository identifiers. It is REGISTERED and NOT swept, on D3's ruled option and on tasks.md § 3.4's own standing instruction ("a carrier that arrived after this drafting is disposed of there"): correcting that head is not a re-punctuation but a judgment about which repository four artifacts belong to, in another lane's ratified, active, mid-flight packet. NOT ONE BYTE OF ANOTHER LANE'S RATIFIED PROSE IS RE-PUNCTUATED BY THIS PULL REQUEST. The e6e1c968 merge brought one new proposal and one edited one; both conform, neither is one of the eight, so no entry went stale and the register did not move. The 8944758c merge (d4c5a7f9) is the FIRST one that SHRANK the active corpus — git diff --name-status 92d519b0..8944758c -- 'openspec/changes/*/proposal.md' is exactly one R100, extend-prose-tagging-target-to-pinned-capabilities archiving (#1042), which is where 47/47/35 becomes 46/46/34 — and that carrier CONFORMS and is not one of the eight, so again no entry went stale and the register stands at eight. tasks.md § 3 records that sixth re-measurement in full, as do CLOSED_REGISTER's provenance comment and the register file's header, which had drifted one merge behind it. The SEVENTH (79ac94b7, merged at 556eac00) is recorded WITH its merge rather than after it: git diff --name-status 8944758c..79ac94b7 -- 'openspec/changes/*/proposal.md' is EMPTY, so its line is the sixth's byte for byte and the register is again unmoved. The EIGHTH (3c614d34, merged at 76492170) is taken the same way and reads the same way: git diff --name-status 79ac94b7..3c614d34 -- 'openspec/changes/*/proposal.md' is EMPTY too, so that line stands a third time, no carrier arrived, no entry went stale and the register is still at eight. The five commits it brought are the openDox/openXdox pin lockstep (#1054), a Q-GRC-4 § 13.5 pre-note record and a § 3.4 slice-S7 annotation (#1030), none of them a file this packet owns; the merge resolved ZERO conflicts. The NINTH (b1df95ee, merged at 48bc7de7) is the SECOND that SHRANK the active corpus: git diff --name-status 3c614d34..b1df95ee -- 'openspec/changes/*/proposal.md' is exactly one R100, add-declared-former-id archiving on its merged-plus-green realization evidence (#1064), which is where 46/46/34 becomes 45/45/33 — and that carrier CONFORMS and is not one of the eight, so again no entry went stale and the register stands at eight. Of the twelve commits it brought, eight are PR #1064 itself, three reached main directly while it was in flight (#1025, #1049, #1031), and one is this lane's own #1044; none besides the one R100 is a file this packet owns, and the merge resolved ZERO conflicts. The TENTH (fa39141c, merged at 49007dc4) is the FIRST since the second that GREW the active corpus: git diff --name-status b1df95ee..fa39141c -- 'openspec/changes/*/proposal.md' is exactly two A lines and nothing else — no M, no D, no R — adopt-entry-grain-dispositions-form (#1050), which declares a repository list and is where 33 becomes 34, and scope-pinned-arm-root-naming (#1052), which declares none and is where 4 becomes 5, so 45/45 reads 47/47 and the archive is UNMOVED at 169/123/3. BOTH CONFORM and NEITHER is one of the eight, so no carrier arrived, no entry went stale and the register stands at eight. Of the six commits it brought, not one touches gate-code-surface-declarations/, code_surface.py or code-surface-register.yaml — the two filings above, an openDox walked-root admission (#1067), another packet's tasks § 3.4 amendment (#1035), the openDox/openXdox consumer gate (#1059) and the retired: row-form carve (#1032) — and the merge resolved ZERO conflicts.

The archive is 167 read / 121 declaring / 3 outside at the first four of those heads, 168 read / 122 declaring / 3 outside at the sixth, the seventh and the eighth, and 169 read / 123 declaring / 3 outside at the ninth and again at the tenth (as of 4385d6d3) — the two archived proposals crossing the line in turn, the 3 outside unmoved. Frozen record, read and counted, never judged. Confirmed live on this tree below.

Closure is enforced, not declared: code_surface.CLOSED_REGISTER is a tuple of (change, sha256-of-declaration) for exactly these eight, and load_register() refuses (exit 2) any entry the register carries that this baseline does not — so granting a ninth exception takes an edit at the baseline itself, in the diff that grants it — which is exactly what the eighth cost, its entry and its baseline pair landing in one commit — and editing a registered declaration by even one byte moves its digest off the baseline and refuses the same way. The converse failure is a distinct exit 2 too: an entry whose declaration has since been corrected or whose packet has archived matches nothing on a whole-corpus scan and refuses until the stale entry is deleted — the two refusals (unregistered-unreadable vs. registered-but-stale) are kept asymmetric by design, never collapsed into one status.

§ 3.5 before/after — narrowing scope_globs.py's code_surface_repositories

Before: the whole code_surface: declaration — head and gloss alike — split on [\s,()/]+ and every non-none word kept. Measured over the 44 active declarations at 54885296: 3,321 distinct "repository" tokens, 767 from split-opendox-two-layer-product alone, with all four none heads yielding a non-empty set (the filter drops the word none and keeps the gloss) and 33 of the 33 readable non-none heads yielding at least one token their own head does not name. Re-measured at bfa90db6 with the same script and the same pre-narrowing extractor, the figures move with the corpus and the finding does not: 3,408 tokens across 46 declarations, 767 from the same one, all four none heads still non-empty, 34 of 34 readable non-none heads still naming a repository their head does not.

After: one derivation, through the shared reader code_surface.parse_head — the field has one parser and not two. Where the head is one the grammar reads, the set is exactly its identifiers. Where it is not (a registered exception), the function returns NoDeclaredRepositories — a typed carrier standing for the absence of a set, not an empty set and not the old whole-declaration fallback — threaded through validate_scope_globs into validate_cross_consistency, which raises CodeSurfaceHeadError (a ScopeGlobsError subclass) naming both the proposal and its register entry. A bare iterable still works, read as a head-derived set with no registered-exception context, so every shipped caller (tests/scope_globs/ included) passes unedited. The live corpus is unmoved by the narrowing either way: 0 of 47 active proposals declare scope_globs: at the head this description is stamped to (4385d6d3, re-measured there), so validate-scope-globs.py . prints the identical line before and after — the change is unobservable on the corpus and lands without a sweep. The sibling-import vendoring contract is kept: scope_globs.py still imports standalone with neither sibling in sys.modules.

Validator transcripts

Run in a fresh clone of this branch at 4385d6d3, the head this description is stamped to, with origin/main (fa39141c) contained. Every figure below was measured there and is carried from nowhere; the earlier transcripts (44/44/4/33/7 at 54885296, and the fix-round run at e6e1c968) are kept in tasks.md § 3 as the record of the earlier re-measurements and are NOT restated here as if they were current.

$ python3 scripts/validate-code-surface.py .
code_surface: 47 active proposals, 47 declaring — 5 `none`, 34 a repository list, 8 named by the register, 0 outside the grammar.
  archive (read, never judged): 169 proposals, 123 declaring, 3 of them outside the grammar.
code_surface validation passed (every active declaration's head is admitted).
$ echo $?
0
$ python3 scripts/validate-scope-globs.py .
scope_globs validation passed (all active changes conform).
$ echo $?
0
$ python3 -m pytest tests/code_surface -q
153 passed
$ python3 -m pytest tests/scope_globs -q -m "not postgres"
99 passed
$ python3 -m pytest tests/code_surface tests/scope_globs tests/target_release -q
348 passed
$ OPENSPEC_TELEMETRY=0 python3 scripts/validate-openspec-cli-pin.py --all
...
Totals: 107 passed, 2 failed (109 items)
openspec-cli-pin: DISPOSITIONED FINDINGS in openxFactory (2 applied) — this run is NOT a clean tree:
  ✗→D add-chain-attestation / signed-execution-chain/spec.md  (accepted by: Brett Heap, 2026-09-05, "take exit 2")
  ✗→D add-composed-view-authoring / ideation-dashboard/spec.md  (accepted by: Brett Heap, 2026-09-05, "take exit 2")
OK openspec-cli-pin: @fission-ai/[email protected] verified against its content address; every target validated --strict with 0 UNDISPOSITIONED failures. THIS IS NOT A CLEAN TREE: 2 finding(s) are ACCEPTED EXCEPTIONS, named above.
$ echo $?
0

Both dispositioned findings are pre-existing, pinned exceptions accepted by Brett Heap on 2026-09-05 (unrelated to this packet — add-chain-attestation, add-composed-view-authoring) and are the same two the pinned-CLI validator carries independent of this branch; this branch contributes 0 undispositioned failures. The item count moved 106 → 109 → 108 → 107 → 109 with main's own corpus (two active changes archived, then two more filed, since e6e1c968), not because this branch added or removed a target.

Fix round (bench findings answered)

Six Copilot threads and an independent reviewer's findings, each fixed or refuted on evidence:

finding verdict fix
An OMITTED code_surface: was given the fail-closed absence carrier, not the promoted default CONFIRMED b7ed0ff0 — absence derives the EMPTY SET the default's none head declares; the carrier keeps the PRESENT-but-unreadable arm it was ratified for
test_the_sequenced_after_sibling_is_NOT_imported… did not pin the code_surface deferral CONFIRMED (reproduced: hoist applied, that test still green, vendored copy ModuleNotFoundError) ece5a9d3 — two new pins, both proven to fail under the hoist; docstring and § 3.5 corrected
The scope CLI never supplied a register for the tree it scans, so the end-to-end "registered" test ran the UNREGISTERED arm CONFIRMED 48846f56 — --code-surface-register PATH + a scanned-tree default; the e2e test now supplies one and asserts the entry is named
Stale entries and findings printed as two un-cross-referenced sections CONFIRMED a9b23f13 — one line above both blocks where they name the same change, naming both halves of the remedy
NoDeclaredRepositories.declaration write-only; scan(register=None) untested; none, none printed an empty parenthetical CONFIRMED (all three) b7ed0ff0, a9b23f13
Test name typo glosss CONFIRMED a9b23f13 — renamed to the requirement's own wording
PR description reported seven entries CONFIRMED this description, re-measured at e6e1c968

Also added for the scenario table: test_the_corpus_moves_between_drafting_and_landing, pinning the register requirement's third scenario in its own shape (drafting register → new carrier arrives → unchanged register refuses → disposition clears it → the baseline edit it costs). tests/code_surface 115 → 130, tests/scope_globs 88 → 90 in that round, no shipped file outside this packet's own surface edited. FOUR ROUNDS FOLLOWED IT, each answering the bench and each measured where it landed, the arrows below being those rounds' own figures and never the current one: the finding-class tests (130 → 136), the scanned tree's register or NO_REGISTER rather than the house one (8fdcca52, 136 → 140, recorded in tasks.md § 3.6 only now), the default register probed for PRESENCE so a dangling symlink or a directory REFUSES (exit 2) instead of reading as absent (e3a4c051, 140 → 145, five tests, two of which fail on a revert to is_file()), and that same probe taught to ask the ANCESTRY and not only the leaf (c1389fd7, 145 → 153, eight tests, four of which fail on the unfixed validator). The fifth round's finding is the parity the fourth's claimed: with REPO_ROOT/scripts a symlink to a directory that does not carry the register, is_symlink() and exists() are BOTH false at the leaf, so the scan called the path ABSENT and judged with NO_REGISTER — while the SAME path named on --code-surface-register was refused (exit 2) by load_register's _has_symlinked_ancestor guard. Measured both ways on one tree: named, exit 2; default, exit 1. The probe now runs the loader's OWN climb (imported, not re-implemented) before the leaf, so § 3.2 (i)'s "the --register PATH … and the default … ALIKE" holds in the branch it names. tests/code_surface 153 and tests/scope_globs 99 as of 4385d6d3, both in the transcript above.

Full-suite baseline

PROVEN ENVIRONMENTAL, BY A CONTROLLED A/B ON ONE COMMIT: the same 338 tests in trust-anchor/clearing/openxwallet_pin are 338 passed with submodules initialized and 93 failed / 195 passed / 50 errors without them (195 + 93 + 50 = 338), the suite's own tests/clearing/conftest.py documenting that an uninitialized gitlink "must fail here, loudly" by design — so the earlier report of 94 failures / 50 errors was a checkout without its submodules and nothing on this branch is implicated; full transcript, the CI corroboration on 6ad73a9b and the honest status of the two unfinished local runs are in the proof comment.

Refs #1013

🤖 Generated with Claude Code

The ratified packet's § 3, in full: a reader and judge, a house validator CLI,
a closed register of the standing divergence, the tests that pin them, and the
one narrowing edit D4 ruled.

scripts/code_surface.py (NEW) reads the declaration through the SHIPPED strict
loader and adds no second parser. It parses the DECLARED HEAD — either the
single token `none` or a list of repository identifiers separated by a comma,
by ` and ` or by ` + `, the two EXCLUSIVE so a MIXED head is refused in either
order and at every list position and no derived set is computed for it — and
requires a GLOSS OPENER where a gloss follows. It refuses a YAML folding
indicator BY NAME, refuses a repeated declaration rather than judging the first
head, reads the archive and judges it never, and takes every path it opens
through the sibling's two symlink guards restated exactly: the register refused
UNREAD when its own name or any ancestor is a link, and every discovered
proposal admitted only through the anchored resolve-both-sides test, a failure
being a DROP rather than a finding.

scripts/validate-code-surface.py (NEW) is the CLI in the sibling's shape —
[REPO_ROOT] plus --register PATH, exit 0 clean, 1 an unreadable declaration,
2 an unusable or stale register, both printing both and exiting 1.

scripts/code-surface-register.yaml (NEW) carries the SEVEN standing
divergences, each with its declaration text VERBATIM, its class, its reason,
its citation and its retirement event. RE-MEASURED at this head (44 active
proposals, 44 declaring, 4 `none`, 33 a repository list, 7 outside the grammar;
archive 167 read, 121 declaring, 3 outside) rather than carried from the
drafting tree: the same seven changes in the same four classes, with one
CONFORMING carrier having archived in between. All seven are REGISTERED and
none is swept, which is § 1.3's ruled option, so not one byte of another lane's
ratified prose is re-punctuated here. The closure is ENFORCED by
CLOSED_REGISTER, which pins (change, sha256-of-declaration) for each: appending
an entry refuses, and so does editing a registered declaration by one byte.

scripts/scope_globs.py's code_surface_repositories is NARROWED to derive its
set from the declared head through that one shared reader, so the field has one
derivation and not two. It used to split the whole declaration on [\s,()/]+ —
3,321 distinct "repository" tokens across the 44 active declarations, 767 from
one, with all four `none` heads yielding a non-empty set. Where the head is one
the grammar cannot read the derivation returns a TYPED CARRIER standing for the
ABSENCE of a set, threaded through validate_scope_globs into
validate_cross_consistency, which raises a ScopeGlobsError subclass naming the
proposal AND the register entry. Both substitutes are forbidden by name and
each has its own refusal test. A bare iterable still works, so every shipped
caller passes unedited. The sibling import is DEFERRED, keeping the vendored
merge-gate copy importable.

tests/code_surface/test_code_surface_gate.py (NEW, 115 tests, counted from a
collected run) pins all three requirements, including both path-boundary
surfaces at both depths and the live-corpus run that reds pytest-suite on a new
divergence. No workflow is edited: pytest-suite already runs everything under
tests/.

tasks.md § 3 is ticked box by box with the command and result beside each.

Refs #1013

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Fable 5 <[email protected]>
Copilot AI lite review requested due to automatic review settings September 13, 2026 21:44

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

Three moderate findings remain unresolved around default handling, integrity coverage, and registered-declaration CLI coverage.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

This PR adds a gated code_surface: grammar validator, closed exception register, and head-derived scope validation.

Changes:

  • Adds parser, CLI validation, register enforcement, and corpus scanning.
  • Derives scope_globs repositories from parsed declaration heads.
  • Adds comprehensive grammar, register, boundary, and integration tests.
  • Marks realization tasks complete.

Review notes:

  • Moderate (2 votes): Treat omitted code_surface: as an empty set rather than NoDeclaredRepositories.
  • Moderate (1 vote): Extend integrity coverage to assert code_surface is absent from sys.modules.
  • Moderate (1 vote): Add CLI coverage for registered unreadable declarations.
  • Nit (1 vote): Reconcile the required gloss-opener description with the optional implementation contract.
  • Nit (2 votes): Rename the typoed test for clarity.
File summaries
File Summary
tests/code_surface/test_code_surface_gate.py Tests grammar, register handling, boundaries, and integration behavior.
scripts/validate-scope-globs.py Wires register-aware derivation into the scope validator.
scripts/validate-code-surface.py Provides the code-surface validation CLI.
scripts/scope_globs.py Derives repositories from parsed heads with fail-closed handling.
scripts/code-surface-register.yaml Defines the closed standing-divergence register.
scripts/code_surface.py Implements parsing, register validation, and corpus scanning.
openspec/changes/gate-code-surface-declarations/tasks.md Records completed realization tasks.
Review details

Suppressed comments (3)

scripts/scope_globs.py:160

  • The vendoring claim here is not actually pinned for the new sibling: tests/scope_globs/test_integrity.py only asserts that sequenced_after is absent from sys.modules (lines 286-298), not code_surface. A future module-level import or a broken vendored fallback could therefore pass the existing integrity test; add a subprocess assertion for the new sibling as well.
    `tests/scope_globs/test_integrity.py` pins the deferral for
    `sequenced_after` by loading this module in a bare subprocess; the same
    probe covers this one.

scripts/validate-scope-globs.py:78

  • This is the only production wiring for the new register-aware derivation, but the end-to-end scope-gate test uses an unregistered temporary change, while the tests that pass a register exercise code_surface_repositories directly. A regression in the default-register loading or entry lookup here would stay hidden because the live corpus has no scope_globs: declarations; add a CLI test covering a registered unreadable declaration through this caller.
        sg.validate_scope_globs(
            raw,
            code_surface_repos=sg.code_surface_repositories(
                front, change=proposal.parent.name),
        )

tests/code_surface/test_code_surface_gate.py:167

  • The PR description says a repository head must be followed by a required gloss opener, but this test explicitly admits a bare head; parse_head() also accepts it by breaking at end-of-string. The ratified spec in this tree calls the gloss optional, so please reconcile the PR description with the implemented/specification contract (or change the parser and test if the opener is actually required).
def test_a_head_with_no_gloss_at_all_is_admitted():
    """D0 counted two such records in the archive and none active; the grammar
    admits the form rather than requiring an explanation nobody owes."""
    assert cs.parse_head("openxFactory, codexFactory").repositories == (
        "openxFactory", "codexFactory")
  • Files reviewed: 7/7 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 thread scripts/scope_globs.py Resolved
SonarCloud's post-push analysis of the draft realization PR (#1029) failed
the Quality Gate on new_reliability_rating (C, threshold A), on exactly one
issue: python:S9000 at
test_the_refusal_quotes_the_declaration_but_does_not_print_all_of_it (line
205-206), which called the legacy pytest.raises(ExpectedException, callable,
*args) form rather than the context-manager form.

The legacy form was not a bug — pytest invokes the callable and captures the
exception either way, and this test's own assertions on the captured message
were exercised correctly, which is why tests/code_surface/ already reported
115 passed both before and after this change. This is a mechanical,
behavior-preserving rewrite to the form SonarQube prefers, made because it is
trivially correct and it is the one issue actually failing the gate — not a
response to the other 18 (mostly cognitive-complexity and test-style)
findings on this PR, none of which fail any Quality Gate condition
(new_maintainability_rating is already A) and none of which this commit
touches.

Refs #1013

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Copilot AI review requested due to automatic review settings September 13, 2026 21:55

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

Unresolved moderate findings remain in validation behavior and test coverage.

Review details

Suppressed comments (6)

Previously missed (2) — in code that hasn't changed since the last review.

scripts/scope_globs.py:160

  • The referenced integrity test only imports scope_globs.py and asserts that sequenced_after is not loaded; it never calls _code_surface() or code_surface_repositories(). Thus the new vendored-copy failure path (where code_surface.py is absent) is untested even though this text claims the same probe covers it. Add a bare-subprocess test that exercises the new lazy loader, or remove the claim and document the missing coverage.
    tests/code_surface/test_code_surface_gate.py:1062
  • This end-to-end test is not actually using a registered declaration: _registered_scope_tree only creates the proposal, and the subprocess is not given a register path. code_surface_repositories therefore falls back to the house register, where change c has no entry, so this only exercises the unregistered fail-closed branch and would still pass if the registered-entry context were broken. Add a register-aware CLI fixture and assert the entry is named, or rename/reframe the test as the unregistered case.

openspec/changes/gate-code-surface-declarations/tasks.md:350

  • This verification claim is false for the pull request itself: openspec/changes/gate-code-surface-declarations/tasks.md is under the pathspec, so git diff --name-status b4e0087a..HEAD -- openspec/changes/ cannot be empty. Scope the command to the active proposal files (or state the corpus result without claiming the entire openspec/changes/ subtree is unchanged), otherwise this recorded measurement contradicts the diff.
      a measurement rather than an assumption: `git diff --name-status
      b4e0087a..HEAD -- openspec/changes/` is EMPTY, so the active corpus is
      byte-identical to the tree this packet landed on. **NOT ONE BYTE OF

scripts/code_surface.py:385

  • The diagnostic labels every matched style as a YAML “folding indicator”, but > is folded while | is a literal block-scalar indicator. Because this path intentionally refuses both forms by name, the message should say “block-scalar indicator” (and the corresponding assertion should be updated) so the refusal accurately identifies code_surface: |.
        raise CodeSurfaceError(
            f"opens with the YAML folding indicator `{indicator}`. "
            f"`{FIELD}:` is a PROSE HEADER that no YAML loader reads, so the "

scripts/scope_globs.py:557

  • When code_surface is absent, code_surface_repositories() also returns this NoDeclaredRepositories carrier, but absence is explicitly accepted as the promoted none default (tests/code_surface/test_code_surface_gate.py:340-344). Consequently this branch tells the operator that validate-code-surface.py refuses the declaration even though it passes. Distinguish the absent/default case from an unreadable present declaration, or use wording that does not claim the code-surface gate rejected it.
        else:
            tolerated = (
                "Its declaration is not carried by the closed code-surface "
                "register either, so `validate-code-surface.py` refuses it in "
                "its own right.")

tests/code_surface/test_code_surface_gate.py:869

  • The new test name contains the typo glosss and the phrase heads identifiers is grammatically unclear, which makes collected test output harder to interpret. Rename it to use the singular head and gloss terms.
def test_the_derived_set_is_the_heads_identifiers_and_none_of_the_glosss():
  • Files reviewed: 7/7 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

…zation

Brings the realization branch current with main, which moved 10+ commits
past the branch point 5488529 — the head the register was re-measured at.
No conflicts: the merge is clean in every path.

What main added that this gate reads: TWO new active proposals,
add-target-release-deferred-allocation (#1022) and
encode-wallet-authority-rulings-r6-r12 (#1017). NO registered proposal
archived and NO registered declaration was edited — `git diff --name-status
5488529..origin/main -- 'openspec/changes/*/proposal.md'` is two ADDs and
nothing else — so the closed register's seven entries all still match a live
declaration byte for byte and none is stale.

The re-measurement on the merged tree is the next commit's business.

Refs #1013

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Fable 5.1 <[email protected]>
…stered

*The corpus moves between drafting and landing* — the register requirement's
own scenario — HAS FIRED, and this commit is that scenario obeyed rather than
quoted.

WHAT MOVED. `main` advanced ten-plus commits past `54885296`, the head the
register was re-measured at, while this realization sat in review. TWO active
proposals landed and NONE archived: `git diff --name-status
5488529..origin/main -- 'openspec/changes/*/proposal.md'` is exactly two `A`
lines, no `M`, no `D`, no `R`. So not one of the seven moved — no registered
packet archived, no registered declaration was edited, every entry still
matches its live declaration byte for byte, and NO ENTRY IS STALE.

THE RE-MEASUREMENT, IN FULL, at `origin/main` `bfa90db6`:
  BEFORE (recorded at `54885296`): 44 active, 44 declaring — 4 `none`, 33 a
  repository list, 7 registered, 0 outside; archive 167 read, 121 declaring,
  3 outside.
  ON THE MERGED TREE: 46 active, 46 declaring — 4 `none`, 34 a repository
  list, 7 registered, 1 OUTSIDE THE GRAMMAR; exit 1. Archive UNMOVED at
  167/121/3. The sibling gate reads the same 46, so the active count is a fact
  about the tree and not about either reader.
  AFTER THIS DISPOSITION: 46 active, 46 declaring — 4 `none`, 34 a repository
  list, 8 registered, 0 outside; exit 0. Archive unmoved.

THE ONE. `add-target-release-deferred-allocation` (#1022) conforms and needs
nothing. `encode-wallet-authority-rulings-r6-r12` (#1017, ratified 2026-09-12)
does not: its declaration names FOUR FILE PATHS where the grammar wants
repository identifiers, so the reader takes `contracts/signed-execution-chain`
as an `<owner>/<name>` address and then runs into
`/digest-construction.schema.yaml` with no gloss opener.

REGISTERED, NOT SWEPT — § 1.3's RULED option (D3), and D3's reason holds with
MORE force here than for the seven: correcting this head is not a
re-punctuation but a judgment about which repository four artifacts belong to,
in another lane's ratified, active, mid-flight packet. The remedy stays where
the grammar puts it, with the declaring packet, and the entry names it. STILL
NOT ONE BYTE of another lane's ratified prose is re-punctuated here.

THE CLOSURE IS KEPT BY THE ONE ROUTE IT ADMITS. The entry's
`(change, sha256-of-declaration)` pair is added to `code_surface.CLOSED_REGISTER`
in the SAME pull request as the register entry — the "second, deliberate,
reviewable edit HERE, in the module, beside the reason" the baseline's own
comment demands, and verbatim the remedy the refusal itself names ("If the
exception is genuinely owed, add the pair to `CLOSED_REGISTER` in the same pull
request, where the diff shows the act for what it is"). NO NEW CLASS is
admitted: `list-runs-into-prose` is one of the four `REGISTER_CLASSES` already
carries, a fifth being "a change to the specification, not a register edit".

THE RECORDED NUMBERS ARE CORRECTED HONESTLY, NOT QUIETLY. tasks.md § 3's
preamble keeps the FIRST re-measurement as the record it is and adds the
SECOND beside it; § 3.3 records seven at `54885296` and EIGHT at the landing
head; § 3.4's "NO CARRIER ARRIVED AFTER THE DRAFTING" was true when written
and is FALSE at this head, so the box now says so and records the carrier and
its disposition; § 3.5's permissive-extractor figures are re-measured with the
same script (3,321 -> 3,408 distinct tokens over 44 -> 46 declarations, 767
from `split-opendox-two-layer-product` still, all four `none` heads still
yielding a non-empty set, 34 of 34 readable non-`none` heads still yielding a
token their head does not name) and the latency is re-measured at 0 of 46.

PROVEN ON THE MERGED TREE: `validate-code-surface.py .` exit 0,
`validate-scope-globs.py .` exit 0, `pytest tests/code_surface` 115 passed,
`pytest tests/scope_globs` 88 passed, and the touched areas together
(code_surface, scope_globs, target_release, sequenced_after, openspec_cli_pin,
doc-health) 2481 passed / 0 failed. `validate-openspec-cli-pin.py --all`
Totals: 106 passed, 2 failed (108 items) — both PRE-EXISTING DISPOSITIONED
exceptions accepted by Brett Heap 2026-09-05, 0 UNDISPOSITIONED.

Refs #1013

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Copilot AI review requested due to automatic review settings September 13, 2026 22:56
@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-5 (openXfactory-5)

Full-suite baseline — the 94/50 was an artefact of uninitialized submodules, REPRODUCED AND RECONCILED

THE CLAIM UNDER TEST. An earlier author reported 94 failures / 50 errors concentrated in tests/trust-anchor, tests/clearing and tests/openxwallet_pin, and read them as a defect in this branch. The claim under test was that they were an artefact of running the suite against a checkout whose submodules were never initialized.

IT IS NOT ARGUED FROM CI ALONE — IT IS REPRODUCED, AS A CONTROLLED A/B ON ONE COMMIT. Both arms are the SAME tree, b236a0ed (this branch merged current with main bfa90db6), in two clones that differ in exactly one thing: whether git submodule update --init --recursive was run. Same command in both arms, python3 -m pytest tests/trust-anchor tests/clearing tests/openxwallet_pin -q -m "not postgres" -p no:randomly.

arm submodules result
experiment update --init --recursive (4 gitlinks present) 338 passed, 0 failed, 0 errors, 61.10s
control NOT initialized (4 gitlinks absent) 93 failed, 195 passed, 50 errors, 38.44s

THE TOTALS RECONCILE EXACTLY, WHICH IS WHAT MAKES THIS A PROOF RATHER THAN A COINCIDENCE: 195 + 93 + 50 = 338. It is the SAME 338 tests in both arms — none is skipped, added or dropped. Every one of them passes with the submodules present, and 143 of them fail or error with the submodules absent. The control's 50 errors land exactly where the report put them, and the failure split is tests/trust-anchor 86 FAILED, tests/clearing 1 FAILED + 50 ERROR, tests/openxwallet_pin 6 FAILED.

93 HERE AGAINST THE REPORTED 94 — the one-test difference is the merge: this tree carries origin/main bfa90db6, which the reported tree did not, and the reported count was taken at 6ad73a9b. The shape, the areas and the error count are otherwise identical.

THE MECHANISM IS NOT INFERRED — THE SUITE DOCUMENTS IT, AND DESIGNS FOR IT. tests/clearing/conftest.py's pinned fixture says so in its own words:

This does NOT degrade to a skip when the gitlink is absent, and that is deliberate: .github/workflows/pytest-suite.yml initializes openXwallet before the suite and pins the skipped count EXACTLY, so a directory that quietly turned into skips is the condition that pin exists to catch. An uninitialized gitlink must fail here, loudly, the way tests/trust-anchor/ treats its own unavailable parent set.

So the 94/50 is not a defect this branch introduced and not a defect at all — it is the deliberate, documented refusal of a suite that will not silently skip a missing pinned reader. The failures are a statement about the CHECKOUT, and the remedy is git submodule update --init --recursive.

AND CI AGREES, ON BOTH HEADS. pytest-suite runs on the GitHub runner, which initializes the submodules before the suite:

  • 6ad73a9b (the head the claim was raised against) — pytest-suite success, run 34785252290, job 103799470129, 21:55:56Z → 22:15:24Z. All ELEVEN checks on that commit are success: pytest-suite, SonarCloud Code Analysis, clearing-dispatch-gate, copilot-pull-request-reviewer, lane-line, merge-master-approval, openreposhape-pin, openspec-cli-pin, release-tag-gate, signed-execution-chain-gate, wallet-validation.
  • b236a0ed (this head, merged current with main) — pytest-suite running; the other eight checks already pass.

THE TWO DETACHED LOCAL FULL-SUITE RUNS ARE REPORTED HONESTLY: THEY DID NOT FINISH AND ARE NOT RELIED ON. The previous session left a 6ad73a9b branch clone and a pristine origin/main clone running the whole suite, both with submodules initialized. At this writing they stand at 50% and 48% after ~80 minutes and are advancing ~3% per 14 minutes, against the runner's 19.5 minutes for the whole suite. They are corroborating-if-they-finish and nothing rests on them — the A/B above answers the same question on the same commit in 100 seconds, and answers it better, because it isolates the one variable instead of comparing two trees that differ in many.

WHAT THIS BRANCH'S OWN SUITE DOES ON A CORRECTLY INITIALIZED TREE, on the merged head, beyond the 338 above: tests/code_surface 115 passed, tests/scope_globs 88 passed, and the touched areas together — code_surface, scope_globs, target_release, sequenced_after, openspec_cli_pin, doc-health — 2481 passed, 0 failed in 415.99s.

CONCLUSION: the branch's suite is green, and the 94 failures / 50 errors were environmental — a checkout without its submodules, refused loudly by design. Nothing on this branch is implicated.

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

Required register propagation remains incomplete, alongside unresolved validation, test, diagnostic, and review-record issues.

Get a fresh assessment by requesting another Copilot review.

Review details

Suppressed comments (2)

scripts/code_surface.py:397

  • When indicator is |, this diagnostic calls it a YAML folding indicator, but | is the literal block-scalar indicator. Because the requirement requires naming this construct, the message should use the accurate shared term (or distinguish > from |).
            f"opens with the YAML folding indicator `{indicator}`. "

tests/code_surface/test_code_surface_gate.py:869

  • The new test name contains the typo glosss, which makes the head-versus-gloss check harder to read and search.
def test_the_derived_set_is_the_heads_identifiers_and_none_of_the_glosss():
  • Files reviewed: 7/7 changed files
  • Comments generated: 4
  • Review effort level: Lite

Comment thread scripts/validate-scope-globs.py Resolved
Comment thread scripts/scope_globs.py Resolved
Comment thread scripts/code-surface-register.yaml Resolved
…zation

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Copilot AI review requested due to automatic review settings September 14, 2026 04:57
Brett Heap and others added 2 commits September 14, 2026 05:00
…eclares

The absence carrier had two populations and only one of them is ratified. A
PRESENT head the grammar cannot read has no head to derive from — "Where a
proposal passes the gate only because the closed register names it — its head
being one the grammar cannot read, there is no head to derive from" — and that
is what `NoDeclaredRepositories` exists for. An OMITTED key is not that: it
"declares the default", the default is `code_surface: none`, and the derivation
requirement rules that head in terms — "WHERE THE HEAD IS `none` THE DERIVED
SET SHALL BE EMPTY".

So the two are separated where the loader already separates them: the key's
presence in the mapping, not the value's type. An omitted key derives `set()`
and a scope key beside it is the ORDINARY cross-consistency finding against the
SCOPE; a key present in a shape no reader can read still fails closed, because
the promoted default is available by OMITTING the key rather than by writing it
unreadably.

Six regression tests: the empty set for an omitted key, the ordinary refusal
beside a scope both directly and end to end at the CLI, the present-not-text
and present-but-empty arms still failing closed, and the carrier's declaration
now QUOTED in the refusal (it was write-only) bounded to one line.

Refs #1013

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Fable 5.1 <[email protected]>
…id not

The docstring at `_code_surface()` and tasks.md § 3.5 both said the shipped
`test_the_sequenced_after_sibling_is_NOT_imported_at_module_import_time`
covered the new deferral. IT DOES NOT — it asserts only that
`sequenced_after`/`sequenced_after_substrate` are absent from `sys.modules`.

MEASURED RATHER THAN REASONED. With `import code_surface` hoisted to module
level in this repository's own scripts/ idiom (a `sys.path.insert` of the
module's own directory, then a bare import), that test PASSES — and a
`scope_globs.py` copied out beside only `frontmatter_strict.py`, exactly what
codexFactory's merge gate vendors, raises `ModuleNotFoundError: No module named
'code_surface'`. The net that was claimed to exist had a hole the size of the
contract it was protecting.

Two tests now, both proven to fail under that hoist and to pass on the shipped
tree: the bare-subprocess `sys.modules` probe for the new sibling, and the
vendoring contract itself — this module and `frontmatter_strict.py` alone in a
directory, imported — which no `sys.path` accident can defeat.

The shipped behaviour was correct throughout; only the evidence was missing.
The docstring and the § 3.5 box are corrected to name the tests that exist.

Refs #1013

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Fable 5.1 <[email protected]>
@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-5 (openXfactory-5)

Realized-vs-ratified scenario table (head b236a0e)

Read-only pass: fresh clone of change/gate-code-surface-declarations-realization at commit b236a0ed ("Re-measure the register at the landing head: the eighth carrier, registered"). Never pushed to this branch. Packet read in full: openspec/changes/gate-code-surface-declarations/specs/release-realization/spec.md (18 scenarios / 3 requirements, 10+4+4), design.md D1–D9, tasks.md § 3.

Requirement: Code-surface declaration grammar is gated (10 scenarios)

# Scenario WHEN → THEN Realized where Pinned by Status
1 Head runs into prose possessive/apposition/", and…" with no gloss opener, unregistered → validator fails, naming path+text code_surface.py::parse_head L424-432 (raise); consumed by scan() L748-757 test_a_head_that_runs_into_prose_with_no_opener_is_refused L170, test_a_possessive_is_refused L176, test_an_apposition_is_refused L182, test_an_active_unreadable_head_is_refused L363 (CLI e2e), test_the_finding_names_the_path_and_the_declaration_text L372 OK
2 Declares the empty code surface code_surface: none, with/without gloss → passes parse_head L439-441 (is_none=True) test_a_bare_none_is_the_empty_surface L219, test_a_none_with_a_gloss_is_still_the_empty_surface L224, test_a_none_declaration_passes L387 (CLI e2e) OK
3 Declares one repository, explains itself single id + gloss opener (em dash / paren / full stop) → passes, set = {id} parse_head loop L407-421 + _GLOSS_OPENER_RE test_a_gloss_after_an_em_dash_is_not_judged L116, ..._opening_parenthesis.. L123, ..._full_stop.. L129, test_a_conforming_declaration_passes L380 (CLI e2e) OK
4 Declares several repositories 2+ ids sep by , / and / + → passes, set = all; <owner>/<name> admitted same as bare name parse_head loop L407-422; REPOSITORY_RE test_both_identifier_spellings_may_share_one_head L151, test_every_ratified_list_separator_is_admitted L158 (5 params), test_an_owner_name_address_is_admitted_on_the_same_terms L145, test_a_head_with_no_gloss_at_all_is_admitted L163 OK
5 Head mixes none with a repo id mixed head, either order → refused, no derived set, holds at every list position parse_head L439-451 test_a_mixed_none_head_is_refused_wherever_the_token_sits L239 (4 params) OK
6 Declaration is a YAML block scalar opens with a YAML folding indicator (>-, or the literal-style one, &#124;) → refused, names the indicator (not a generic "unreadable") parse_head L394-402 (_BLOCK_SCALAR_RE) test_a_block_scalar_declaration_is_refused_by_name L259 (6 params), test_the_block_scalar_refusal_is_not_merely_an_unreadable_head L267 OK
7 Declares code surface twice 2 headers, loader joins them → refused, naming the proposal declaration() L473-480 (_REPEATED_HEADER_RE) test_a_repeated_declaration_is_refused_not_half_read L300, test_a_repeated_declaration_is_a_finding_not_a_crash L309 (CLI e2e); negative: test_an_indented_gloss_line_is_a_gloss_and_not_a_repeat L317 OK
8 Declares no code surface key wholly absent → passes (doc-only default) declaration() L469-470; scan() L744-745 test_an_undeclared_field_is_absent L286, test_a_document_with_no_fence_declares_nothing L291, test_declaring_nothing_takes_the_promoted_default L340 (CLI e2e) OK
9 Declares the key with no value code_surface: present, empty → refused, default was available by omission parse_head L388-393 test_a_present_but_empty_declaration_is_refused L347 (CLI e2e), test_the_empty_declarations_refusal_names_the_remedy L354 OK
10 Archived proposal, unreadable head archive scan hits ungrammatical head → not a finding, only counted scan() archive loop L770-781 (except CodeSurfaceError: continue # read, never judged) test_an_archived_unreadable_head_is_not_a_finding L407, test_the_run_reports_how_many_such_records_the_archive_carries L415 OK

Requirement: The declared repository set is derived from the head and never from the gloss (4 scenarios)

# Scenario WHEN → THEN Realized where Pinned by Status
11 Consumer derives the set from a declaration with a gloss derived set = head's identifiers only, none of the gloss's scope_globs.py::code_surface_repositories L603-671, return set(head.repositories) L671 test_the_derived_set_is_the_heads_identifiers_and_none_of_the_glosss L869, test_a_multi_repository_head_derives_every_member L877 OK
12 Structured scope names a gloss-only repository scope repo appears in gloss, not head → cross-consistency check refuses validate_cross_consistency() L569-575 ("not in code_surface") test_a_structured_scope_naming_a_gloss_only_repository_is_refused L893 (CLI e2e via validate-scope-globs.py); negative test_a_structured_scope_naming_the_declared_head_passes L908 OK
13 Declaration of none read for its repository set none head, gloss names repos → derived set MUST be empty code_surface_repositories() → set(head.repositories) = set() for a none head test_a_none_head_derives_the_empty_set_and_the_gloss_adds_nothing L883 OK
14 Registered-exception packet later declares a structured scope register-carried unreadable head + scope_globs: → refuses naming proposal+entry; no whole-declaration fallback; no empty-set substitute; remedy = bring into grammar NoDeclaredRepositories L486-521; validate_cross_consistency() carrier branch L541-568; CodeSurfaceHeadError L118-132; code_surface_repositories() register lookup L656-670 test_a_registered_packet_declaring_a_scope_is_refused L946, test_the_refusal_forbids_the_whole_declaration_fallback_by_name L964, test_the_refusal_forbids_the_empty_set_substitution_by_name L989, test_the_refusal_names_the_remedy L1010, test_an_unreadable_head_the_register_does_not_name_also_fails_closed L1023, test_a_registered_packet_declaring_a_scope_reds_the_scope_gate_end_to_end L1052 (CLI e2e) OK

Requirement: Standing code-surface divergence is named in a closed register (4 scenarios)

# Scenario WHEN → THEN Realized where Pinned by Status
15 Standing declaration named by the register live entry carries decl/class/reason/citation/retirement → reported, never refused scan() covered-key branch L751-755; register_entry_for() L629-642 test_a_registered_declaration_is_reported_not_refused L808 (CLI e2e); live: test_every_register_entry_carries_the_live_declaration_byte_for_byte L1114, test_every_register_entry_declares_a_known_class_and_a_citation L1101 OK
16 Entry appended to the closed register entry not in closed baseline → refused; exception needs a CLOSED_REGISTER edit in the same PR load_register() L610-623 (CLOSED_REGISTER check) test_an_entry_outside_the_closed_baseline_refuses L652, test_an_entry_whose_declaration_moved_off_the_baseline_refuses L659; negative test_a_baseline_wider_than_the_register_is_lawful L670; live: test_the_closed_baseline_is_exactly_the_registers_own_population L1134 OK
17 Register entry matches nothing whole-corpus scan: entry unmatched (archived / corrected) → refuses, distinct exit 2, naming the entry scan() stale computation L763-765; exit-2 logic validate-code-surface.py L105-118 test_an_entry_that_matches_nothing_refuses L816, test_an_entry_stops_matching_when_the_declaration_is_corrected L824, test_an_entry_whose_packet_archived_refuses L834; both-at-once test_a_finding_and_a_stale_entry_are_both_reported L843 (exit 1 per the "both occur" rule) OK
18 Corpus moves between drafting and landing new carrier lands before the gate lands → register re-measured at landing head, new carrier disposed of there; a stale register is never treated as landing-tree evidence Mechanism only: scan() always reads the live tree fresh (no caching); load_register()'s CLOSED_REGISTER baseline (L610-623) forces an explicit, reviewable edit for any new carrier. Demonstrated at this branch's actual landing history: CLOSED_REGISTER's 8th tuple (code_surface.py L313-314) + code-surface-register.yaml L322 register encode-wallet-authority-rulings-r6-r12, the carrier that arrived between the two re-measurements per tasks.md § 3 preamble No dedicated named test. 5-line CLI repro run this session: an old/empty register scanned against a tree holding an unregistered new off-grammar carrier → exit 1 (does not silently pass); same tree with the carrier registered → exit 0. test_corpus_code_surface_validates L1070 is what reds a future PR if a real new carrier lands undisposed, but no test simulates the drafting-vs-landing tree pair itself PARTIAL

17 OK / 1 PARTIAL / 0 GAP

Validator + test totals (all run this session, at head b236a0ed)

  • python3 scripts/validate-code-surface.py . — exit 0:
    code_surface: 46 active proposals, 46 declaring — 4 `none`, 34 a repository list, 8 named by the register, 0 outside the grammar.
      archive (read, never judged): 167 proposals, 121 declaring, 3 of them outside the grammar.
    code_surface validation passed (every active declaration's head is admitted).
    
  • python3 -m pytest tests/code_surface -q — 115 passed (115 collected via --collect-only)
  • python3 -m pytest tests/scope_globs -q -m "not postgres" — 88 passed
  • Register entry count in scripts/code-surface-register.yaml (8 change: keys: block-scalar 1, possessive 1, apposition 1, list-runs-into-prose 5) == code_surface.CLOSED_REGISTER tuple count (8). Confirmed by direct read of both, not merely by a passing test.
  • Every test function cited in the table above was also run individually, not just as part of the full-suite total: four grouped pytest -v -k "..." invocations (one per requirement/scenario cluster) selected 65 pytest items total (31 + 10 + 11 + 13, parametrized cases expanded) and every one reported PASSED.

Note: the live head has already moved past this read (gh pr view shows b7ed0ff0 as I write this comment) — another lane is pushing fix commits concurrently, per the brief. This table is a snapshot at b236a0ed only; the counts above (46 active / 8 registered / 115+88 tests) should be re-confirmed against whatever head is current before being relied on for merge sign-off.

…est uses it

`validate-scope-globs.py` passed the front matter and the change id to the
derivation but no REGISTER, so the derivation loaded the one beside the
IMPORTED MODULE. For REPO_ROOT `.` in this repository that is the same file;
for any other scanned tree it is the wrong one, and an entry that tree carried
read as unregistered — so the refusal the ratified requirement says must name
"the proposal and its register entry" could name only the proposal.

The end-to-end test was the proof: `_registered_scope_tree` builds a proposal
and no register, and the subprocess named none, so
`test_a_registered_packet_declaring_a_scope_reds_the_scope_gate_end_to_end` ran
the UNREGISTERED arm and passed on two assertions the unregistered arm also
satisfies. Its name was the only registered thing about it.

Both sides fixed. The CLI takes `--code-surface-register PATH` — spelled for
the field it belongs to, since this validator's subject is `scope_globs:` —
and without it resolves `REPO_ROOT/scripts/code-surface-register.yaml` when the
scanned tree carries one. A NAMED register that cannot be used refuses (exit 2,
the sibling's semantics); an unnamed default that cannot be read falls back to
the derivation's own on-demand load, because an absent exception file may never
turn a fail-closed into a fail-open.

Measured on a fixture tree: without the register, "not carried by the closed
code-surface register either"; with it, "entry `c`, class `list-runs-into-prose`,
retiring when an event". Four tests now — the registered arm naming the entry,
the unregistered arm, the scanned-tree default, and the named-but-unusable
refusal.

Also: the carrier's `declaration` is named ONCE and never twice — the head
grammar's own refusal already quotes it; the not-text arm's detail does not, and
now the refusal does.

Refs #1013

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Fable 5.1 <[email protected]>

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

Unresolved moderate findings remain in register evidence, symlink-loop handling, vendored-import coverage, and end-to-end register testing.

Get a fresh assessment by requesting another Copilot review.

Review details

Suppressed comments (8)

scripts/code-surface-register.yaml:17

  • This register header still says the gate lands with seven non-conforming declarations, but the same file now carries an eighth landing-head exception (encode-wallet-authority-rulings-r6-r12). Distinguish the drafting measurement from the landing measurement here so the register's rationale and its actual closed baseline do not contradict each other.
# authoring, the standing corpus does not all meet the grammar: of the 45
# active declarations at `origin/main` `bcde1575`, 38 already wrote a head then
# a gloss opener and SEVEN did not. Refusing those seven at the gate's landing
# would refuse a corpus whose every carrier is ANOTHER lane's ratified packet,
# and correcting them would re-punctuate another lane's ratified prose — which
# for one of the seven is not a re-punctuation at all but a judgment about what
# counts as a repository, in a packet that exists to answer exactly that.

scripts/code-surface-register.yaml:315

  • This diff adds an eighth live register entry (encode-wallet-authority-rulings-r6-r12), while the PR description's register-population table, closure claim, and validator transcript still report seven. Please synchronize the PR description and recorded validation counts with the landing-tree population; otherwise the approval evidence is internally inconsistent.
  #
  # WHY IT IS REGISTERED AND NOT CORRECTED, in D3's own terms: correcting this
  # head is not a re-punctuation but a JUDGMENT, and a larger one than
  # `split-opendox`'s. The declaration names FOUR FILE PATHS where the grammar
  # wants REPOSITORY IDENTIFIERS, so making it readable means deciding that the

scripts/code_surface.py:676

  • Path.resolve(strict=True) can raise RuntimeError for a symlink loop, not just OSError. A loop under openspec/changes therefore escapes _unescaped() and crashes the validator instead of being dropped as the path-boundary contract requires; catch the loop exception with the other resolution failures.
        resolved = candidate.resolve(strict=True)
        resolved_root = repo_root.resolve(strict=True)
    except OSError:

scripts/code_surface.py:314

  • The PR description still says the closed register has seven entries and reports 44 active / 7 named / 0 outside, but this landing-head baseline adds an eighth exception (encode-wallet-authority-rulings-r6-r12) and the updated tasks record 45 active / 8 named / 1 outside. Please reconcile the description/transcripts with the code, or explain why this eighth entry should not be part of the landing change.
    ("encode-wallet-authority-rulings-r6-r12",
     "112d24ba19d1b1af0e3e1706802e3a205f323754712fe987cb16d637dd63692f"),

scripts/scope_globs.py:160

  • The vendoring contract described here is not fully pinned: the existing bare-subprocess probe only asserts that sequenced_after is absent from sys.modules, not that this newly added code_surface sibling is absent too. A future module-level import of code_surface would therefore pass the integrity test while breaking the vendored copy; extend that probe with an explicit code_surface absence assertion.
    THE IMPORT IS DEFERRED RATHER THAN MODULE-LEVEL, FOR `_sequenced_after`'S
    REASON AND NOT A NEW ONE. This file is VENDORED BYTE-FOR-BYTE into
    codexFactory's merge gate, which vendors only this module and
    `frontmatter_strict.py`; a module-level import of a THIRD sibling would make
    that vendored copy UNIMPORTABLE — breaking every merge-gate path — for a
    function the merge gate never calls (`code_surface_repositories` has exactly
    one in-tree caller, `validate-scope-globs.py`, and the merge gate is not
    it). Deferred, the vendored copy keeps working unchanged, and a caller that
    does reach this path without the sibling present gets a named
    `ScopeGlobsResolutionError` instead of an import traceback.
    THE DEFERRAL IS PINNED FOR THIS SIBLING IN ITS OWN RIGHT.
    `tests/scope_globs/test_integrity.py` carries
    `test_the_code_surface_sibling_is_NOT_imported_at_module_import_time`

tests/code_surface/test_code_surface_gate.py:869

  • The new test name contains the typo glosss; please rename it to gloss so the test is discoverable and readable.
def test_the_derived_set_is_the_heads_identifiers_and_none_of_the_glosss():

tests/code_surface/test_code_surface_gate.py:1064

  • This test creates a temporary register containing c, but the subprocess invokes validate-scope-globs.py without any register path; that CLI consequently loads the house register, where c is not present. The assertion therefore exercises the unregistered fail-closed branch and cannot detect a regression in propagating or reporting a matching register entry through the end-to-end scope validator; either provide the test register through the CLI or arrange the subprocess tree so it uses that register.


def test_a_registered_packet_declaring_a_scope_is_refused(tmp_path):
    root, declaration = _registered_scope_tree(tmp_path)
    front = sg.read_front_matter(
        root / "openspec" / "changes" / "c" / "proposal.md")
    register = cs.load_register(_register(root, _entry_text("c", declaration)))

tests/code_surface/test_code_surface_gate.py:639

  • This new test name is grammatically incomplete (is_one_the_measurement_found) and makes the assertion harder to discover. Rename it to test_every_declared_class_was_found_by_measurement.
def test_every_declared_class_is_one_the_measurement_found():
  • Files reviewed: 8/8 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread scripts/code_surface.py Resolved
Copilot AI review requested due to automatic review settings September 14, 2026 05:07
Brett Heap and others added 2 commits September 14, 2026 05:11
…a scenario

HAZARD: `validate-code-surface.py` printed the stale block and the findings
block as two un-cross-referenced sections. When both name the SAME change they
are ONE event — the declaration was edited, so the entry recording the old text
matches nothing AND the new text is off-grammar too — and the two obvious
readings of two blocks are both wrong: deleting the stale entry leaves the
finding standing, and appending the new text is the closure violation the
baseline refuses. The run now says so in one line above both blocks, naming
both halves of the remedy. `Report` gains `stale_changes` so the CLI can
cross-reference without parsing a display string back apart; the two asymmetric
blocks are printed beneath it unchanged.

NIT: a head that REPEATS the sentinel (`none, none`) reported "1 repository
identifier(s) ()" — a miscount and an empty parenthetical where the reader
looks for the name of the thing complained about. It now names the duplicate;
a genuinely mixed head still says "mixes … (openxFactory, codexFactory)".

NIT: `code_surface.scan(register=None)` — the branch every caller but the CLI
takes — was untested. Pinned by equality with the same scan given the house
register explicitly, over the real tree, with a guard against passing vacuously.

TYPO: `test_the_derived_set_is_the_heads_identifiers_and_none_of_the_glosss`
carried a trebled `s` and a possessive that made the assertion hard to scan.
Renamed to `test_the_derived_set_is_the_head_and_never_the_gloss`, which is the
requirement's own title.

And, for the scenario table: `test_the_corpus_moves_between_drafting_and_landing`
pins the register requirement's third scenario in its own shape — a register
written at the drafting tree, a carrier arriving afterwards, the unchanged
register refusing to cover it (exit 1, naming the new carrier and not the old),
the disposition clearing the run (exit 0, two entries), and the baseline edit
the disposition costs in the same act.

Refs #1013

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Fable 5.1 <[email protected]>
…t counts

main moved again during the fix round, so the register requirement's own
scenario fires a third time and § 3 records the third re-measurement rather
than keeping figures that were true at `bfa90db6`.

At `e6e1c968`: 47 active, 47 declaring — 4 `none`, 35 a repository list, 8
named by the register, 0 outside the grammar; archive unmoved at 167/121/3;
the sibling gate reads the same 47. One proposal arrived and one was edited
between the heads, both conform, neither is one of the eight, so no entry is
stale and the register stands at EIGHT unchanged. The scenario fired and cost
nothing, which is the shape it should have when the corpus moves without a
divergence in it.

Test counts corrected where they are now false: tests/code_surface 115 → 130
(the fifteen named, each with the finding it answers) and tests/scope_globs
88 → 90 (the two deferral pins). The fifteen-group breakdown is kept as the
record of the first landing rather than re-derived, because a fifteen-way
re-split nobody measured would be a number that looks measured and is not.

Refs #1013

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Fable 5.1 <[email protected]>

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

Unresolved review findings affect validator behavior, reporting, terminology, tests, and provenance documentation.

Review details

Suppressed comments (6)

openspec/changes/gate-code-surface-declarations/tasks.md:204

  • This heading identifies 54885296 as "the head the gate lands on", but the same task list later identifies bfa90db6 as the landing head and records the eighth carrier there. The provenance record is internally contradictory; this paragraph should label 54885296 as the first re-measurement and reserve the landing-head wording for bfa90db6.
**EVERY FIGURE IN § 3 WAS RE-MEASURED AT THE HEAD THE GATE LANDS ON** —
`origin/main` `54885296` — with the § 3.1 reader itself, and NONE is carried
from the drafting tree `bcde1575`. That is the register requirement's own
scenario *The corpus moves between drafting and landing*, obeyed rather than

scripts/code-surface-register.yaml:324

  • The PR description still reports a seven-entry standing population, but this diff adds encode-wallet-authority-rulings-r6-r12 as an eighth entry and the landing baseline now contains eight pairs. Please update the PR description's register count and lists so the review record matches the code that is being merged.
  - change: encode-wallet-authority-rulings-r6-r12
    class: list-runs-into-prose
    why: >-

scripts/code_surface.py:397

  • The matcher accepts both > and | block-scalar indicators, but this diagnostic calls every one a "YAML folding indicator". | is YAML's literal block-scalar indicator, so a declaration such as code_surface: | receives a technically false error message. Please use the neutral "YAML block-scalar indicator" wording and update the corresponding assertion.
            f"declares `{FIELD}:` with no value. The promoted doc-only default "

scripts/validate-code-surface.py:78

  • Report.findings is not limited to heads outside the grammar: scan() also appends strict-loader, UTF-8, and repeated-header failures as findings. Consequently an unreadable proposal is summarized as 1 outside the grammar, which is inaccurate and makes the validator's counts misleading. Track head-grammar findings separately or label this field as total findings instead of using the mixed list for this category.
sys.path.insert(0, str(Path(__file__).resolve().parent))

import code_surface as cs  # noqa: E402


def _report(report: cs.Report) -> None:
    print(
        f"code_surface: {report.active_total} active proposals, "

scripts/validate-scope-globs.py:204

  • When the scanned tree has no usable tree-local register, register remains None and is passed into code_surface_repositories; on an unreadable head that triggers its on-demand cs.load_register() default, which is the register beside the imported module rather than the scanned tree. A temporary/consuming tree can therefore have a foreign exception entry named in its scope failure, contrary to the tree-specific resolution documented above. Keep the no-register state as an explicit empty list (and do not fall back to the house register) so only the scanned tree can contribute exceptions.
    register: list[dict] | None = None
    if args.code_surface_register:

tests/code_surface/test_code_surface_gate.py:869

  • The new test name contains the typo glosss. Please rename it to use gloss so the test remains discoverable and consistent with the terminology used throughout this module.
    assert "SAME CHANGE" in result.stdout
  • Files reviewed: 8/8 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Copilot AI review requested due to automatic review settings September 14, 2026 05:16
Copilot AI review requested due to automatic review settings September 16, 2026 18:41
…a39141)

RULED 2026-09-16 by Brett Heap, in session (multichoice round), on the
governance note that put the register's 7→8 growth to him (PR #1029
issuecomment-5662333218): verbatim **"Keep the eighth entry"** — recorded at
issuecomment-5702650701. The growth is D3's disposition applied at the landing
head and not a count D3's ruling fixed; the baseline is the entries the
register holds WHEN the gate lands. The eighth entry
(`encode-wallet-authority-rulings-r6-r12`, class list-runs-into-prose) STANDS,
and the register lands at EIGHT on Brett Heap's word rather than on this lane's
reading alone. NOTHING THE RULING KEEPS IS EDITED: not `CLOSED_REGISTER`, not
the entry's declaration text, not its sha256 — a byte moved there would move
the digest, which is the one thing the closure pins.

Recorded in the three records the packet keeps this in, in the same words:
the entry's own `why:` in `scripts/code-surface-register.yaml`,
`CLOSED_REGISTER`'s provenance comment in `scripts/code_surface.py`, and
`tasks.md` § 3.4's eighth-carrier paragraph.

TENTH RE-MEASUREMENT, taken WITH the merge of `origin/main` `fa39141c`
(merged at `49007dc4`) rather than left for a later round:

  $ python3 scripts/validate-code-surface.py .     # exit 0
  code_surface: 47 active proposals, 47 declaring — 5 `none`, 34 a repository
  list, 8 named by the register, 0 outside the grammar.
    archive (read, never judged): 169 proposals, 123 declaring, 3 of them
    outside the grammar.
  $ python3 scripts/validate-scope-globs.py .      # exit 0

THE FIRST RE-MEASUREMENT SINCE THE SECOND AT WHICH THE ACTIVE CORPUS GREW, and
a measurement rather than an inference: `git diff --name-status
b1df95e..fa39141 -- 'openspec/changes/*/proposal.md'` is exactly two `A`
lines and nothing else — no `M`, no `D`, no `R`. `adopt-entry-grain-dispositions-form`
(#1050) declares a repository list (33 → 34) and `scope-pinned-arm-root-naming`
(#1052) declares `none` (4 → 5), the archive is UNMOVED at 169/123/3, BOTH
CONFORM and NEITHER is one of the eight — so no carrier arrived, NO ENTRY WENT
STALE (`scan().stale` is `()`) and the register stands at EIGHT untouched
(8 entries, `CLOSED_REGISTER` length 8, equal). Of the 6 commits `main` gained,
not one touches `gate-code-surface-declarations/`, `code_surface.py` or
`code-surface-register.yaml` — the two filings above, an openDox walked-root
admission (#1067), another packet's tasks § 3.4 amendment (#1035), the
openDox/openXdox consumer gate (#1059) and the `retired:` row-form carve
(#1032) — and the merge resolved ZERO conflicts. THE SCENARIO FIRED A NINTH
TIME AND AGAIN COST NOTHING; the ninth's "as this transcript/file stands" is
demoted to "at that re-measurement" in the same edit, since a clause that means
"latest" has to move every time the latest does.

tests/code_surface 153, tests/scope_globs 99, tests/target_release 96, 348 for
the three suites, all unchanged by the merge and by this edit. `OPENSPEC_TELEMETRY=0
openspec validate gate-code-surface-declarations --strict` — valid.

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Fable 5.1 <[email protected]>
brettheap added a commit that referenced this pull request Sep 16, 2026
…eside it; this PR does not carry it

TAKEN BY REWORDING, AND THE VENDORING OPTION IS RECOMMENDED AGAINST ON TWO
MEASURED COSTS RATHER THAN ON TASTE.

The header's claim was true where it was written — `measure.py` DID sit beside
`measurement-b1df95ee.md` in the writer's own attachments directory — and became
false when the reading alone was vendored into the packet. That is now what the
header says, and it names the two JSON dumps as uncommitted in the same breath
(§ 5.3 pointed at both as though they were here).

WHY NOT VENDOR IT — BOTH COSTS MEASURED, AND BOTH RECORDED IN D7 SO THE NEXT
READER DOES NOT RE-OPEN IT:

1. IT WOULD RAISE THE NUMBER THIS PACKET REPORTS. `measure.py` carries five
   `openspec/changes/…` tokens. Diffed against this branch's token set, two are
   new and one of them resolves DANGLING(identity-half) — committing the
   instrument is +1 remainder, D5's own self-counting mechanism taken a second
   time for no extra reading.
2. IT WOULD MOVE THE `code_surface:` DECLARATION. A file under
   `openspec/changes/…/evidence/` is a packet artefact and NOT a member of
   `scripts/` — no fence, no validator arm and no gate import moves, and D7 now
   says so explicitly — but `.openspec.yaml` states this pull request "adds no
   script, no workflow and no test" and the declaration's gloss states it
   "carries the PACKET ONLY". Both would change, and the changed head would owe
   a fresh probe against PR #1029's `scripts/validate-code-surface.py`. A bench
   round is not where a declaration's scope moves.

WHAT REPLACES THE CLAIM IS AN ANSWER TO THE REAL QUESTION — what a clean
checkout can reproduce — kept in three parts rather than one: D0's outcome
counts, reproducible from a STATED recipe and already reproduced twice by
independent re-implementations that never read the instrument; the § 1.2 and
§ 1.3 readings, reproducible from rules those committed sections state; and the
§ 5 CLASSIFICATION, which NO instrument reproduces, by design — D4's whole
recommendation is that intent is not a machine's to assert, and what § 5 offers
instead is an evidence line per token at `path:line`.

AND THE FIX ITSELF DECLINES TO MINT A TOKEN: the new-token spelling in D7 is
described rather than written out, because writing it would add the very
citation the sentence is about. Re-measured after the edit — tokens 595,
remainder 82 — unchanged from before it.

Copilot thread PRRT_kwDOTAvnrs6jCby5 on openxFactory PR #1069.

Lane: openxfactory-1
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

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

Handle Path.resolve() symlink-loop failures so escaped candidates are dropped instead of causing a traceback.

Review details

Suppressed comments (1)

scripts/code_surface.py:770

  • Path.resolve(strict=True) can raise RuntimeError for a symlink loop, not only OSError. A loop under openspec/changes therefore escapes this drop path and can make validate-code-surface.py traceback instead of treating the candidate as an escaped path, contrary to _unescaped's contract. Normalize this resolution failure here so the candidate is dropped.
    which closes the escape at every component in ONE comparison rather than one
    component at a time as each is found. `repo_root` is resolved on BOTH sides,
    so a `repo_root` that is ITSELF reached through a symlink (a scratch tree
    under a symlinked `/tmp`, say) is not mistaken for the escape.

  • Files reviewed: 9/9 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Copilot AI review requested due to automatic review settings September 16, 2026 18:48
@brettheap
brettheap marked this pull request as ready for review September 16, 2026 18:50

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

Sorry @brettheap, your pull request is larger than the review limit of 150,000 diff characters

@sonarqubecloud

Copy link
Copy Markdown

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

Update stale validation counts and correctly reject explicit empty or unusable register paths.

Review details

Suppressed comments (4)

scripts/code-surface-register.yaml:160

  • The PR description's advertised current transcript stops at the ninth remeasurement (b1df95ee, 45 active / 4 none / 33 repository lists), but this checked-in register now records a tenth landing at fa39141c with 47 active / 5 none / 34 repository lists. Please update the PR description and validator transcript to match the tree this change actually reviews; otherwise the reported validation counts are stale and cannot be reproduced from this branch.
# TENTH re-measurement, at `origin/main` `fa39141c` — THE MAIN HEAD MERGED AT
# RE-MEASUREMENT as this file stands (merged at `49007dc4`), taken WITH the
# merge again: 47 active proposals, 47 declaring, 5 `none`, 34 a repository
# list, EIGHT named by this register, 0 outside the grammar, with the archive
# UNMOVED at 169 read / 123 declaring / 3 outside. THE FIRST RE-MEASUREMENT

scripts/validate-code-surface.py:112

  • The same truthiness check makes --register "" silently fall back to the house register. That contradicts the named-register contract and can validate against a different exception set; distinguish an omitted option from an explicitly supplied empty path with is not None.
            Path(args.register) if args.register else cs.REGISTER_PATH)

scripts/validate-scope-globs.py:357

  • An explicitly supplied empty value is falsy here, so --code-surface-register "" silently takes the scanned tree's default/NO_REGISTER branch instead of attempting the named path and returning the documented exit-2 refusal. Test for presence (is not None) so an operator-supplied path is never reinterpreted as omission.
    if args.code_surface_register:

scripts/validate-scope-globs.py:206

  • Path.exists() returns False when it cannot stat the path (for example, an inaccessible ancestor), so an unusable default register can be classified as absent and the scan proceeds with NO_REGISTER instead of the required exit-2 refusal. The probe needs an error-aware lstat/lexists check that distinguishes a genuinely absent path from permission/I/O failures and routes the latter through load_register.
    return reached_through_a_symlink or default.is_symlink() or default.exists()
  • Files reviewed: 9/9 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-5 (openXfactory-5)

Copilot round after un-draft (review 5226957575): 0 threads, 1 suppressed finding, deferred

The un-draft at 2026-09-16T18:50:41Z fired Copilot's final round on head 4385d6d3. It generated 0 new inline comments and opened 0 new threads (effort level "Lite", 9/9 changed files reviewed). Unresolved review threads on this pull request stand at 0 of 18. There is nothing to reply to and nothing to resolve.

The review body does carry ONE SUPPRESSED comment, which is recorded and dispositioned here rather than passed over in silence.

The claim

At scripts/code_surface.py:770 (_unescaped):

Path.resolve(strict=True) can raise RuntimeError for a symlink loop, not only OSError. A loop under openspec/changes therefore escapes this drop path and can make validate-code-surface.py traceback instead of treating the candidate as an escaped path, contrary to _unescaped's contract. Normalize this resolution failure here so the candidate is dropped.

Verdict: CONFIRMED, by measurement

Measured on the interpreter CI actually runs (.github/workflows/pytest-suite.yml pins python-version: "3.12"; the measuring shell is Python 3.12.3), for the leaf case and for a loop in a PARENT component both:

$ ln -s a b && ln -s b a
>>> import pathlib
>>> pathlib.Path("a").resolve(strict=True)
RuntimeError: Symlink loop from 'a'
>>> isinstance(caught, OSError)
False
>>> (pathlib.Path("a") / "proposal.md").resolve(strict=True)
RuntimeError: Symlink loop from 'a'

_unescaped catches except OSError: only (scripts/code_surface.py:775-778), so a committed symlink loop under openspec/changes would raise past the guard. The function's own docstring promises the opposite ("a path that fails this test is DROPPED rather than reported as a finding"), and a traceback is neither a drop nor a finding. The claim is true as written.

Disposition: NOT fixed in this pull request

Four reasons, each a fact about the tree rather than a preference.

  1. The shape is the RATIFIED SIBLING'S, not this packet's invention. _unescaped's docstring says in terms: "target_release._unescaped is the exact shape this mirrors." That sibling carries the identical except OSError: at scripts/target_release.py:394 and again at :630, and scripts/proposal-support.py:343-346 carries it a third time. Widening the catch in code_surface.py alone would FALSIFY the mirror claim the docstring makes.
  2. This pull request does not touch those files. git diff --name-only origin/main...HEAD is nine files: openspec/changes/gate-code-surface-declarations/tasks.md, scripts/code-surface-register.yaml, scripts/code_surface.py, scripts/scope_globs.py, scripts/validate-code-surface.py, scripts/validate-scope-globs.py, tests/code_surface/test_code_surface_gate.py, tests/scope_globs/test_integrity.py, tests/scope_globs/test_validate.py. Reaching into gate-realization-axis-vocabulary's realized surface as a rider on this landing is exactly the act this lane has declined all along: it REGISTERED the eighth carrier rather than re-punctuate another lane's ratified prose, and the same restraint applies to another packet's shipped code.
  3. It is not a regression of this head. The guard has stood unchanged through four fix rounds and three prior Copilot rounds on this branch, all of which passed it. Copilot itself SUPPRESSED the comment rather than opening a thread on it.
  4. Nothing in the estate reproduces it. The finding needs a COMMITTED symlink loop under openspec/changes, and no tree here carries one.

The remedy belongs to ONE deliberate change across all three modules (code_surface, target_release, proposal-support), so the mirror stays true and the sibling's ratified surface moves on its own act with its own tests rather than silently under a landing. It will be filed as a follow-up issue after this pull request lands, and this comment is the record it will cite.

Refs #1013

Lane: openxfactory-5 (openXfactory-5)

@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-5 (openXfactory-5)

Landing disposition of the one red check on 4385d6d3, 2026-09-16T19:12Z. pytest-suite run 35136608867 finished 1 failed / 7715 passed / 6 skipped. The one failure is tests/doc-health/test_modified_block_currency_self_gate.py::test_the_resolution_ordering_and_marker_classes_read_zero_over_the_real_tree: the self-gate reports two subjects it does not name, ('adopt-entry-grain-dispositions-form', 'document-lifecycle', 'Prose tagging marker hygiene') and ('scope-pinned-arm-root-naming', 'document-lifecycle', 'Prose tagging marker hygiene').

This failure is main's own, not this PR's: main at fa39141c fails the identical test with the identical two subjects (pytest-suite run 35135352984, 18:35Z). The two subjects are the proposals landed by lane openxfactory-2's PR #1050 (fa39141c) and PR #1052 (f8eba345) at 18:33Z and 18:35Z. This PR touches nine files, none under docs/, openspec/specs/, doc-health, or either proposal, and its prior head 2561420f passed the same test before the merge of main. Every other check on 4385d6d3 passes (SonarCloud, clearing-dispatch-gate, former-id-arrival-gate, lane-line, merge-master-approval, openreposhape-pin, openspec-cli-pin, openxdox-consumer-gate, release-tag-gate, signed-execution-chain-gate, wallet-validation). Copilot's post-un-draft round left 0 threads.

Landing proceeds under Brett Heap's word of 2026-09-16 ("Un-draft and land now"), on the lane's standing clause that a pre-existing failure verified identical on main does not hold a landing. The self-gate re-measurement belongs to the lane whose proposals moved the corpus; lane openxfactory-2 has been told. Refs #1013.

Lane: openxfactory-5 (openXfactory-5)

@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-5 (openXfactory-5)

LANDING — lane openXfactory-5, session 651195c7-1854-491e-894a-e6542ef5e9f4@Eagle, 2026-09-16T19:10:12Z, PR #1029 into opensoft/openxFactory main

@brettheap
brettheap merged commit 4cef77a into main Sep 16, 2026
14 of 15 checks passed
@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-5 (openXfactory-5)

LANDED — lane openXfactory-5, session 651195c7-1854-491e-894a-e6542ef5e9f4@Eagle, 2026-09-16T19:11:46Z, PR #1029 into opensoft/openxFactory main → merge 4cef77a; Realize gate-code-surface-declarations § 3: gate the code_surface: head

@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-5 (openXfactory-5)

Follow-up filed: #1074 (the suppressed Copilot finding deferred above, measured across the three modules at 4cef77af). One correction to the disposition comment: scripts/proposal-support.py has no _unescaped; its equivalent is _contained() at lines 341-349, and its clause is already except (OSError, ValueError): (line 347), one type wider than stated. RuntimeError from a symlink loop is still uncaught there, as it is in code_surface._unescaped (line 777) and target_release._unescaped (line 630); target_release._registry_present (line 394) is shielded by its own is_dir() pre-check except when the repository root itself sits behind a loop. Transcripts are in #1074. Refs #1013.

Lane: openxfactory-5 (openXfactory-5)

brettheap added a commit that referenced this pull request Sep 17, 2026
…ty, and the fifteen carried into it (#1071)

Lane: openxfactory-4 (openXfactory-4-openDox_extraction)

Refs #656 (stays OPEN).
CLAIM: [`5703096449`](#656 (comment))

**`split-opendox-two-layer-product` § 5.2a, realized: the FIFTEEN engineering-vocabulary requirements are RE-PROMOTED under the successor capability this packet authors, `openxfactory-engineering-adapter`.** Filing only — `Status: draft` on all three lifecycle documents, no ratification, no archive, no tick.

## Why now

The box says the successor capability's *"id this task authors"* and says nothing else about it, and **three pieces of live work were waiting on that id**: § 5.6's de-floor, § 8.4's both-directions floor accounting, and two § 6 closures already open — #1060 (§ 6.1's seven `doc-health` requirements) and #1065 (§ 6.5's narrowing) — each of which carried its delta WHOLE rather than re-author it against *"the successor capability id … § 5.2a, unbuilt and assigned to another actor"*. This declares it.

## The id, derived rather than chosen (`design.md` § D1)

| measured at `fa39141c` | what it names the adapter |
|---|---|
| the ratified per-requirement map, **15 of 15** openxFactory rows, identical phrasing | *"openxFactory's OWN ENGINEERING ADAPTER, the small package beside `scripts/doc_health/` that implements openDox's corpus-adapter seam (RULING DQ-1)"* |
| `design.md` § D3 column head · § D1 topology · `proposal.md` (9) | *"the engineering mapping"* · *"its OWN engineering adapter"* · *"a small ENGINEERING ADAPTER PACKAGE"* |
| bigram count over the whole packet | **"engineering adapter" 22** · "corpus adapter" used as ITS name **0** |
| landed § 2.2a package (#725 → `ea4e6ff2`) | `scripts/corpus_adapter_openxfactory/`, sole public class `OpenxFactoryCorpusAdapter` |
| landed § 4.4 profile (#984 → `a1ef886f`) | `contracts/domain-profiles/openxfactory-engineering.yaml`, `mapping_id: openxfactory-engineering` |

Head noun = the packet's own name for it. The `openxfactory-` qualifier stays because `corpus-adapter-seam` requirement 4 (*"one implementation and carries no privileged path"*) is made load-bearing by DQ-1 — an unqualified `engineering-adapter` would read as the NEUTRAL capability, which is openDox's under RULING Q4. Spelling is fixed by the two landed machine names. Rejected with reasons: `corpus-adapter-seam`, `engineering-adapter`, `corpus-adapter-openxfactory`, `openxfactory-engineering` (taken). **A different id is a one-command rebuild** — the delta is generated, not typed.

## Measured

* **The fifteen come out fifteen.** All 102 `## REMOVED` rows of the packet's map classified by the destination each **Reason** names: **openDox 71 / openXdox 16 / openxFactory 15** — RULING DQ-1's map exactly.
* **Carried, not authored.** Lifted from `openspec/specs/ideation-dashboard/spec.md` BY TITLE by script: 102 promoted requirements, **0 of 15 missing**, titles character-for-character identical (which is what makes the successor a distinct `promotion_fidelity` key), **49,829 source bytes, 84 scenarios**, all fifteen carrying `SHALL` on the FIRST body line.
* **TWO edits, and the count is itself a finding** (NARROWED from six after Copilot rounds 1 and 3 — dispositions in the comments below). Six path-literal occurrences sit in the fifteen; only two name a question the six-wide seam answers as its requirement states it, and both are `resolve`, both in *doxBench resolves its released contract from the checkout it runs in* — the literal the governing `design.md` § D2 names `resolve` for in terms (*"the operation `corpus_root.py` performs today with a path literal"*).
* **The other four are RECORDED NON-EDITS**, each with the operation it would have needed (`design.md` § D2): a topic's EXISTENCE under `ideation/staging/` — `list_documents` lists under DECLARED scopes, the home adapter declares `documents`/`lifecycle` and no staging scope, and the interface's own docstring insists an empty corpus stays distinguishable from an unreadable one, so listing-emptiness cannot carry that refusal; the DESTINATION of authoring the console must not perform; and twice the workspace returned documents land in. **What would unblock them** — a declared staging scope, or an answer that keeps *absent* and *empty* apart — is openDox's to declare under RULING Q4, and `tasks.md` § 4.5 carries it as a BLOCKED box in the shape § 6.1 and § 6.5 used for named-not-performed work.
* **Two further non-edits, for a complete census**: `proposal.md` ×4 (a document's identity — `DocumentId.key` is declared opaque at `scripts/corpus_adapter.py:213-224`), `OPENXFACTORY_ROOT` ×3 (a rung of requirement 10's own ladder). `main` ×1 is a git ref.
* **The carry is proved, and the proof verifies the COMMITTED artifact.** `review/build-delta.py` is committed inside the packet: it aborts unless each declared edit matches EXACTLY ONCE, REVERSES them and asserts byte equality against the promoted text, and — run without `--write` — READS the committed delta and compares, so a hand-edited delta cannot pass. Mutation-proved: clean tree `CHECK PASSED` exit **0**; one word changed in the committed delta `CHECK FAILED` with the diff, exit **1**; the file deleted `CHECK FAILED`, exit **1**.

## Gates on this branch

| gate | result |
|---|---|
| `openspec validate repromote-engineering-vocabulary --strict` (CLI **1.12.0**, the pinned version) | `Change 'repromote-engineering-vocabulary' is valid` |
| `review/build-delta.py .` — the packet's own verifier, in CHECK mode | `CHECK PASSED … byte-identical … 53118 bytes, sha256 c3b985ae…`. Every gate RAISES (no `assert`), proved under `python3 -O`: mutated committed delta exit **1**, broken edit-match exit **1** (`REFUSED: edit matched 0x`), clean exit **0**; a CRLF-edited delta exits **1**; a duplicate promoted title exits **1** |
| `scripts/proposal-support.py . verify` | `proposal support verification ok` |
| `openspec validate --all --strict` | **108 passed, 2 failed (110 items)** — the two are PRE-EXISTING and named: `add-chain-attestation` and `add-composed-view-authoring`, both a MODIFIED block omitting a scenario canon still carries. Neither is this packet's and neither touches the fifteen. |
| `validate-sequenced-after.py . --ledger-diff` | `per-change sweep ledger consistent with the corpus (217 rows)`; the plain run passes (48 active changes, 17 declaring; both archive-date arms pass) |
| `validate-code-surface.py .` (the gate #1029 landed) | passed — 48 active proposals, 48 declaring, 6 `none`, **0 outside the grammar** |
| doc-health `--single-repo . --family promotion-fidelity` | **No findings** — this packet promotes nothing |
| `pytest tests/code_surface tests/sequenced_after` | **439 passed** |
| ARCHIVE DRY RUN (throwaway copy of `openspec/`, pinned CLI) | `openxfactory-engineering-adapter: create` · `+ 15 added` · `Totals: + 15, ~ 0, - 0, → 0`; **0** placeholder occurrences, 15 requirements / 84 scenarios, all fifteen byte-identical delta→promoted, and `openspec/specs/ideation-dashboard/spec.md` sha256 **UNCHANGED** by the run — § D3's "removes nothing", measured |
| **`pytest-suite`** | **RED ON `main` ITSELF and not this branch's** — see comment [`5703461771`](#1071 (comment)). `main` at `4cef77af` runs `1 failed, 7715 passed`, the one failure being `test_modified_block_currency_self_gate.py::test_the_resolution_ordering_and_marker_classes_read_zero_over_the_real_tree` over two OTHER changes' MODIFIED blocks (#1052 and #1050). This packet carries no `## MODIFIED` block at all. |

## What this does NOT do

* **It authors NO second `## REMOVED` block on `ideation-dashboard` — a declared judgment, not an omission** (`design.md` § D3). The packet's ratified map is that removal's single writer; a sixth live writer would be an undeclared sibling collision this box has no authority to declare (that delta's own `## THE SIBLING COLLISION` section enumerates five and handles each); and in one archive order it becomes *"a removal of nothing … applied against a document that never held the title"*, the defect the packet's block (b) refuses. The box's fidelity sentence holds without it — `promotion_fidelity.py` keys `(capability, norm(title))`, so the successor is a distinct key and the packet's REMOVED delta stays visible. **Mechanical corroboration: this packet's own sweep row seeds `class: sole`** — the corpus's machinery agreeing no other change writes any key it writes. **If the ruling goes the other way the block is one file and this lane will author it on the word.**
* No byte of `openspec/changes/split-opendox-two-layer-product/` — no tick, no map row, no design line. No code: nothing under `scripts/`, nothing under `tests/` but the GENERATED sweep-ledger row. Nothing under `contracts/`: no schema, pin, digest, bundle version or release tag. No gitlink, no submodule, no row of `docs/opendox-carve-manifest.yaml`. Nothing under `openspec/specs/` — this delta reaches canon only at an archive.
* It does not ratify and does not archive. `tasks.md` § 1 holds the ratification questions (the id, the six edits, the two non-edits, the § D3 judgment, the § D4 archive order); § 3 holds the archive, which is **sequenced BEFORE the split packet's own** so the fifteen are never in no capability at all (`design.md` § D4).

## Sibling search (three reads, all clear)

No #656 CLAIM names § 5.2a or the successor capability. Of the open openxFactory PRs, exactly one touches `openspec/specs/ideation-dashboard/spec.md` — **#1066**, whose hunks are at `:2249`, `:2267` and an append after `:2590` and which touches **none of the fifteen**; extraction here is title-keyed, so its landing shifts line numbers and changes nothing, and the carry is re-proved mechanically after any merge from `main`. `LANES.md` holds no row on this box.

**Rule 6 applies** (this pull request touches `openspec/changes/` and the README OpenSpec Records block). Brought to READY, **not landed** — the landing window is the holder's.

**Review state.** Seven Copilot rounds, every live finding taken and every thread answered and resolved (**10 threads, 0 unresolved**); the dispositions are in the comments below, including the ONE finding refused with a reason (pytest coverage for a packet-local one-shot helper would make `code_surface: none` false and flip the archive class). `114a9c63` is the final head — later rounds are answered in comments, not by moving it.

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

🤖 Generated with [Claude Code](https://claude.com/claude-code)


Lane: openxfactory-4
Co-Authored-By: Claude Fable 5.1 <[email protected]>
brettheap added a commit that referenced this pull request Sep 17, 2026
…zation evidence (#1076)

Archives gate-code-surface-declarations as 2026-09-16-gate-code-surface-declarations on Brett Heap's word 'archive it' (2026-09-17): realization PR #1029 → 4cef77a; pytest-suite decided green on main at a93d268 (run 35219872882); three ADDED requirements promoted byte-for-byte into openspec/specs/release-realization/spec.md; ledger row moved. Closes #1013 per the packet's § 5.2.

Lane: openxfactory-5 (openXfactory-5)
Co-Authored-By: Claude Fable 5.1 <[email protected]>
brettheap added a commit that referenced this pull request Sep 18, 2026
…ox § 6.4, RULING Q6) (#1056)

Lane: openxfactory-4 (openXfactory-4-openDox_extraction)

**`split-opendox-two-layer-product` § 6.4 — `add-composed-view-authoring` is CLOSED AS RE-HOMED to `opensoft/openDox`.** The first of the five frozen changes RULING Q6 disposes of (Brett Heap, 2026-09-04T17:49Z, [#656](#656)), and the cheapest: one `## MODIFIED` requirement, *"`target_release: none`, no contract bytes"* in § 6.4's words — **the packet's own retained front matter declares `target_release: implemented`** (`proposal.md:3`), § 6.4's phrase being the split box's shorthand for *no named release to wait on*, and the two are reconciled in the record rather than run together. Receiving half: **[openDox-spec #12](opensoft/openDox-spec#12.

**Rule 6** — this PR touches `openspec/changes/`. It is brought to READY and **NOT landed**; the lane orchestrator sequences the landing window against the other lanes' `openspec/changes/` PRs.

## What a § 6 closure is, and why this one is not an ordinary archive

The packet's own delta states the two admissible dispositions and the obligation that orders them (`openspec/changes/split-opendox-two-layer-product/specs/ideation-dashboard/spec.md`, § THE SIBLING COLLISION):

> this change SHALL NOT archive until each of the five is dispositioned — archived, or **closed as re-homed with its successor destination named in the receiving repository** (`tasks.md` § 6).

This takes the second form, and **NO DELTA IS PROMOTED HERE**. That is the packet's instruction, twice: *"under RULING Q6 those four changes stop where they stand, so their `## ADDED` blocks never promote HERE and their content is re-authored in the receiving repository"*, and — in this requirement's own per-requirement successor row — *"the requirement is re-promoted in `opensoft/openDox`'s own OpenSpec instance"*. `tasks.md` § 8.5 is the gate it feeds.

So the relocation is `git mv` and nothing else. **The governed wrapper REFUSES this packet outright**, which is a stronger reason than the one an earlier draft of this body gave: `archive_change` raises `change has incomplete tasks` for any packet whose `tasks.md` still carries a `- [ ]` line, before the CLI is even resolved — and RULING Q6 freezes all five WITH open boxes, this one at § 3.2. If it ran it would promote, exposing no skip mode (`proposal-support.py . archive --help` lists `--date`, `--final-import-complete`, `--yes`, `--path-mode` and nothing else). **The pinned CLI underneath it is different and this body no longer says otherwise:** `openspec archive` at `1.12.0` DOES take `--skip-specs` — measured on the pinned artifact's own `--help`, and enumerated in the wrapper's docstring at `scripts/proposal-support.py:4133-4135`. A non-promoting archive mode exists; it is reachable only by running the CLI around the wrapper, which that wrapper's own comment records as the failure it was extended to prevent. Running the wrapper and hand-reverting the promotion hunk would have produced this tree through an act whose record said the opposite.

**What the wrapper guards is satisfied by hand and checked, not waived.** The packet DOES carry `.openspec.yaml` with an `origin:` block — `origin_errors` and `origin_retention_errors` read exactly that file at the archive gate — and the rename carries it byte-for-byte with no content hunk, so the declaration this closure retains is the one ORIGIN RETENTION would have compared. The directory name is the one the wrapper computes: `<today in UTC>-<id>`.

Every byte of `proposal.md`, `tasks.md` and `specs/ideation-dashboard/spec.md` is the byte it carried at `cb2d3a2c` — the diff shows four pure renames — **including `Status: ratified`**. A closure is not a licence to restate what Brett ratified on 2026-08-08.

## The destination, named and measured

| | |
| --- | --- |
| receiving repository | `opensoft/openDox-spec` (the spec leg; **its first OpenSpec change ever** — `openspec/changes/` held only `.gitkeep`) |
| receiving change | `openspec/changes/add-composed-view-authoring`, PR [#12](opensoft/openDox-spec#12) @ `ee942e8` |
| the delta | 3,557 B, `sha256 1754e5d3f9803ea80b4e8a177fda8359a96d6c4b1024fce69893ee3cb3d716e1` — **the same digest on both sides**, `diff` reports no difference |

`tasks.md` § 3.2 — *"Brett creates the first real document from a project view"* — was this packet's one unticked box and **travels OPEN** as § 3.2 of the receiving change.

## THE STALE PIN DISPOSITION, RETIRED ON EXACTLY THE EVENT ITS OWN TEXT NAMED

`contracts/openspec-cli-pin.yaml` carried an accepted exception for this change whose `retires_when:` read:

> add-composed-view-authoring archives, which needs ONE open box (task 3.2, a Brett act). **ON THAT DAY THIS ENTRY GOES STALE AND EVERY RUN REFUSES until it is deleted.** That is the mechanism working, not a defect.

Measured, in that order:

```
# with the packet moved and the entry still standing
$ python3 scripts/validate-openspec-cli-pin.py --all
REFUSE pin-disposition-stale: the pin disposes findings this run did not produce:
  • add-composed-view-authoring / ideation-dashboard/spec.md (repo openxFactory)
```
```
# after deleting the entry
$ python3 scripts/validate-openspec-cli-pin.py --all   ;  echo $?
OK openspec-cli-pin: @fission-ai/[email protected] verified against its content address;
every target validated --strict with 0 UNDISPOSITIONED failures. … 1 finding(s) are ACCEPTED EXCEPTIONS
0
```

It did not archive by the route that text predicted — it was closed as re-homed, which freezes it where it stands and carries task 3.2 to the receiving repository — but the corpus effect is precisely the one predicted, and the refusal fired. The doctrine comment that used this change as its worked example is moved to the **past tense** and records that the prediction came true, rather than being re-pointed at some other live change nobody agreed to make an example of. `contracts/manifest.yaml` deliberately carries **no digest** for this pin so that a retirement is a one-file edit ("A digest here would make each of those a two-file edit whose omission reds the required suite on `main`").

## The self-gates, RE-READ rather than renumbered

**`tests/openspec_cli_pin/` — six entries become five.** The enumeration test is renamed (`…_six_dispositions_…` → `…_five_dispositions_…`) and its docstring records this as the **FOURTH movement and the first shrink this repository's own corpus caused**; the three per-entry maps (`DISPOSITION_MEASUREMENT`, `DISPOSITION_CLASS`, `DISPOSITION_AUTHORITY_PREFIX`) drop the key together, which is what `test_every_real_disposition_cites_canon_and_names_who_granted_it` exists to force.

**The frozen capture and the live pin part company, and that is structural.** Two tests reconcile `contracts/openspec-cli-pin.yaml` against `tests/openspec_cli_pin/fixtures/openspec-1.12.0-validate-changes-strict-report-findings.json` — real bytes captured on the corpus of 2026-09-05, evidence, never re-cut. The capture still holds the finding; the pin has retired the entry. Before this PR the tests read that parting as a transcription slip, which is the one thing it is not. `DEPARTED_SINCE_THE_CAPTURE` accounts for it and **is not a suppression**: `_departed_since_the_capture()` asserts against the real tree that the active directory is **ABSENT**, that the named archive directory is **PRESENT**, and — from `7debbad5`, on Copilot's reading — that the undispositioned row IS the captured finding, compared through the verifier's own `normalized_finding`. So a live change cannot borrow the exemption, no OTHER finding at that path can borrow it either, and the captured total stays pinned at **two as a SUM** (`len(applied) + len(departed) == 2`).

**`tests/doc-health/test_modified_block_currency_self_gate.py`** failed by name with its own WHAT-TO-DO message, exactly as designed, and is re-read the way #1042's third commit re-read the same file. The scenario-title arm's band is still EMPTY and still asserted; its second half — which asserts the DISCHARGE positively so an empty band cannot be mistaken for a broken reader — is re-aimed at the archived delta, read through the same `parse_delta` / `derive_units` pair `active_blocks` uses, so *"delete the marker and both halves fail"* survives the move. The **departure is asserted first**, because a test that read only the archive would pass on a tree where the packet never moved. The carriage ledger goes **fourteen → thirteen**, the row replaced by a note that states the distinction: this row retired **WITHOUT its block being promoted**, so it is a DEPARTURE rather than a DISCHARGE — a promoted row's obligation was carried, this row's obligation moved to another repository.

## THE ONE COST, STATED UP FRONT RATHER THAN DISCOVERED BY THE NIGHTLY

`document-lifecycle`'s *Ratified spec deltas reach the promoted specification* (`openspec/specs/document-lifecycle/spec.md:1055`) attaches the promotion obligation to the ARCHIVE ACT and presumes ratification from that act unless the packet declares `draft` or lower. This packet declares `Status: ratified` and that header is not edited — so the obligation attaches, and `scripts/doc_health/promotion_fidelity.py` carries it at `_LAUNCH_SEVERITY = ERROR`. The checker's own action text names both discharges:

> apply the ratified delta to the promoted spec through an OpenSpec change, **or record the non-promotion as deliberate**

This closure takes the second. The recording vehicle is the one that checker reads — `health/dispositions.yaml` at the **xFactory aggregation root** (`load_dispositions()`, `promotion_fidelity.py:714-786`), keyed `family: promotion-fidelity` / `repo: openxFactory` / `path:` the archived delta, with a `cite`. **That entry is a companion act in the aggregation repository — it cannot live here — and it is filed ONCE for the five § 6 closures rather than five times.** It is NOT `tasks.md` § 6.6, which is the separate rule that no new dashboard change opens in `openxFactory`: the gate these closures feed is § 8.5 and the severity reading is § 8.9's. Named here so the obligation is on the record from the first closure.

**The honest caveat, from the loader's own docstring:** a `--single-repo` self-gate run has no aggregation root, so no disposition applies in that scope. Both numbers are reported below; neither is suppressed.

## Evidence at head `7debbad5` (fresh clone of `main` `cb2d3a2c`, submodules initialized)

| check | before (clean `main`) | at this head |
| --- | --- | --- |
| `openspec validate --all --strict` through the pin | `106 passed, 2 failed (108 items)` | `106 passed, 1 failed (107 items)` — one fewer change AND one fewer failure: the closed packet was one of the two pre-existing failures; the survivor is `add-chain-attestation`, untouched |
| `scripts/validate-openspec-cli-pin.py --all` | exit 0, 2 accepted exceptions | **exit 0**, 1 accepted exception |
| `pytest -q tests/openspec_cli_pin tests/doc-health tests/sequenced_after tests/pin_registrations tests/target_release` | — | **2430 passed**, 0 failed (452 s) |
| doc-health `--single-repo . --family promotion-fidelity` | `0 critical, 0 error, 0 warning, 0 info` | **`0 critical, 1 error, 0 warning, 0 info`** — exactly one, this packet's own, quoted in the closure record and disposed by the aggregation companion |
| `validate-sequenced-after.py . --ledger-diff` | consistent, 214 rows | **consistent, 214 rows**, the row re-seeded as `{state: archived, … moved_by: "#1056", moved_on: "2026-09-16"}` |

## Copilot's readings, taken at `7debbad5`

Four corrections, each verified against this tree rather than conceded — and one of them is a real tightening of a test:

1. **`target_release`** — the record and the README reported `none`, the packet's front matter declares `implemented`; both now quote § 6.4 AS a quotation and report the packet's own declaration beside it. The stale lines are `tasks.md` § 6.4 and `design.md` § D9 — the packet's own amendment to make, flagged to this lane's bookkeeper.
2. **"Both of those always promote"** — false of the pinned CLI (`--skip-specs` measured at `1.12.0`); corrected above, with the stronger true reason stated.
3. **`.openspec.yaml`** — the record said the packet carries none; it carries one with an `origin:` block. Corrected.
4. **`tasks.md` § 6.6** — not the disposition gate; § 8.5 and § 8.9 are. Corrected in record and README.

**And `DEPARTED_SINCE_THE_CAPTURE` is now keyed by its captured finding, not only by `(repo, item, path)`.** `reconcile` keys on the normalized finding TEXT as well, so an exemption keyed on the triple alone was WIDER than the matcher: any other blocking finding at that path in the frozen capture would have been swallowed while both tests read green — the exact class of failure that map's own header says a departure is not. The value is now `(archive directory, captured finding)` and the helper asserts the text through the verifier's own `normalized_finding` before exempting anything. **Proven** by mutating one word of the recorded finding (both tests fail) and restoring it (both pass).

## Sibling search 2026-09-16T00:5xZ

Open PRs read in all three repositories: openxFactory #1052 #1051 #1050 #1044 #1043 #1035 #1032 #1031 #1029 #594 #518; openDox-spec #11 (`README.md`, `docs/front-end-package-boundary.md` only); openXdox-spec #3. **NOT ONE touches `openspec/changes/add-composed-view-authoring/`, `contracts/openspec-cli-pin.yaml`, the README "OpenSpec Records" block, or `tests/sequenced_after/corpus-ledger.yaml`.** Disclosed rather than skipped: the SHARED checkout at `/workspace/projects/xFactory/openxFactory` (detached, `6612d323`) carries stale uncommitted edits to `openspec/changes/add-nightly-dashboard-refresh/` dated 2026-09-01 — abandoned residue, not a lane's live work; § 6.1 is authored from a clean clone.

Refs #656 (stays OPEN). CLAIM [`5690350779`](#656 (comment)).

🤖 Generated with [Claude Code](https://claude.com/claude-code)


Lane: openxfactory-4
Co-Authored-By: Claude Fable 5.1 <[email protected]>
brettheap added a commit that referenced this pull request Sep 18, 2026
…§ 6.3, RULING Q6) (#1057)

Lane: openxfactory-4 (openXfactory-4-openDox_extraction)

**`split-opendox-two-layer-product` § 6.3 — `add-doxchat-model-intake` is CLOSED AS RE-HOMED to `opensoft/openDox`.** The SECOND of the five frozen changes RULING Q6 disposes of (Brett Heap, 2026-09-04T17:49Z, [#656](#656)), and **the first to exercise the harder half of the collision**. Receiving half: **[openDox-spec #13](opensoft/openDox-spec#13.

**Rule 6** — this PR touches `openspec/changes/`. Brought to READY, **NOT landed**; the lane orchestrator sequences the window.

> **STACKED on [#1056](#1056 (§ 6.4), because both closures edit the README "OpenSpec Records" block at the same anchor and both re-seed the sweep ledger. Base is `change/rehome-composed-view-authoring`; **re-point it to `main` before that branch is deleted** (the lane's standing rule for stacked PRs). The diff shown here is this closure's own.

## Why this one is not just § 6.4 again

§ 6.4 carried one `## MODIFIED` block, so it touched only half **(a)** of the split packet's § THE SIBLING COLLISION — the four promoted titles a sibling modifies. This packet carries **1 MODIFIED + 4 ADDED**, and the four ADDED are four of the **TWELVE** titles half **(b)** records as *"not in canon and NOT removed here"*:

> A `## REMOVED Requirements` block over a title the promoted specification does not carry would be a removal of nothing … They are handled by the re-homing plan instead: under RULING Q6 those four changes stop where they stand, so their `## ADDED` blocks **never promote HERE** and their content is re-authored in the receiving repository.

That is the whole argument for the form of this act. Had these four promoted, they would have entered a capability the split packet's `## REMOVED` block **cannot name and therefore cannot remove** — four requirements outliving the capability's exit. **This is the first time half (b) actually lands anywhere.**

So the relocation is a `git mv` and nothing else: five pure renames, every byte unedited, `Status: ratified` header included (Brett Heap, 2026-08-21, *"proposal approved"*). **The governed wrapper REFUSES this packet outright** — `archive_change` raises `change has incomplete tasks`, and RULING Q6 freezes the five WITH open boxes (here § 4.1 and § 4.2) — and it exposes no `--skip-specs` if it ran. The PINNED CLI underneath it does take `--skip-specs`, measured at `1.12.0`; that mode is real and is reachable only by running the CLI around the wrapper, which is not this closure's route. (An earlier draft of this body said both commands "always promote"; that was wrong about the CLI and is corrected here and in the record.)

## The destination, named and measured

| | |
| --- | --- |
| receiving repository | `opensoft/openDox-spec` |
| receiving change | `openspec/changes/add-doxchat-model-intake`, PR [#13](opensoft/openDox-spec#13) @ `9925fd0` |
| the delta | 16,813 B, `sha256 3168ad8f6f31c8dbacdc772d933508943f7b2c7cf373de2357eb8958d4bebee1` — **the same digest on both sides**, `diff` reports no difference |
| subject edits owed | **none, and none made**: `grep -c openxFactory` over the delta → **0**. Its subjects are the dashboard backend, the browser, the selector and the adapter |

## What stays, what travels, and what is somebody else's box

- **STAYS — the one additive schema enum member.** The approval act's `action` member in `contracts/schemas/gate-action-record.schema.yaml` is already openxFactory contract bytes at `contract-v1.45` and `tasks.md` § 6.3 says it STAYS. Nothing here adds, moves or reverts it; `contract-v1.45` stays true as published.
- **TRAVELS OPEN — tasks 4.1 and 4.2** (live-console proof; realization evidence). RULING Q6 freezes the five WHERE THEY STAND, so a closure with open boxes is the ruled disposition rather than an exception to one — the same reading § 6.4 took for its § 3.2.
- **NOT THIS CLOSURE'S — the built code**, which moves with the carve as `moved_with_declared_edit` rows of `docs/opendox-carve-manifest.yaml` (§ 3). No code moves here.

## Pinned references: checked BEFORE the move, because that is where § 6.4's real work turned out to be

`grep -rn 'add-doxchat-model-intake' --include='*.py' --include='*.yaml' --include='*.yml' --include='*.json'` over `cb2d3a2c` returns **sixteen** hits.

**One is a live coupling and it moves in this PR:** `tests/doc-health/test_modified_block_currency_self_gate.py`'s `_LEDGER_SUBJECTS` row, **thirteen named subjects → twelve**, replaced by a note that says it left by **DEPARTURE rather than DISCHARGE** — the block was never promoted, the row leaves because `active_blocks()` no longer reads it. The note also records that this is the LAST movement § 6 makes to that constant: two of the five closures held a row there and both are now gone; the other three hold none.

**Two look like couplings and are not**, stated so the next reader does not re-derive them:
- `tests/doc-health/test_modified_block_currency_fixtures.py`'s `DELTA351` is a path-shaped LABEL on a RECONSTRUCTED historical text under the synthetic repository `intakeFactory`; it never reads this tree.
- `openspec/changes/retire-doxbench-chat-turn-v1/.openspec.yaml`'s `related:` comment naming this change ACTIVE is § 6.2's to re-read. **§ 6.2 carries no ordering against THIS box** — `tasks.md` § 6.2 reads *"Sequenced BEFORE § 8"* and `design.md` § D9 reads *"§ 6.2 sequences it BEFORE this change's archive"*, where *this change* is `split-opendox-two-layer-product` itself; § 8.5 repeats it. This lane running § 6.2 after § 6.3 is permitted, and the record now says so instead of asserting an order the packet does not state.

**`contracts/openspec-cli-pin.yaml` carries NO disposition for this change** — checked, not assumed — so § 6.4's `pin-disposition-stale` refusal has no counterpart here.

## The one cost, stated up front

Same as § 6.4 and for the same reason: `document-lifecycle`'s *Ratified spec deltas reach the promoted specification* (`openspec/specs/document-lifecycle/spec.md:1055`) attaches the promotion obligation to the ARCHIVE ACT; this packet declares `Status: ratified` and that header is not edited; `promotion_fidelity.py` carries the obligation at `_LAUNCH_SEVERITY = ERROR`. This closure takes the second discharge the checker's own action text names — *"or record the non-promotion as deliberate"* — through `health/dispositions.yaml` at the **xFactory aggregation root**, **filed once for the five closures rather than five times** — not `tasks.md` § 6.6, which is the separate rule that no new dashboard change opens here; the gate is § 8.5 and the severity reading is § 8.9's. Because this packet carries five requirements rather than one, its entry is the coarse path-keyed form, which disposes every finding the family raises against this one delta file. A `--single-repo` self-gate run has no aggregation root and applies no disposition (the loader's own docstring says so), so that run reports these findings until § 5 removes the capability; both numbers are reported, neither suppressed.

## Evidence at head `06e10e53`

| check | § 6.4's head (`7debbad5`) | at this head |
| --- | --- | --- |
| `validate-openspec-cli-pin.py --all` | exit 0, `106 passed, 1 failed (107 items)` | **exit 0**, `105 passed, 1 failed (106 items)` — one fewer item, the survivor still `add-chain-attestation` |
| `pytest -q tests/doc-health/test_modified_block_currency_self_gate.py` | 19 passed | **20 passed** — the extra is this PR's new departure test |
| sweep ledger `--ledger-diff` | consistent, 214 rows | **consistent, 214 rows**, row re-seeded `{state: archived, … moved_by: "#1057", moved_on: "2026-09-16"}` |
| doc-health `--single-repo --family promotion-fidelity` | **1 error** | **6 errors** — **five are this closure's**, one per authoritative requirement: four ADDED titles absent from canon, plus the MODIFIED block's one uncarried scenario. Each is quoted in the closure record, and all five are disposed by the single coarse path-keyed aggregation entry |

## Copilot's readings, taken at `06e10e53`

- **The count was wrong and the correction is a measurement.** This body and the record carried ONE promotion-fidelity finding — § 6.4's number read across to a packet with five requirements. `promotion_fidelity` emits one per authoritative requirement, so this delta raises FIVE and the family reads 6 at this head. Corrected in both places, with the five findings quoted.
- **§ 6.2's sequencing was stated backwards** and is now stated as the packet states it (above).
- **The archive-route rationale is narrowed** to what is true of the pinned CLI (above).
- **`tasks.md` § 6.6 is not the disposition gate** — § 8.5 and § 8.9 are. Corrected in record and README.
- **The closure itself is now asserted, not implied.** `_LEDGER_SUBJECTS` loses a row identically whether a packet was RE-HOMED or DELETED, so the missing row was no evidence of the act RULING Q6 ordered. `test_the_re_homed_packets_left_the_active_corpus_and_stand_whole_in_the_archive` asserts, in this order: the packet is ABSENT from `openspec/changes/`; the archived delta EXISTS; and it still parses through the family's own `parse_delta` carrying the MODIFIED block AND each of the four ADDED titles whose non-promotion this closure records as deliberate. Those four are the same four `promotion_fidelity` reports absent from canon, so a drift in either shows up here. **Proven**: change one recorded title and the test fails; restore it and it passes.

## Sibling search 2026-09-16T01:2xZ

Open PRs in all three repositories: openxFactory #1056 (this lane's § 6.4), #1052 #1051 #1050 #1044 #1043 #1035 #1032 #1031 #1029 #594 #518; openDox-spec #13 and #12 (this lane's), #11 (`README.md` + `docs/front-end-package-boundary.md` only); openXdox-spec #3. **NOT ONE touches `openspec/changes/add-doxchat-model-intake/`.** **Corrected on Copilot's reading:** the files shared with #1056 are the README "OpenSpec Records" block, the sweep ledger AND `tests/doc-health/test_modified_block_currency_self_gate.py` — #1056 re-aims its scenario-arm test at the archived composed-view delta and retires that row, this PR retires the doxchat row and adds the departure test, and #1060 inherits both. All three are this lane's own and sequenced by stacking rather than raced; the stack's landing order is #1056 → #1057 → #1060, each re-pointed to `main` as its base merges.

Refs #656 (stays OPEN). CLAIM [`5690514951`](#656 (comment)).

🤖 Generated with [Claude Code](https://claude.com/claude-code)


Lane: openxfactory-4
Co-Authored-By: Claude Fable 5.1 <[email protected]>
brettheap added a commit that referenced this pull request Sep 18, 2026
…endox § 6.1, RULING Q6) (#1060)

Lane: openxfactory-4 (openXfactory-4-openDox_extraction)

**`split-opendox-two-layer-product` § 6.1 — `add-nightly-dashboard-refresh` is CLOSED AS RE-HOMED to `opensoft/openXdox`.** The THIRD of the five frozen changes RULING Q6 disposes of, **the only one whose destination is openXdox**, and the one § 6.1 itself calls *"the one genuine conflict RULING Q6 names"*. Receiving half: **[openXdox-spec #15](opensoft/openXdox-spec#15 — **the first change RE-HOMED INTO openXdox** (not that repository's first OpenSpec change: it already carries the archived `2026-09-11-add-openxdox-projection-surfaces` and the promoted `openspec/specs/openxdox-projection-surfaces/`, measured 2026-09-18).

**Rule 6** — this PR touches `openspec/changes/`. Brought to READY, **NOT landed**; the lane orchestrator sequences the window.

> **LANDING ORDER, SETTLED.** This PR was stacked on [#1057](#1057) (§ 6.3) and, through it, on [#1056](#1056) (§ 6.4), because all three edit the README "OpenSpec Records" block at the same anchor and each re-seeds the sweep ledger. **Both have LANDED** — #1056 at `3e32d987` (squash) and #1057 at `4ccab7b9` (merge commit) — and this PR's base **is already `main`**; the re-point is done, not owed. It needs no squashed-base recipe: #1057's merge-commit form left the chain's ancestry intact, so `git merge origin/main` was clean. **Land by `--merge`**: a squash would re-date this packet's archive directory and red `main`, which is exactly what #1106/#1109 had to repair after #1056's squash.

## Two capability deltas, disposed on different terms — that IS § 6.1

| delta | disposition | how it travelled |
| --- | --- | --- |
| `ideation-dashboard`<br>1 ADDED + 1 MODIFIED | re-homes whole to openXdox. The MODIFIED, *Runtime snapshot fetch with baked fallback and displayed freshness*, is one of the FOUR promoted titles the split packet's § THE SIBLING COLLISION table (a) names | **BYTE-IDENTICAL** — 6,663 B, `sha256 50fd14ba376b9c718b28d219ccdc402593ee93e65be619a950d8eed5923b56e6`, `diff`-verified against #15. `grep -c openxFactory` over it → **0**, so no subject edit was owed and none was made |
| `doc-health`<br>7 ADDED | § 6.1: *"they do NOT travel and are NOT added to `openxFactory`"* | **Satisfied absolutely**: this closure promotes NO delta at all, and at the destination they land on openXdox's own `openxdox-refresh-lane` — never on a `doc-health` capability. Carried with **exactly one line changed**, the delta file's capability heading |

`design.md` § D9 reads the refresh lane as **projection-mechanism work**, which is why this one goes to openXdox while the other four go to openDox.

## THE ONE SUBSTANTIVE JUDGEMENT IN THIS ARC, DECLARED RATHER THAN BURIED

§ D9 asks that the seven be *"re-authored against the adapter IN openXdox"*. **That re-authoring is NAMED at the destination, not performed.**

§ 6.4's and § 6.3's deltas contained the string `openxFactory` **zero** times and travelled untouched. These seven are openxFactory-nightly-specific in their **ANTECEDENTS**, not in a subject noun — *"The nightly doc-health run SHALL include an ideation-dashboard IMAGE REFRESH lane"*, *"the aggregation's `openxFactory` submodule pin"*, the Omnigent artifact worker, a named registry. Re-pointing that is not the carve seam's declared subject edit (*"the subject `openxFactory SHALL` becomes the receiving repository's"*); it is a rewrite of what each obligation is ABOUT.

**And the adapter does not exist in any corpus today.** `corpus-adapter-seam` is an unpromoted delta of this same packet; the successor capability id is its § 5.2a, unbuilt. Seven requirements authored against an undeclared seam would have to be authored again the moment the seam is declared.

So openXdox-spec #15 carries the re-authoring as a blocked open box (`tasks.md` § 2.1) and **bars ratifying the seven** until it lands (§ 2.2) — openXdox would otherwise be ratifying obligations about another repository's nightly run. **If Brett rules it should be performed now rather than named, this lane will take that ruling and re-do the receiving change under it.**

## THE LOCKSTEP PAIR THIS ARCHIVE RETIRES

`scripts/target-release-register.yaml` carried an `implementation_pending` entry for this change. Its own `retires_when:` read:

> the declaration is corrected to the target it realizes on, **or the packet archives**.

It archived — by the **second limb**, and by a route its author did not have in view: closed as re-homed rather than realized. The register effect is exactly the one the text named: the declaration leaves the ACTIVE corpus the register scans, and **`Report.stale` REFUSES until the entry is deleted**, so the entry MUST go.

**THE PAIR IS A DIFFERENT OBLIGATION, AND THIS BODY SAID OTHERWISE.** An earlier draft — and the record, the register comment and the test comment with it — attributed the `CLOSED_REGISTER` deletion to a rule in `scripts/target_release.py`. The module says the opposite in its own words:

> **A BASELINE MAY BE A STRICT SUPERSET, AND USUALLY WILL BE**: removal is lawful (a corrected declaration or an archived packet retires its entry, and `Report.stale` REFUSES until the entry is deleted), so a pair stays here after its entry goes. **This is a ceiling, never a floor.**

Its *"in the same pull request, where the diff shows the act for what it is"* sentence governs **ADDING** a pair the baseline does not carry — the addable direction the register refuses — not removing one. Copilot read that correctly, and all four places are corrected at `e24a63fc`.

So the pair moves as a **DELIBERATE BASELINE SHRINK**: lawful, in the same diff as the entry because that is where the movement is legible, and taken at all because a ceiling left standing over a retired entry is a line nothing reconciles again. The baseline falls from **21 pairs to 20**, `tests/target_release/test_target_release_gate.py`'s size literal follows it, and each carries the reason beside it rather than being renumbered. `pytest -q tests/target_release` → **96 passed**.

This is the same class of coupling § 6.4 found at `contracts/openspec-cli-pin.yaml`, and it was found the same way: **by grep before the move**, not by a red gate after it.

## The other twelve grep hits are citations BY IDENTITY, and none is edited

`scripts/dashboard-refresh-nightly.py`, `scripts/ideation_dashboard/dashboard_refresh_lane.py`, `.github/workflows/doc-health-reusable.yml`, two `tests/ideation-dashboard/` suites, `tests/sequenced_after/test_sweep.py`'s MOVEMENT LOG narrative, this repository's own `modified-block-currency` note, and two archived `.openspec.yaml` files. Every one stays true unedited under `release-realization`'s *A packet reference resolves by identity, not by path* (landed 2026-09-15): the archive relocation moves the path and keeps the identity. **No archived byte is touched.** `contracts/openspec-cli-pin.yaml` carries no disposition for this change — checked, not assumed.

## What stays

- **The aggregation-side artifact-only worker** (`tasks.md` § 6.1). No workflow moves, here or at the destination.
- **`doc-health` itself**, unchanged in both directions: nothing added to it, nothing taken from it.

## Evidence — first taken at `e24a63fc`, RE-MEASURED since

`e24a63fc` is HISTORICAL: it was this branch's tip when the figures below were first taken. The promotion-fidelity figure was **re-measured at `36ff06a9`** (the merge of `main` after § 6.3 landed) and reads the same — `0 critical, 15 error, 0 warning, 0 info`, nine of the fifteen this packet's. The current head is **`a677fa7b`**, where the plain `validate-sequenced-after.py .` is exit 0 and **402 passed** across the doc-health self-gate, `tests/sequenced_after` and `tests/target_release`.

| check | clean `main` `cb2d3a2c` | at this head |
| --- | --- | --- |
| `validate-openspec-cli-pin.py --all` (`openspec validate --all --strict` through the pin) | exit 0, `106 passed, 2 failed (108 items)`, 2 accepted exceptions | **exit 0**, `104 passed, 1 failed (105 items)`, 1 accepted exception — three fewer items (the three closed packets), survivor still `add-chain-attestation` |
| `pytest -q tests/openspec_cli_pin tests/doc-health tests/sequenced_after tests/pin_registrations tests/target_release` | — | **2431 passed**, 0 failed (452 s) |
| `pytest -q tests/target_release` | — | **96 passed** |
| sweep ledger `--ledger-diff` | consistent, 214 rows | **consistent, 214 rows**; this row re-seeded `{state: archived, … moved_by: "#1060", moved_on: "2026-09-16"}` |
| doc-health `--single-repo --family promotion-fidelity` | `0 critical, 0 error, 0 warning, 0 info` | **`0 critical, 15 error, 0 warning, 0 info`** — 1 from § 6.4, 5 from § 6.3, **9 from this closure**, every one named below |

**The nine, measured and named** (they are the two deltas read requirement by requirement):

- `specs/doc-health/spec.md` — **seven**, one per ADDED title absent from `openspec/specs/doc-health/spec.md`. **These are the § 6.1 conflict seen from the checker's side**: the box says they are NOT added to `openxFactory`, the checker says the ratified delta did not reach canon, and both are true of this tree. The disposition records which one is the instruction.
- `specs/ideation-dashboard/spec.md` — **two**: the ADDED *The served plane's baked artifacts are rebaked on a schedule at one revision*, absent from canon; and the MODIFIED *Runtime snapshot fetch with baked fallback and displayed freshness*, which reached canon without 2 of its 6 ratified scenarios.

## Copilot's readings, taken at `e24a63fc` (historical head; later rounds at `36ff06a9`, `b126e7b3` and `a677fa7b` are in the thread and the commits)

- **The lockstep claim** — corrected in all four places it was made (above). The 21 → 20 assertion is unchanged and still sound; only the explanation beside it moves.
- **The three `#1058` provenance references** — a pre-written PR number (#1058 and #1059 went to other lanes) — were corrected at `9dbb0599`, which also seeded the sweep-ledger row this review found stale. All four sites name **#1060**.
- **The archive-route rationale** — "both always promote" is false of the pinned CLI (`--skip-specs` measured at `1.12.0`); narrowed to the true and stronger reason: the governed wrapper refuses this packet outright on its **thirteen** open tasks.
- **`tasks.md` § 6.6 is not the disposition gate** — § 8.5 and § 8.9 are.

## The one cost, stated up front

Same as §§ 6.4 and 6.3: `document-lifecycle`'s *Ratified spec deltas reach the promoted specification* attaches the promotion obligation to the ARCHIVE ACT; this packet declares `Status: ratified`, unedited; `promotion_fidelity.py` carries it at `_LAUNCH_SEVERITY = ERROR`. The discharge is the second one the checker's own action text names — *"or record the non-promotion as deliberate"* — through `health/dispositions.yaml` at the **xFactory aggregation root**, filed once for the five closures rather than five times — not `tasks.md` § 6.6, which is the separate rule that no new dashboard change opens here; the gate is § 8.5 and the severity reading is § 8.9's. **This packet needs TWO entries**, one per delta file. The second is worth reading twice: it disposes findings against a `doc-health` delta that RULING Q6 says must never reach `doc-health` — the disposition and the ruling agreeing, not a suppression. A `--single-repo` self-gate run applies no disposition (the loader's own docstring says so), so both numbers are reported.

## Sibling search 2026-09-16T01:4xZ

Open PRs in all four repositories: openxFactory #1057 #1056 (this lane's), #1052 #1051 #1050 #1044 #1043 #1035 #1032 #1031 #1029 #594 #518; openDox-spec #13 #12 (this lane's), #11; openXdox-spec #15 (this lane's), #3 (`ideation/` documents only). **NOT ONE touches `openspec/changes/add-nightly-dashboard-refresh/`, `scripts/target-release-register.yaml` or `scripts/target_release.py`.**

**Disclosed rather than skipped:** the SHARED checkout `/workspace/projects/xFactory/openxFactory` (detached at `6612d323`, no branch) carries **stale uncommitted edits to exactly this packet** — `design.md`, `proposal.md`, `tasks.md` and `specs/doc-health/spec.md`, +150/−38, file mtimes **2026-09-01**. Two weeks old and abandoned; not a lane's live work. This closure is authored from a clean clone of `main`. Named so that if anyone does claim them, the collision is already on the record.

Refs #656 (stays OPEN). CLAIM [`5690599915`](#656 (comment)).

🤖 Generated with [Claude Code](https://claude.com/claude-code)


Lane: openxfactory-4
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