Repository navigation
Realize add-declared-former-id, slices 1-3: read the declared lineage, baseline by identity, fail closed on every history read - #1038
Conversation
…carries PR #1027's fixture that slice 1 flips)
… ownership sweep add-declared-former-id § 2 (realization slice 1). `former_ids:` is a TOP-LEVEL sequence of change ids in a packet's own `.openspec.yaml`, a SIBLING of `origin:` and never a member of it, ordered oldest first and append-only across commits. This commit lands the READER and nothing that consumes it: the archive gate still resolves its baseline exactly as it did, and no existing answer moves. scripts/proposal-support.py CHANGE_ID_RE hoisted above `active_change_dir` — the id grammar was spelled inline there and again in `ratifying_commit`, and this section needed a third copy. Three copies of the rule that decides how this estate ADDRESSES a packet is the defect this packet is about, in miniature. FormerIdError, former_id_problems, declared_former_ids, declared_former_ids_of — the six shape refusals § 2.1 names (nested inside `origin:`, a scalar where a sequence is required, an entry that is not a change id, an entry equal to the packet's own id, a duplicate, and every problem reported rather than the first). A malformed declaration RAISES rather than reading short: a reader that dropped a bad entry would hand the archive gate a shorter lineage than the author wrote. load_packet_at — the packet at a revision, for the one comparison that cannot be taken from a single tree. append_only_problems (§ 2.5) — the established list must stay a PREFIX, refused whether or not the commit moves anything. The attack it stops is a declaration deleted the day after a lawful move, in a commit no arrival check ever looks at. former_identity_claimants / former_identity_ownership_problems (§ 2.6) — one owner per identity, naming every claimant. Archived packets are read for their declarations, because a declaration travels with the packet into the archived directory the archive gate reads. standing_former_id_problems (§ 2.3) — a declared former id that still stands as a live directory is a COPY, refused naming both ids. tests/proposal-support/test_proposal_support.py DeclaredFormerIdTests, 29 tests (214 subtests): the grammar and each refusal; § 2.2's sibling property pinned by comparing `origin_block_lines` with and without the declaration (`design.md` M3, pinned by a test rather than by a comment), and again with the declaration ABOVE the origin block; append-only over a real repository, deleted the day after the move; the ownership sweep including an archived claimant; and two corpus sweeps over this repository's own 47 active and 191 archived packets. WHAT THIS COMMIT DELIBERATELY DOES NOT DO. Binding a newly added entry to the move that commit performs (§ 2.4) and refusing an undeclared arrival (§ 4) read a COMMIT RANGE this module never sees; they belong to the landing validator. Resolving the baseline across the declared identities (§ 3) is the next slice, and it is the first thing that changes an answer. Refs #1003. Nothing is archived or promoted by this commit. Lane: openxfactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]> Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…8ad27a; #1019 followed) Lane: openxfactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]> Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
…nd refuse an identity that resolves twice add-declared-former-id § 3 (realization slice 2), the first slice that CHANGES AN ANSWER. Slice 1 landed the reader and consumed it nowhere; this one hands the declared lineage to the archive gate, so a packet that DECLARES where it came from is baselined at that identity's own ratification and the mutations made in between stop being waved through. scripts/proposal-support.py _tree_rows — `git ls-tree --name-only`, the ONE read that separates ABSENT from UNREADABLE (`design.md` M1), returning None on a non-zero exit and never an empty list. Its callers still treat None as "no row", which is today's behaviour and this slice's honest limit: turning that into the CANNOT RUN refusal is § 3.4, and this is the read that slice needs. identity_paths_at / proposal_path_at (§ 3.1, § 3.1a) — the two-candidate RULE `sequenced_after.proposal_path_at_ref` states, read the same way and NOT through that function's boolean probes, which the requirement forbids reusing by name. A LIST, because two locations for one id is an ambiguity to report; `proposal_path_at` refuses `origin-retention-identity-ambiguous`, CANNOT RUN, naming every candidate. ratifying_baseline (§ 3.1) — ONE walk, `--full-history --topo-order --reverse` over the UNION of every identity's pathspecs, so the first ratified blob it finds IS the earliest and no commit DATES are compared. Returns (commit, identity, path): the declaration at the baseline is read under the identity the packet was RATIFIED under, which after a lawful move is not the one it carries now. _refuse_an_undeclared_move (§ 3.2) — PR #846's refusal to the sentence, silent for exactly the move the packet DECLARED and for no other. A lineage that declares some OTHER id is still refused, and the finding now says which ids were declared. ratifying_commit — a thin wrapper keeping its name and its one return value; `former_ids` defaults to the lineage the packet declares in the working tree, so no caller changes. origin_retention_errors (§ 3.3) reads the baseline declaration at the baseline identity's own path and names that identity in its findings; THE COMPARISON ITSELF DOES NOT MOVE. tests/proposal-support/test_proposal_support.py Twelve tests, all twelve failing against slice 1's script (measured: 12 failed / 159 passed with this file over the unchanged module). Scenarios realized, by their titles in `specs/release-realization/spec.md`: - *A packet that declares a former identity reaches its archive gate* — test_a_declared_move_resolves_the_baseline_to_the_first_ratification, test_the_declaration_is_what_makes_the_difference (both arms in one fixture: undeclared REFUSES, declared RESOLVES), test_an_undeclared_source_is_still_refused_when_another_is_declared. - *A mutation rides in the commit that renamed the packet* — test_a_mutation_riding_in_the_declared_move_is_still_a_mutation, the laundering case, beside test_a_declared_move_with_no_mutation_retains_its_origin. - *A declared identity resolves to two locations at one commit* — test_an_identity_resolving_to_two_locations_refuses_cannot_run, with the duplicate planted BEFORE the ratification so the walk actually reaches it. - *A ratified packet is renamed and declares where it came from* and *A packet moves more than once* — test_a_declared_rename_chain_is_baselined_at_the_first_ratification, the #1003 chain with every hop declaring and the arriving list being the source's list with the source id appended. - The id-derived path, pinned either side: test_an_identity_resolves_to_its_archived_location, test_an_archive_directory_that_merely_ends_with_the_id_is_not_it, test_the_declared_lineage_is_read_from_an_archived_packet_too, test_packet_yaml_of_names_the_declaration_beside_the_proposal. THE #1027 FIXTURE IS SPLIT, NOT FLIPPED, AND THE REASON IS THE PACKET'S OWN. `test_an_unratifying_rename_chain_escapes_the_guard_a_stated_gap` pinned the UNDECLARED #1003 chain's acceptance until this packet landed. Its DECLARED half now flips — test_a_declared_rename_chain_is_baselined_at_the_first_ratification asserts the first ratification where the old fixture asserted the last. Its UNDECLARED half keeps the same history and the same answer under the name test_an_undeclared_rename_chain_is_the_landing_validators_to_refuse, because nothing in that history connects change-t to change-r and the archive gate has nothing to read: `tasks.md` § 3.2 says the undeclared refusal stays exactly where it is, and the refusal that closes this shape is *An undeclared rename arrival is refused at its landing*, the § 4 validator, which refuses the r-to-s hop at its own landing so the history can never be created. That fixture gains its refusal there, from the validator, over the same tree. `ratifying_commit`'s docstring gap paragraph is updated in place and names it. WHAT THIS COMMIT DELIBERATELY DOES NOT DO. § 3.4 (fail closed on every read behind the baseline, and the scenario *The history holding the baseline cannot be read*) is NOT taken: `_tree_rows` is the read it needs and the callers do not yet refuse on it. § 2.4, § 4 and § 5 are untouched — they read a COMMIT RANGE or a citation corpus this module never sees. Nothing under `openspec/specs/` moves, no task box is ticked, nothing is archived or promoted. Refs #1003. Lane: openxfactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]> Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
origin/main moved to dd07374 (#1036, #1033, #888) after the slice-1/slice-2 bundle was cut at 2a9cfbd. Nothing in that range touches scripts/proposal-support.py or tests/proposal-support/, so the merge is a currency merge only. Lane: openxfactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]>
`add-declared-former-id` § 3.4 (realization slice 3), realizing the MODIFIED
*Origin retention at archive* scenario **The history holding the baseline
cannot be read**, and the paragraph of that requirement which commissions
it: "EVERY READ BEHIND THE BASELINE SHALL FAIL CLOSED, AND ABSENT SHALL BE
DISTINGUISHED FROM UNREADABLE. … the gate SHALL establish whether a path is
PRESENT at a commit from the tree, SHALL treat a read it could not perform as
a refusal — CANNOT RUN, naming the read that failed and the identity it was
for — and SHALL NOT report an unreadable history as an unratified one."
THE DEFECT, MEASURED RATHER THAN ARGUED. Slice 2 landed `_tree_rows`, the one
read that separates the two silences, and left its callers treating a None as
"no row" — its own docstring said so and named this slice. On a fixture packet
ratified under `change-r` whose origin is mutated afterwards, against the
parent commit `2a9cfbda`:
full clone origin_retention_errors -> the mutation, refused, exit 2
partial clone ORIGIN RETENTION NOT COMPARABLE change-r: the packet at the
ratifying commit 4dc042695739 declares no origin
(pre-contract packet); presence and shape are still gated
origin_retention_errors -> []
The same history, ARCHIVED GREEN over a mutated origin, because the
`.openspec.yaml` standing at the ratifying commit could not be read and
`git show`'s silence was being read as "declares no origin". That is not an
exotic checkout: it is `git clone --filter=blob:none` with the promisor
unreachable, and `design.md` M1 measured on git 2.43.0 that `git ls-tree`
prints the row and exits 0 there while `git show` exits 128 — the same 128 a
GENUINELY ABSENT path answers with.
WHAT CHANGED — callers, and not probes. `_tree_rows` and `git_show_text` are
untouched.
* `_unreadable_read_refusal` — one refusal, `origin-retention-read-unavailable`,
CANNOT RUN, naming the git command that failed and the identity it was for,
and routing the operator to `git fetch --refetch` or a full clone. No bypass
flag (#690). Returned rather than raised, so the `raise` stands at the call
site.
* `_rows_or_refuse` — the one door a `_tree_rows` None now leaves by.
* `_text_at_a_present_path` — the blob at a path the TREE has already said
stands there, so a None is never "nothing is there".
* `_text_at` — presence off the tree FIRST, then content: absent still answers
None, unreadable refuses.
* `identity_paths_at` — all three of its reads (the active probe, the archive
listing, the archived probe) fail closed. An unreadable ARCHIVE LISTING was
the quietest: an identity standing only in the archive resolved to nothing at
all and the walk passed its ratification by.
* `ratifying_baseline` — the commit enumeration no longer returns None on a
non-zero `git log` (that reported an unreadable history as an unratified
packet, the sentence the requirement forbids by name); the per-commit archive
listing refuses; and each identity's blob is read through
`_text_at_a_present_path`, so a skipped commit can no longer hand the walk a
LATER baseline.
* `origin_retention_errors` — the `.openspec.yaml` at the resolved baseline, and
the re-read under an accepted disposition, both go through `_text_at`. The
refusal is deliberately NOT caught here, on the same ground the moved-packet
arm is not: there is no comparison left to report.
THE FIXTURES, PROVED BEFORE ANYTHING RESTS ON THEM. Two partial clones, both
hermetic and neither needing a network:
* `partial_checkout` — `--filter=blob:none` with `remote.origin.url` pointed at
a path that does not exist. Every tree is local, so `ls-tree` still answers
and the BLOB read fails. Lifted from PR #1024's retained branch `2bc60386`,
which `tasks.md` § 3.4 names as a candidate; the fixture is the half of that
branch the commissioning ruling leaves standing.
* `treeless_checkout` — `--filter=tree:0 --no-checkout`, same cut promisor. The
trees are fetched lazily too, so `git ls-tree` AND the pathspec-limited
`git log` exit 128.
Each helper `skipTest`s where the git in hand ignores the filter, asserts the
probe it rests on really does fail, and asserts the tree still lists the row —
a test whose "unreadable" checkout is merely empty asserts nothing.
TESTS — six, five of which fail against the parent, measured:
python3 -m pytest tests/proposal-support -q -k '<the six>' @ 2a9cfbd
5 failed, 1 passed, 170 deselected
test_an_unreadable_baseline_read_refuses_cannot_run FAILED
test_an_unreadable_archive_listing_refuses_cannot_run FAILED
test_a_present_path_whose_blob_is_unavailable_is_not_read_as_absent FAILED
test_the_refusal_names_the_read_and_the_identity_it_was_for FAILED
test_an_unreadable_commit_enumeration_is_not_an_unratified_packet FAILED
test_a_genuinely_absent_path_is_still_read_as_absent passed
The sixth passes before and after BY DESIGN: it is the regression pin on the
other half of the requirement — a read that CAN be performed and finds nothing
must still answer "nothing", or the gate refuses over every packet that ever
moved. The enumeration test is the sixth beyond the five the brief names,
because § 3.4's fourth clause commissions that behaviour by hand and a
commissioned behaviour with no test is the defect this packet's own plan warns
about.
python3 -m pytest tests/proposal-support -q
before: 170 passed, 290 subtests after: 176 passed, 290 subtests
python3 scripts/proposal-support.py . verify -> proposal support
verification ok, exit 0
WHAT THIS COMMIT DELIBERATELY DOES NOT DO
* § 2.4 — binding a new `former_ids:` entry to the commit that performs the
move. It reads a COMMIT RANGE, which is D7.4's, and nothing here touches it.
* § 4 — the landing validator, its two statuses and its workflow. The ADDED
requirement *An undeclared rename arrival is refused at its landing* keeps all
ten of its scenarios, *The pairing read cannot be performed* and *The
ratification lookup cannot be performed* among them: `renamed_from`'s
`--follow` pairing is the read that fails there, it is the landing gate's to
take, and this commit does not touch `renamed_from` or
`ratified_under_a_former_path`.
* § 5 — the reference resolver and its named consumer.
* Any tick in `tasks.md`, any prose in `docs/document-lifecycle.md`, and any
file under `openspec/changes/`. A tick is a claim about what landed and
belongs to the slice that can make it (D7.6).
* `scripts/sequenced_after.py`'s collapsing probes. The requirement forbids
REUSING them for this read and does not ask for them to be repaired; repairing
them is a change that says so.
* `_accept_declaration_problems`'s two blob reads of a declaration an operator
named by sha. Their presence half now refuses (they resolve through
`packet_yaml_at`), and an unreadable blob there already fails closed as a
finding — "names a `mutation_at` … at which {rel} declares no origin, so there
is no declaration to accept" — so nothing is waved through; only the wording
mis-describes the cause. Named here rather than left to be discovered.
Refs #1003.
Lane: openxfactory-1
Co-Authored-By: Claude Fable 5.1 <[email protected]>
There was a problem hiding this comment.
Sorry @brettheap, you've used your own review budget of 250,000 diff characters for the last 7 days.
You can request another review in 3 days and 15 hours by commenting @sourcery-ai review. Upgrade to get a review now.
Reviewer's GuideSlices 1–3 add declared former-identity parsing and ownership validation, baseline origin-retention by the identity that actually ratified the packet, and fail-closed behavior for every history read so unreadable partial checkouts cannot appear unratified or archive green. Sequence diagram for identity-based origin-retention baselinesequenceDiagram
participant Gate as ArchiveGate
participant Reader as proposal_support
participant Git as GitHistory
participant Packet as PacketYaml
Gate->>Reader: origin_retention_errors()
Reader->>Reader: declared_former_ids_of()
Reader->>Git: git log --full-history --topo-order --reverse
Git-->>Reader: commits across current and former identities
loop earliest candidate commit
Reader->>Git: identity_paths_at()
Git-->>Reader: active or archived proposal path
Reader->>Git: git show commit:path
Git-->>Reader: packet declaration
Reader->>Packet: declares_ratified()
end
Reader->>Reader: ratifying_baseline()
Reader->>Git: _text_at() under baseline identity
Git-->>Reader: ratified origin declaration
Reader-->>Gate: compare current origin with baseline
Flow diagram for fail-closed history readsflowchart TD
A[History read] --> B{Tree says path exists?}
B -->|No rows| C[Absent: continue as genuinely absent]
B -->|Rows found| D[Read blob with git show]
D -->|Success| E[Parse declaration or content]
D -->|Failure| F[Refuse: origin-retention-read-unavailable]
A -->|git log failure| F
B -->|git ls-tree failure| F
F --> G[CANNOT RUN; no unratified or archive-green result]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
Lane: openxfactory-1 (openXfactory-1) Realization slices 1-3 of Where to look hardest:
Measured: the six new slice-3 tests against the parent refs #1003 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5859f053b9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved findings include a critical fail-closed baseline-read issue and multiple identity-resolution validation gaps.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Implements slices 1–3 of declared former-ID support, identity-aware origin-retention validation, and fail-closed Git history reads.
Changes:
- Adds former-ID parsing, lineage validation, and archived identity resolution.
- Establishes baselines across declared identities.
- Refuses unavailable history, tree, and blob reads.
- Adds extensive rename, ambiguity, and partial-checkout tests.
File summaries
| File | Summary | Findings |
|---|---|---|
scripts/proposal-support.py |
Implements former-ID lineage and fail-closed baseline resolution. | 1 critical and 5 moderate unresolved findings involving unreadable predecessor blobs, dated IDs, reserved names, and declaration timing. |
tests/proposal-support/test_proposal_support.py |
Adds lineage, ambiguity, rename, and partial-checkout coverage. | No final comments. |
Review details
Suppressed comments (3)
scripts/proposal-support.py:1465
- These lines trust the
former_idslist from the current worktree, but this branch has no check that each entry was introduced in the commit that performed the move or remained append-only afterward. A ratified packet can therefore be renamed without a declaration and haveformer_ids: [old-id]added in a later commit; this resolver will accept the old baseline and bypass the existing undeclared-move refusal. Keep such moves refused until the landing/history check is wired into this path, or call that validator before admitting the declared lineage.
if former_ids is None:
former_ids = declared_former_ids_in_tree(root, change)
declared = list(former_ids)
scripts/proposal-support.py:618
active_change_dirreserves thearchivedirectory name, but this new reader validates former IDs only withCHANGE_ID_RE, soformer_ids: [archive]is accepted as a packet identity. Its derived path collides withopenspec/changes/archive/, and the baseline walk can then inspect the archive root instead of a packet. Apply the same reserved-name rejection used for active change IDs here.
if not CHANGE_ID_RE.fullmatch(entry):
problems.append(
f"{change}: {where} names {entry!r}, which is not a change "
f"id by the grammar this estate resolves a packet with "
f"(`{CHANGE_ID_RE.pattern}`). An entry names an ID and never "
scripts/proposal-support.py:1397
- The same date-prefixed-ID rule is missed when loading the current lineage:
change_id_ofstripsYYYY-MM-DD-from every archive-shaped name, so an archived packet whose actual ID is2026-08-04-add-datedis treated asadd-datedand itsformer_idsare not read bydeclared_former_ids_in_tree. Check an archive directory whose name exactly equals the requested identity before using the normalized archive-ID match.
if archive.is_dir():
candidates += [d for d in sorted(archive.iterdir())
if d.is_dir() and change_id_of(d) == change]
- Files reviewed: 2/2 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Copilot review, PR #1037, `scripts/packet_reference.py:336`: the archive directory scan uses `is_dir()`, which follows symlinks, so a symlinked archive packet pointing outside `root` was indexed and read through the link while `check_citations` containment-checks only the CITED SPELLING — a path that never itself crosses the link, since the link sits at the ARCHIVE LOCATION the identity resolves TO, a path this module's own directory scan builds and the citing record never typed. THE DEFECT, MEASURED ON THIS TREE BEFORE THIS COMMIT AND NOT ASSUMED. A fixture archive directory `2026-09-10-add-a-linked-one` symlinked to a directory outside `root`, carrying its own `.openspec.yaml` and a `proposal.md` reading "outside content, not part of the checkout": before this commit, `PacketIndex(root).identities()` included `add-a-linked-one`, `Claim.carries("proposal.md")` answered `True`, and `resolve(root, "openspec/changes/add-a-linked-one/proposal.md")` reported RESOLVED — and reading the corpus's own spelling of the resolved path (`root / resolution.resolved_rel`) returned the outside bytes verbatim. After: the directory contributes no claim, `identities()` omits it, and the same citation resolves DANGLING at the IDENTITY half. THE CONTAINMENT RULE CHOSEN, AND WHY, NAMED PER THE REVIEW'S OWN ALTERNATIVES. `resolve_in_tree` in `scripts/validate-pin-registrations.py` — which this module's own docstring already credits with "a reference that walks out of the tree is the caller's containment question and never this reader's" — resolves fully (`.resolve()`, following every symlink) and checks `is_relative_to(root)`; it does NOT refuse a symlink that stays inside the tree. `_contained`/`_contained_dir` mirror that idiom exactly rather than the blanket `is_dir(follow_symlinks=False)` alternative, which would also exclude a symlink that never leaves `root` and has no reason to. THE DISPOSITION CHOSEN IS SKIP, NOT REFUSE: a directory that fails containment CONTRIBUTES NO CLAIM, the same posture `PacketIndex._build` already holds for a malformed `former_ids:` declaration — "a resolver that raised here would turn one packet's malformed declaration into a refusal of every citation in the corpus" — true in the same words of one hostile symlink, and this module's ratified requirement has no CANNOT-RUN outcome for `resolve` to raise into; DANGLING at the identity half is the existing, correct answer for an id nothing legitimately claims. EVERY OTHER `is_dir()`/`exists()`/`iterdir()` ON A WORKING-TREE PATH IN THIS MODULE IS HARDENED THE SAME WAY, GREPPED RATHER THAN GUESSED, in one commit: * `PacketIndex._build`'s `changes.is_dir()` guard and its `live`/`archived` directory-scan comprehensions (the archive one is line 336; the LIVE one beside it follows the identical shape and gets an identical fixture, `test_a_symlinked_live_packet_pointing_outside_root_is_not_indexed`). * The `.openspec.yaml` marker check inside `_build`: a REAL, contained packet directory whose marker file is itself a symlink escaping `root` no longer has its `former_ids:` read. * `Claim.carries`, now taking `root` (its one call site, in `resolve`, already has it): a remainder joined onto an already-contained `self.path` can still name a symlink escaping `root` from inside an otherwise sound packet, and is refused the same way — reported DANGLING at the FILE half, the packet's own identity having resolved soundly. * `resolve`'s own `not candidates` fallback (`Path(root) / claimed`, formerly a bare `.exists()`): a claimed path free of `.`/`..` can still name a symlink segment, and is no longer read as "present" through one. MEASURED. `tests/packet_reference tests/pin_registrations`: 88 passed on `34473ecd` before this commit; the four new tests fail against that same tree (asserted directly, by running them against `34473ecd`'s own `packet_reference.py`); 92 passed after. `tests/proposal-support` untouched, 170 passed / 290 subtests, unchanged from before this commit — this commit edits no file that suite exercises. `python3 scripts/validate-pin-registrations.py .` exits 0, counts line unchanged word for word: "6 disposition(s) carry 40 citation(s) naming 36 referent(s) — 17 name a path in this tree, 0 a URL, 7 a forge reference, 12 a path qualified to another repository; 4 citation(s) name no machine referent; … every in-tree path resolves" — the live corpus carries no symlinked packet, so this fix moves no figure on it. `python3 -m pyflakes scripts/packet_reference.py` exits 0. `python3 scripts/doc-health.py --single-repo .` exits 0, no ERROR-severity finding. WHAT THIS COMMIT DELIBERATELY DOES NOT DO. No edit to `scripts/proposal-support.py`, held by the sibling PR #1038 fixing two other threads on this same review. No new `Resolution` status and no new printed finding channel: `PacketIndex` is a library with no findings list, and the ratified requirement's outcome space (RESOLVED / DANGLING / AMBIGUOUS / NOT_A_PACKET_REFERENCE) already has a correct answer for a claim that must not stand. No change to any `openspec/changes/` file, so Rule 6's landing window does not apply. Refs #1003. Lane: openxfactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]>
Fix round 1 on PR #1038, taking Codex P1 `PRRT_kwDOTAvnrs6iElb0` and Copilot `PRRT_kwDOTAvnrs6iEma3` — the same defect from two sides. Slice 3 closed every read the baseline walk takes and left the refusal that guards the walk reading its own two silences flat, so the gate still switched itself off on exactly the checkout where nothing can be proved. THE DEFECT, MEASURED END TO END on git 2.43.0. Fixture: `change-r` ratified, its origin MUTATED afterwards, then renamed to `change-s` by a commit that also rewrites one line of its prose — so the pairing is INEXACT and the destination blob at the rename commit is the one HEAD carries while the source blob at that commit's parent is not. Against this branch's head `5859f053`: full clone ratifying_commit -> REFUSE origin-retention-path-moved origin_retention_errors -> raises, the archive stops partial clone git log --follow ... -> exit 128, `fatal: could not fetch … from promisor remote` renamed_from -> None ratifying_commit -> THE RENAME COMMIT ITSELF origin_retention_errors -> [] ORIGIN RETAINED change-s (declaration unchanged since the ratifying commit …) The mutated origin archives GREEN. The rename commit became the baseline, so the gate compared the packet against the declaration standing AFTER the mutation — the #833 failure reached through a partial clone instead of through a rename, and the exact sentence § 3.4 forbids: an unreadable history read as an innocent one. WHY THE PAIRING READ FAILS THERE, and it is not a quirk. Rename pairing below an exact match is computed FROM CONTENT (`design.md` M2), so a checkout that cannot read content cannot pair — and the hop it loses is the dangerous one by construction, because an un-ratifying or origin-mutating rename is a rename that also EDITS. WHAT CHANGED — the two doors, and no probe. * `_pairing_rows` — the `git log --follow` probe, split out of `renamed_from` the way `_tree_rows` already stands apart from `_rows_or_refuse`: `[]` when git pairs `rel` with nothing, None when the read could not be performed. A revision that resolves to nothing stays `[]` and not None, because a question about a commit that is not there is not a read that failed. * `_former_path_in` — `kinds` applied over those records, so both doors read one set of rows. * `renamed_from` — unchanged contract, kept for the readers that are not a gate. * `_pairing_or_refuse` — the one door that None leaves by, raising `origin-retention-read-unavailable`, CANNOT RUN, naming the git command and the identity it was for. No bypass flag (#690). * `ratified_under_a_former_path` — BOTH of its reads now fail closed. The pairing goes through `_pairing_or_refuse`; the source packet's header at `revision^` goes through `_text_at` instead of a raw `git_show_text`, so presence comes off the TREE first and a genuinely absent predecessor still answers None while an unreadable one refuses. It takes an `identity` so the refusal is never unattributed, defaulting to the id `rel` addresses. * `_refuse_an_undeclared_move` — passes the change id as that identity, and its docstring now states the line: the refusal fires on a move it could see, and CANNOT RUN on a move it could not look for. THE SECOND READ IS UNREACHABLE ON A REAL PARTIAL CLONE, and the test says so rather than pretending otherwise: a pairing git can still compute without content is an EXACT one, whose source blob at the parent is the SAME OBJECT as the destination blob at the commit, so either both read or the destination read fails first. Its test therefore composes two MEASURED values — the pairing the full clone reports, and the `_tree_rows`-says-present / `git_show_text`-says- None pair the partial clone is asserted to produce in the test itself — which is the technique `test_an_unreadable_archive_listing_refuses_cannot_run` already uses to pin WHICH CALLER carries a refusal. The read is closed because the requirement says every read behind the baseline is closed, not because a route to it was found. Three tests, all three failing against `5859f053`: `test_an_unreadable_move_probe_refuses_rather_than_concluding_no_move` (AssertionError: OriginRetentionError not raised — the defect itself), `test_the_move_probes_source_header_read_refuses_where_it_stands`, and `test_a_predecessor_absent_at_the_parent_is_still_no_move`, which guards the change from becoming a fail-ALWAYS one. tests/proposal-support: 176 passed before, 179 after, 290 subtests either way. `proposal-support.py . verify` -> `proposal support verification ok`, exit 0. Refs #1003. Lane: openxfactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]>
Fix round 1 on PR #1038, taking Codex P2 `PRRT_kwDOTAvnrs6iElb4` and Copilot `PRRT_kwDOTAvnrs6iEmbV` / `PRRT_kwDOTAvnrs6iEmbp` — and Copilot `PRRT_kwDOTAvnrs6iEemp` on the stacked PR #1037, which reads the same lines because slices 1–2 are this branch's. THE RULE WAS ALREADY WRITTEN DOWN IN THIS FILE, and the identity readers took only half of it. `archive_directory_name` states the pinned CLI's own behaviour, copied from `@fission-ai/[email protected]` rather than approximated: a change whose id ALREADY carries a `YYYY-MM-DD-` prefix is archived under that id UNCHANGED, because "re-prefixing would stutter the name, and when the archive runs on a later day the folder would sort under a day on which the change did not happen". `names_this_change` then says what follows: a directory called `2026-08-04-foo` is the wrong-day archive of `foo` AND the archive of a change whose id IS `2026-08-04-foo`, and "the two readings are indistinguishable from the name". Neither reader admitted the second reading, and one of them applied the strip where there is no ambiguity at all. MEASURED against this branch's head `5859f053`: change_id_of(openspec/changes/2026-08-04-add-dated) -> 'add-dated' identity_paths_at(root, HEAD, '2026-09-09-foo') -> [] (with openspec/changes/archive/2026-09-09-foo/proposal.md standing) proposal_path_at(root, HEAD, '2026-09-09-foo') -> None declared_former_ids_in_tree(root, '2026-09-10-bar') -> [] (with that archived packet declaring former_ids: [old-bar]) The first renames a live packet: `CHANGE_ID_RE` admits a leading date, `active_change_dir` resolves such an id verbatim, and the corpus's own pinned- CLI fixture is `2026-08-04-add-dated`. `former_identity_claimants` passes every LIVE directory through `change_id_of`, so that packet's `former_ids:` was validated and attributed as `add-dated`'s — the "an entry may not name the packet's OWN id" arm asked about a packet that does not exist, and missed the self-claim that was written. The second and third are worse, because their answer is a SILENCE the walk acts on: an identity reported ABSENT at every commit it occupies, and a declaring packet handed the UNDECLARED answer — the shed-lineage failure this mechanism exists to stop, arriving through the reader rather than through a move. WHAT CHANGED. * `change_id_of` — strips only for a directory UNDER `archive/`. An active directory's name IS its id. The archived half's residual ambiguity is stated rather than pretended away, and the docstring names the two helpers that do settle it. * `_archive_dir_carries` — the archive-row test, both readings: the exact identity name first, then the dated interpretation. Admitting both is what the requirement asks for — the identity resolution "SHALL NOT infer an identity from rename detection, from similarity between two packets, or from any walk over a lineage", and a directory name is none of those. * `identity_paths_at` — uses it, so a preserved date-prefixed id resolves to the directory it occupies. Where ONE identity matches TWO directories that way, `proposal_path_at` refuses `origin-retention-identity-ambiguous` naming both, which is the ratified scenario *A declared identity resolves to two locations at one commit* — reachable for a dated id only now that the exact reading exists. * `_change_ids_of_proposal_path` (was `_change_id_of_proposal_path`) — a LIST, the directory's own name first. `_refuse_an_undeclared_move` tests the DECLARED lineage against all of them, so a lawful move out of a preserved dated archive id is recognised instead of taking the undeclared refusal; `_first_change_id_of_proposal_path` serves the callers that want one string. * `declared_former_ids_in_tree` — chooses its archived candidate with `names_this_change`, the reading this file already settled for the archive wrapper, which also takes the ACTIVE ids into account the way that helper's own docstring requires. * `former_identity_claimants` — one residue named rather than left to be discovered: its ARCHIVED half still reads the commoner interpretation, so a packet archived under a preserved dated id that declares its OWN id would escape the self-claim arm. The estate has no change of that shape today, the live half is now exact, and settling the archived half needs the active-ids reading a sweep over departed packets cannot take. Four tests, all four failing against `5859f053` on behaviour rather than on a missing symbol: test_an_active_id_that_begins_with_a_date_keeps_it AssertionError: 'add-dated' != '2026-08-04-add-dated' test_a_preserved_date_prefixed_archive_id_resolves_to_its_directory AssertionError: Lists differ: [] != ['openspec/changes/archive/…'] test_an_archived_packet_under_a_preserved_dated_id_declares_lineage AssertionError: Lists differ: [] != ['old-bar'] test_an_identity_matching_two_archive_directories_still_refuses AssertionError: 1 != 2 tests/proposal-support: 179 passed before, 183 after, 290 subtests either way. `proposal-support.py . verify` -> `proposal support verification ok`, exit 0. Refs #1003. Lane: openxfactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]>
Fix round 1 on PR #1038, taking Copilot `PRRT_kwDOTAvnrs6iEenD` — raised on the stacked PR #1037 because `former_id_problems` is slice 1's reader and reaches that review through this branch. The fix belongs here, where the reader lives. MEASURED against this branch's head `5859f053`: former_id_problems("x", {"former_ids": ["archive"]}) -> [] active_change_dir(root, "archive") -> SupportError identity_paths_at(root, HEAD, "archive") -> [] `archive` matches `CHANGE_ID_RE` like any other slug, so the grammar arm cannot refuse it and nothing else did. A packet could therefore publish `former_ids: [archive]`, and the declaration would be accepted, indexed by `former_identity_claimants`, and carried into `ratifying_baseline` as an identity to resolve — where every resolution answers silence, because `openspec/changes/archive/` is the archive ROOT and never a packet. A declared lineage that resolves to nothing is exactly the shape the reader exists to refuse: `declared_former_ids` raises rather than returning the entries it could read, precisely so the walk is never handed a lineage its author did not write. WHAT CHANGED. * `RESERVED_CHANGE_ID` — hoisted beside `CHANGE_ID_RE`, for the reason that pattern was hoisted: the declaration and the walk that consumes it cannot be allowed to disagree about what a change id is. `active_change_dir` now reads it instead of spelling the literal a second time. * `former_id_problems` — a seventh arm, refusing an entry that names it, saying why the grammar above cannot: it is a lawful slug and an unlawful identity. One test, failing against `5859f053` with `AssertionError: 0 != 1` — the entry accepted where a refusal is required: `test_an_entry_naming_the_reserved_archive_segment_refuses`. tests/proposal-support: 183 passed before, 184 after, 290 subtests either way. `proposal-support.py . verify` -> `proposal support verification ok`, exit 0. Refs #1003. Lane: openxfactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved critical and moderate review findings affect archive resolution and fail-closed validation.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (3)
scripts/proposal-support.py:2634
origin_retention_errorsstill computeschangeabove with a regex that strips a leading date from every directory name. For an active packet whose id is2026-08-04-add-dated, these new calls receiveadd-dated, so the active path is omitted from the baseline pathspec and the packet can be reported as unratified (and a self-claim is validated against the wrong id). Derive the default withchange_id_of(directory)so active names remain verbatim.
lineage = declared_former_ids_of(directory, change)
identities = [change] + list(reversed(lineage))
baseline = ratifying_baseline(root, change, former_ids=lineage)
scripts/proposal-support.py:803
former_identity_claimantsregisters archived packets'former_idsbut not their own preserved identity. Because archive relocation preserves the id andidentity_paths_atresolves archived locations, an archivedarchive/<date>-change-rplus a live packet declaringformer_ids: [change-r]is treated as one owner and can bind the new packet's baseline to the unrelated archived packet. Include archived current identities, or explicitly refuse this collision, in the exactly-one-owner check.
for directory in live + archived:
change = change_id_of(directory)
try:
ids = declared_former_ids_of(directory, change)
except FormerIdError:
scripts/proposal-support.py:712
- For an archived packet whose ID itself begins with a date,
change_id_ofstrips the archive prefix and this default validates the packet as the wrong identity. Thusdeclared_former_ids_of(archive/2026-09-10-bar)treats2026-09-10-baras a former ID rather than the packet's own ID, allowing the self-claim shape refusal to be missed. Resolve the archive directory with the exact-vs-stripped identity rules (or require the caller to provide the identity) before validating the declaration.
change = change or change_id_of(directory)
return declared_former_ids(change, load_packet(directory))
- Files reviewed: 2/2 changed files
- Comments generated: 5
- Review effort level: Lite
Fix round 1 on PR #1038, taking Copilot `PRRT_kwDOTAvnrs6iGr_N` and `PRRT_kwDOTAvnrs6iGr_s` — raised on the stacked PR #1037 against `scripts/proposal-support.py`, which is this branch's slice 1–2 work, so the fix belongs here. Both land on the two readers that hand `ratifying_baseline` its lineage. (1) A SYMLINK IS `active_change_dir`'S TRAVERSAL REACHED FROM THE TREE. That function already refuses a change NAME with path syntax in it — "anything with path syntax would let a caller-supplied name traverse outside openspec/changes/" — and a committed symlink is the same traversal arriving through a pull request instead of through a caller. Git tracks one as an ordinary object (mode `120000`), and `is_dir()`/`iterdir()` both follow it silently. MEASURED with `openspec/changes/archive` committed as a symlink to a directory outside the checkout: git ls-files -s -> 120000 … openspec/changes/archive former_identity_claimants -> claims 'stolen-identity', attributed to `openspec/changes/archive/2026-09-09-forged` declared_former_ids_in_tree(root, '2026-09-09-forged') -> ['stolen-identity'] An `.openspec.yaml` nobody in this repository wrote, read as this corpus's lineage and carried to the archive gate. `contained_dir` now guards the `changes` root, the `archive` root and every candidate child in both readers. It RESOLVES before it compares, so a link chain cannot walk out in more than one hop, and it resolves `root` too so a checkout reached through a symlinked parent is not refused as foreign. It answers a BOOLEAN and not the resolved path, deliberately: `change_id_of` reads a packet's identity off the path that was WALKED (it asks whether the parent is `archive/`), and handing it a resolved spelling would rename a packet reached through an in-repository link. The live corpus tracks ZERO symlinks anywhere — `git ls-files -s | grep ^120000` is empty — so this refuses nothing that stands today. It is the surface being closed, not a finding being repaired. (2) TWO PLACES FOR ONE ID IS AN AMBIGUITY TO REPORT, IN THE WORKING TREE TOO. `declared_former_ids_in_tree` returned the FIRST candidate holding a packet. Where an identity stands both actively and in the archive, the two `.openspec.yaml` files may declare different lineages, so the lineage the walk resolved was chosen by this reader's ordering rather than by an author — which is the line `proposal_path_at` already draws one layer down, and the ground `archived_change_dirs` gives for returning a LIST. MEASURED before the change: with `openspec/changes/change-x/` declaring `[from-the-active-copy]` and `openspec/changes/archive/2026-09-09-change-x/` declaring `[from-the-archived-copy]`, it returned `['from-the-active-copy']` silently. `ratifying_baseline` happened to refuse afterwards, because both locations also stand at the commit it visits first — but that is the COMMITTED tree agreeing with the working one, which a reader of the WORKING tree may not assume. It now refuses `origin-retention-identity-ambiguous`, CANNOT RUN, naming both locations and the usual cause (an archived packet whose active directory was left standing). One location is still an answer, not a refusal. Neither refusal fires on the corpus: 47 active ids, 167 archived directories, no active id matching an archive directory under `names_this_change`, and no id matched by two archive directories. Two tests, both failing against `30d40c1c`: `test_a_symlinked_archive_cannot_import_an_identity_from_outside` (`AssertionError: 'stolen-identity' unexpectedly found in …`) and `test_an_identity_holding_a_packet_in_two_places_refuses_the_lineage` (`AssertionError: OriginRetentionError not raised`). The first also asserts that the packets this repository DOES contain are still swept, so the guard is containment and not a switched-off sweep. tests/proposal-support: 184 passed before, 186 after, 290 subtests either way. tests/pin_registrations + openspec_cli_pin + sequenced_after + carve_manifest + notebooklm: 751 passed, 3 skipped. `proposal-support.py . verify` exit 0; `validate-pin-registrations.py .` exit 0; `doc-health.py --single-repo .` byte-identical to the pre-fix-round run. Refs #1003. Lane: openxfactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
Four unresolved findings remain in scripts/proposal-support.py, including two critical issues.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (2)
Previously missed (1) — in code that hasn't changed since the last review.
scripts/proposal-support.py:2706
origin_retention_errorsnow uses the defaultchangeto resolve the declared lineage and baseline, but the default is still derived by unconditionally stripping a date prefix fromdirectory.name. For an active packet whose actual id is2026-09-10-bar, this becomesbar, so the new lineage/baseline read searches the wrong identity and can report the packet as unratified. Preserve active date-prefixed ids when deriving this default, for example by usingchange_id_of(directory).
scripts/proposal-support.py:1597
- The union walk never enumerates the exact archive path for a date-prefixed identity.
_archive_dir_carriestreatsarchive/2026-09-09-fooas carrying bothfooand2026-09-09-foo, but this pathspec only matchesarchive/*-2026-09-09-foo; an archived-only/date-prefixed packet can therefore be resolved byidentity_paths_atyet omitted fromratifying_baseline. Include the exact archive candidate in the pathspecs for date-prefixed identities.
return [f"openspec/changes/{identity}/proposal.md",
f":(glob){_ARCHIVE_ROOT}*-{identity}/proposal.md"]
- Files reviewed: 2/2 changed files
- Comments generated: 2
- Review effort level: Lite
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cce09fdd7e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…hat is not a move, a manifest that does not parse TAKEN from Copilot's review of PR #1039. Three of its six threads name real defects in this slice's own files; each is fixed here with a test measured failing against the parent commit `6dfb32d4`, and the other three are refused below with reasons rather than left unanswered. 1. THE ARCHIVE DATE MEANS THE ARCHIVE AND NOTHING ELSE. `change_id_of_dir` stripped a `YYYY-MM-DD-` prefix from any packet directory. `CHANGE_ID_RE` admits an ACTIVE id that merely begins that way — `2026-09-14-example` is a legal change id — so the gate derived `example` as the source identity, `ever_ratified` walked pathspecs no packet has ever occupied, answered "never ratified", and the undeclared rename PASSED; the archive exception, which compares two ids, would also have stopped recognizing that packet's own relocation. The strip now happens only under the archive root. MEASURED on the parent: `change_id_of_dir("openspec/changes/2026-09-14-example")` returns `'example'`, and `test_a_live_packet_id_that_begins_with_a_date_keeps_its_whole_id` fails there with `AssertionError: 'example' != '2026-09-14-example'`. 2. A FILE THAT CROSSES TWO STANDING PACKETS IS NOT A PACKET MOVING. `moves_at` read every file-level `R` whose two sides sat in different packet directories as a packet-directory move, so one `design.md` relocated from a ratified packet into another packet that also stands read as an ARRIVAL from a ratified identity — and the gate refused an ordinary edit that no declaration could repair, because nothing moved. `relocations_at` now qualifies each pairing against the tree: the source must have been present at the parent and be gone here, the destination absent at the parent and present here. THIS IS NOT PAIRING FROM THE TREE, which `design.md` D3 declined by name — the pairing is still git's and only git's, and the tree is asked one further question about a pairing git has already made. A source that still stands is the COPY shape the requirement says declares nothing; a destination that already stood is not a packet being BROUGHT IN. MEASURED on the parent over that fixture: one `former-id-undeclared` naming `openspec/changes/change-s/` as brought in from `openspec/changes/change-r/` — a FALSE refusal. On this commit: no finding. 3. AN UNREADABLE MANIFEST IS NOT A PACKET THAT DECLARES NOTHING. `proposal_support.load_packet` answers None for THREE states — absent, unparseable YAML, and a top-level that is not a mapping — and only the first is an answer. The corpus arm handed all three to `former_id_problems` as a packet with no declaration, so a malformed `.openspec.yaml` was swallowed by the parser that could not reach it and the whole-tree sweep reported a clean corpus: the exact vacuous read this gate's PyYAML guard exists to refuse, arriving one file at a time instead of all at once. The commit-range arm always drew the distinction (`declared_at` raises rather than returning `[]`); the corpus arm now draws it too, and a packet with NO manifest is still simply silent. MEASURED on the parent: `corpus_problems` returns `[]` over a tree carrying an unparseable manifest. REFUSED, WITH REASONS, AND WRITTEN INTO THE MODULE SO THEY ARE NOT REDISCOVERED AS SURPRISES — a new `WHAT THIS READER DOES NOT JUDGE` section names the first two: * *A successful diff with no rename pairs is silently treated as no move.* True, and it is the similarity THRESHOLD rather than the limit: `-l0` lifts the limit, but a relocation whose every file is also rewritten below the threshold lands as plain D and A rows. The fail-closed arm does not reach it and is not meant to — that arm exists for a pairing read the checkout CANNOT PERFORM, and here the read was performed and answered. Pairing from the TREE instead is what `design.md` D3 declined by name, because a commit that withdraws one packet and creates an unrelated other has exactly that tree shape and refusing it refuses a lawful landing. Closing it is a threshold ruling and a new refusal class on a gate with no bypass flag: it belongs to a change that says so, in the shape `tasks.md` § 6.4 uses. * *A conflict-resolution merge can introduce a move relative to both parents.* True. Judging it needs a COMBINED diff (`git diff-tree -c`), whose rename reporting is not the `-M` pairing every refusal here rests on — a different read and a different ruling from D3's *one commit, never a chain*. Named in the module, not taken here. * *`change_id_of` in `scripts/proposal-support.py` strips the same prefix unconditionally.* True, and it is the same defect as (1) in a file this author may not edit: it belongs to PR #1038, whose fix round is already repairing `change_id_of`'s date-prefix stripping. This module IMPORTS that function through `corpus_problems` and therefore INHERITS the #1038 fix rather than forking a copy of it. WHAT THIS COMMIT DELIBERATELY DOES NOT DO. It does not touch `scripts/proposal-support.py`, `tests/proposal-support/`, `openspec/changes/` or any task box. It adds no status token and no flag: (1) and (2) narrow what is refused and (3) reports under the declaration requirement's existing name. It does not lower the rename threshold, which would pair a withdrawal with an unrelated creation and refuse a lawful landing to catch an evasion. Refs #1003. Lane: openxfactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]>
…osed Fix round 1, second bench round on PR #1038 — eight threads, all eight taken. Five of them are defects the FIRST round created or half-closed, which is the reason a second round is bench and not ceremony. **A — `_identity_pathspecs` could not reach the exact archive path** (`PRRT_kwDOTAvnrs6iG9tt`). Round one taught `_archive_dir_carries` that `archive/<id>` is a location a preserved dated id occupies, and left the COMMIT ENUMERATION on the glob `*-<identity>`, which does not match `<identity>`. Measured: `ratifying_commit` returned None for a packet standing ratified at `openspec/changes/archive/2026-09-09-foo/proposal.md` — the walk enumerated no commit for it and reported it as never ratified, while `identity_paths_at` resolved it perfectly well. The two halves of one resolution disagreeing about where an id can stand. The exact archive path is now its own pathspec. **B — the accept channel authorised itself over an unread declaration** (`PRRT_kwDOTAvnrs6iG9vA`). Slice 3's own message said this read's flat answer merely mis-described its cause. It does more: `_origin_mapping(None)` is None and `_changed_keys(None, …)` is `[]` by its own advisory contract, so an `accept` entry declaring `changed_keys: []` compares EQUAL to a measurement taken over a declaration that was never read — the acceptance authorised, and the baseline moved to the accepted mutation, on a checkout that could not read the ratification at all. Both of `_accept_declaration_problems`'s blob reads now go through `_text_at`. **C — the archived self-claim, no longer a named residue** (`PRRT_kwDOTAvnrs6iG9vt`, Codex P2 `PRRT_kwDOTAvnrs6iHS5I`). Round one named this in a docstring and left it; two reviewers then measured it, so it is closed. Measured: `archive/2026-09-09-foo` declaring `former_ids: [2026-09-09-foo]` — a claim to be the move of ITSELF — was validated as `foo`, passed every arm, and the sweep indexed the self-claim as a legitimate lineage. `packet_identities_of` returns every id such a directory can carry and the sweep refuses a declaration naming any of them, which is the arm `former_id_problems` cannot reach because it is asked about one id at a time. **D — `ratifying_commit`'s retained paragraphs were false** (`PRRT_kwDOTAvnrs6iG9wN`). Its new first paragraph says the resolution is `ratifying_baseline`'s while three retained ones still described a one-path walk, an ACTIVE-only read, and a corpus in which "no former-id declaration exists". All three restated. Documentation only; no test. **E — a contained directory can carry an uncontained header** (`PRRT_kwDOTAvnrs6iHNFa`). Round one containment-checked packet DIRECTORIES. `load_packet` opens `.openspec.yaml` through `is_file()`, which follows a symlink exactly as `is_dir()` does. Measured, with the header committed as a symlink (`git ls-files -s` → mode `120000`): the sweep claimed `'stolen-by-header'` and `declared_former_ids_in_tree` returned `['stolen-by-header']`. `contained_file` now guards it in both lineage readers. **F — the gate's lineage skipped the two-candidate rule** (`PRRT_kwDOTAvnrs6iHNGM`). `origin_retention_errors` read the declaration straight off the directory it was handed and passed it on as `former_ids=`, bypassing `declared_former_ids_in_tree`'s ambiguity refusal. It now resolves through that reader. Stated plainly: the fixture built for this ALREADY refused at `cce09fdd`, through `proposal_path_at` at the commit the walk visits — the committed tree happening to agree with the working one. What changes is that the refusal no longer depends on that coincidence. The same commit stops `origin_retention_errors` deriving its change id with a fourth hand-rolled copy of the date strip, which renamed an active dated id. **G — the archive wrapper's collision heuristic is not a resolution rule** (Codex P2 `PRRT_kwDOTAvnrs6iHS5E`). Round one resolved archived candidates with `names_this_change`, whose `other_change_ids` arm answers a TRANSIENT question — "is this new directory mine or a sibling lane's", read before the child ran. Measured: with archived `foo` at `archive/2026-09-09-foo` and an unrelated ACTIVE packet whose valid id is `2026-09-09-foo`, `declared_former_ids_in_tree(root, "foo")` returned `[]` although the archived packet declares `['old-foo']`. The repair is one rule rather than two. `declared_former_ids_in_tree` now uses `_archive_dir_carries`, the same rule `identity_paths_at` resolves a location with, so the two halves cannot disagree. The live-ids guard MOVES to the arm it belongs on: a change that is LIVE has not been archived, so an archive directory spelled exactly like a live id cannot be that packet's archive — the EXACT reading yields, the STRIPPED reading never does. That ordering is what this round's own test found: written the naive way, a lawful corpus carrying both `openspec/changes/2026-09-09-foo/` and `archive/2026-09-09-foo/` read as one identity in two places and refused. `live_ids` is empty for a read at a ref, deliberately — which ids were active at some commit is another tree read per commit, and admitting both readings there is what the ratified ambiguity scenario expects. Six tests, every one failing against `cce09fdd` on behaviour: test_a_preserved_dated_archive_id_is_enumerated_by_the_walk AssertionError: 'openspec/changes/archive/2026-09-09-foo/proposal.md' not found in [...] test_an_unreadable_ratification_blob_cannot_authorise_an_acceptance AssertionError: OriginRetentionError not raised test_an_archived_self_claim_under_either_reading_is_not_indexed AttributeError: no attribute 'packet_identities_of' test_a_symlinked_packet_header_cannot_import_a_lineage AssertionError: 'stolen-by-header' unexpectedly found in {...} test_an_unrelated_live_dated_id_does_not_hide_an_archived_lineage AssertionError: Lists differ: [] != ['old-foo'] test_the_gate_resolves_its_lineage_through_the_tree_resolver AssertionError: OriginRetentionError not raised The accept-channel test drives `_accept_declaration_problems` directly rather than through `origin_retention_errors`: written through the gate it was VACUOUS, because slice 3's baseline door raises on the same (revision, path) before the accept channel reads it. Found by running it against `cce09fdd` and watching it pass. tests/proposal-support: 186 passed before, 192 after, 290 subtests either way. tests/pin_registrations + openspec_cli_pin + sequenced_after + carve_manifest + notebooklm: 751 passed, 3 skipped. `proposal-support.py . verify` exit 0; `validate-pin-registrations.py .` exit 0; `doc-health.py --single-repo .` byte-identical to the pre-fix-round run. Refs #1003. Lane: openxfactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]>
…sh out of the gate TAKEN from Copilot's fourth round on PR #1039, and it closes the last way this slice could leave the corpus arm with an exit code its own contract does not name. Two states got past the presence check added in `1c4d0131`: * A `.openspec.yaml` carrying bytes that are NOT UTF-8. `proposal_support. load_packet` decodes before it parses and catches only `YAMLError`, so that file comes out of it as a raised `UnicodeDecodeError` rather than as None — a traceback where the two documented exits are 1 (`former-id-undeclared` and the declaration refusals) and 2 (`former-id-arrival-unreadable`). * A `.openspec.yaml` that is PRESENT and is not a regular file. `is_file()` reads that as absent, which is the silence this whole arm exists to refuse. Both are now refusals naming the packet: the read is wrapped, the presence test is `exists()` rather than `is_file()`, and the message names "a path that is not a regular file" beside the other two shapes. AND THE OWNERSHIP SWEEP'S OWN RE-READ IS CAUGHT TOO. `former_identity_ownership_ problems` re-reads every manifest itself, in `scripts/proposal-support.py` — a module this slice imports and does not edit — so the same unreadable file reaches `load_packet` a second time and raises there as well. The call is wrapped and the failure reported as a refusal that says which question went unanswered ("whether every declared former identity has EXACTLY ONE OWNER was not established"), with the offending packet already named by the loop above. Fixing the shared reader is #1038's to do if it is done at all; converting a foreign reader's crash into this gate's own named refusal is this module's. MEASURED against the parent commit `ff7fcb7c`: `test_a_manifest_that_cannot_be_read_at_all_is_refused_not_skipped` fails there with `UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 16` raised out of the reader — which is the finding, exactly. On this commit: 41 passed with no `GITHUB_EVENT_NAME` and 41 with `GITHUB_EVENT_NAME=pull_request`, and the live corpus still exits 0 over 47 active and 167 archived packets. WHAT THIS COMMIT DELIBERATELY DOES NOT DO. It catches `UnicodeDecodeError` and `OSError` and nothing wider: a bare `except Exception` around a foreign reader would turn a defect in this gate into a finding about somebody's packet. It does not edit `scripts/proposal-support.py`. It adds no status token — these are declaration refusals, reported under the requirement that names none, at exit 1. Refs #1003. Lane: openxfactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]>
Fix round 1, fifth bench round on PR #1038 — two threads, both taken. Copilot `PRRT_kwDOTAvnrs6iIy3N` and `PRRT_kwDOTAvnrs6iIy43`, and both are this fix round's own work. **THE `rev-parse` ARM WAS THE ONE `[]` THIS ROUND ARGUED FOR, AND THE ARGUMENT WAS WRONG** (`PRRT_kwDOTAvnrs6iIy3N`). When `_pairing_rows` was split out of `renamed_from`, its docstring reasoned that a revision resolving to nothing answers `[]` rather than None because "a question about a commit that is not there is not a read that failed". That is true of a MISSPELLED revision and false of the one shape that matters: the only caller passes a full hash straight out of THIS repository's own `git log --format=%H`, so a `rev-parse --verify <that hash>^{commit}` that fails means the object cannot be read — and `[]` reached `_pairing_or_refuse` as a successful read with no pairing, which is the same fail-open the round opened by closing the `git log` arm two lines below. `_pairing_rows` now returns None there, so both of its git calls leave by the same door. `renamed_from`, the TOLERANT door, still answers None for a revision that resolves to nothing — which is what `test_the_guard_reads_any_spelling_of_the_candidate_commit` pins, and it is unchanged. **AND `load_packet_at`'S SUMMARY LINE STILL PROMISED THE CONFLATION** (`PRRT_kwDOTAvnrs6iIy43`). The previous round taught the body to raise for a present-but-unreadable blob and for one that does not parse, and left the first line saying "None when absent or unparseable". A caller who reads that line writes the conflation back by hand, which is the whole failure mode this slice exists to remove. The summary now says None is for a genuinely ABSENT path only, and names both exceptions and which silence each answers. One test, failing against `7568c9f1` with `AssertionError: [] is not None`: `test_an_unresolvable_candidate_commit_refuses_at_the_gate_door`. It asserts all three doors at once — the probe answers None, the tolerant reader still answers None, and the gate's door refuses `origin-retention-read-unavailable` naming the identity. tests/proposal-support: 195 passed before, 196 after, 290 subtests either way. `proposal-support.py . verify` exit 0; `validate-pin-registrations.py .` exit 0; `doc-health.py --single-repo .` byte-identical to the pre-fix-round run. Refs #1003. Lane: openxfactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
Three unresolved findings remain, including one critical issue.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (2)
scripts/proposal-support.py:1019
- This reader still follows an out-of-tree symlink with
.is_dir(). Aopenspec/changes/<id>symlink to an external directory would make a valid move look like a copied packet and cause a false refusal, while the other lineage readers already reject uncontained paths viacontained_dir; use the same containment check here.
if standing.is_dir():
scripts/proposal-support.py:1912
archiveis a validCHANGE_ID_REmatch but is the reserved archive-root segment (active_change_dirrejects it at lines 355–359). This direct baseline API only checks the regex, so a caller can make the resolver treatopenspec/changes/archive/as a packet identity (and a tree containingarchive/proposal.mdcould be baselined). Apply the same reserved-segment check here so all identity readers reject this non-packet id consistently.
if not CHANGE_ID_RE.fullmatch(change):
raise SupportError(f"invalid change name: {change}")
- Files reviewed: 1/2 changed files
- Comments generated: 1
- Review effort level: Lite
…ymlink TAKEN from Copilot's fifth round on PR #1039 — two threads, one rule, one commit. The corpus arm walked the working tree with `iterdir()` and `is_dir()`, and both FOLLOW symlinks: * a symlink standing where a packet directory would be was read as a packet, and its target's `.openspec.yaml` adjudicated — a tree no commit carries, and possibly outside the checkout entirely; * `Path.exists()` follows links too, so a DANGLING `.openspec.yaml` symlink read as an absent manifest and the packet passed as one that declares nothing — the silence the presence check added in `1c4d0131` exists to refuse. THE RULE IS THE OTHER ARMS' OWN. Git stores a symlink as a BLOB whose content is a path, so `git ls-tree` — the read the commit-range arm and both fail-closed arms rest on — reports no tree at that path and sees no packet there. An arm that reads through the link adjudicates something the rest of this gate cannot see. So a symlink where an active packet, the archive root, or an archived packet would be is REPORTED and not walked; a symlinked manifest is reported and never opened; and `is_symlink()` is asked FIRST, so a dangling link is caught by the same branch rather than by a presence test that cannot see it. AND THE OWNERSHIP SWEEP IS NOT RUN OVER A TREE THIS ARM HAS ALREADY REFUSED. `former_identity_ownership_problems` walks the working tree itself, in `scripts/proposal-support.py` — imported here, not edited — and its walk follows the same link. MEASURED in the test: with a symlinked packet in place, `former_identity_claimants(root)` claims `change-from-outside`, an identity declared by a file no commit in that repository carries. Letting that decide whether an identity has EXACTLY ONE OWNER is worse than not answering, and the run is already refusing, so the sweep is skipped and the unanswered question is named. MEASURED against the parent commit `d053b38e`: `test_a_symlink_is_refused_and_is_never_read_through` fails there with `AssertionError: 0 != 2 : []` — the parent reports NO problem at all for a symlinked packet directory, because it read the outside manifest, found it well formed, and called the corpus clean. On this commit: 42 passed with no `GITHUB_EVENT_NAME` and 42 with `GITHUB_EVENT_NAME=pull_request`; `tests/proposal-support` unchanged at 170 passed, 290 subtests; the live corpus still exits 0 over 47 active and 167 archived packets, and carries no symlink under `openspec/changes/` (`find -type l` and `git ls-files -s` both report none), so nothing in this repository changes verdict. WHAT THIS COMMIT DELIBERATELY DOES NOT DO. It does not enumerate the corpus from git tree entries instead of the working tree, which is the wider fix Copilot also offered: the corpus arm is defined over the tree this gate was GIVEN — that is what lets `proposal-support.py verify` and this validator read the same working copy an author is editing — and changing that is a different reading of § 2.6 than the one slices 1 and 2 landed. Refusing what cannot be seen is the part that belongs to this slice. It does not edit `scripts/proposal-support.py`, whose own walk still follows links; that is named here and left to #1038. Refs #1003. Lane: openxfactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]>
Fix round 1, sixth bench round on PR #1038 — one thread, taken. Copilot `PRRT_kwDOTAvnrs6iJHKd`, on `origin_retention_errors`'s default identity. THE REPLAY READS AN ARCHIVED DIRECTORY, and its default was an unchecked strip. That line was `re.sub(r"^\d{4}-\d{2}-\d{2}-", "", directory.name)` before this fix round and `change_id_of(directory)` after it, which is the same reading spelled once instead of twice — and for `archive/2026-09-09-foo` the stripped reading `foo` omits `openspec/changes/2026-09-09-foo/` from the baseline walk ENTIRELY. The later ARCHIVE commit can then become the baseline and a mutation made before archiving passes, which is the #833 failure reached through the identity rather than through a rename. HISTORY SETTLES IT, AND ONLY HISTORY. The two readings of a dated archive name differ in exactly one fact: whether an ACTIVE packet by the directory's FULL name ever existed. That is one path-limited `git log`, and it is a fact rather than a preference — which is the whole difference between resolving an identity and choosing one. `identity_of_packet_dir` is that resolution. An ACTIVE directory's name IS its id. An archived directory whose name carries no date prefix is its id. A dated archived directory resolves to the stripped id where `openspec/changes/<full name>/proposal.md` has NO history, and otherwise REFUSES `origin-retention-identity-ambiguous`, naming both candidates and the repair: pass the id. A `git log` that could not be performed refuses too, and says which of the two it was. MEASURED over this corpus: of **167** archived directories, **ZERO** have a full name that ever stood as an active packet, so this refuses nothing that stands today — and the archive wrapper, the only production caller, passes `change` explicitly and never reaches it. One test, failing against `ef022a83` with `AttributeError: no attribute 'identity_of_packet_dir'`: `test_an_archived_dated_directory_does_not_guess_its_own_identity`. It asserts all four arms — an unambiguous archived name, an ACTIVE dated name resolving to itself, and the refusal where both readings name a packet this repository really carried. tests/proposal-support: 196 passed before, 197 after, 290 subtests either way. `proposal-support.py . verify` exit 0; `validate-pin-registrations.py .` exit 0; `doc-health.py --single-repo .` byte-identical to the pre-fix-round run. Refs #1003. Lane: openxfactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]>
…alked TAKEN from Copilot's sixth round on PR #1039, and it is the rule `e4fab682` took one level up. `Path.is_dir()` and `iterdir()` both follow links, so a symlinked `openspec/` or `openspec/changes/` moved the WHOLE corpus somewhere no commit carries: every per-packet check would then have read files the commit-range arm cannot see, while never seeing a symlink itself, because by then the walk is already on the other side of the link. Both ancestors are now tested with `is_symlink()` BEFORE `is_dir()` is asked, and a symlink there ends the corpus arm with one refusal that says what was not answered — "no declaration, no standing id and no ownership question was answered over this tree" — rather than reporting findings from down there. MEASURED against the parent commit `e4fab682`: `test_a_symlinked_corpus_root_is_refused_before_anything_is_walked` fails there on both subtests, `openspec` and `openspec/changes` alike. On this commit: 43 passed with no `GITHUB_EVENT_NAME` and 43 with `GITHUB_EVENT_NAME=pull_request`. The live corpus is unaffected — neither path is a link, and the sweep still exits 0 over 47 active and 167 archived packets. WHAT THIS COMMIT DELIBERATELY DOES NOT DO. It still reads the corpus from the WORKING TREE rather than from git tree entries: the corpus arm is defined over the tree this gate was given, which is what lets it read the working copy an author is editing, and changing that is a different reading of § 2.6 than slices 1 and 2 landed. It does not edit `scripts/proposal-support.py`, whose own corpus walk still follows links — named here and left to #1038. Refs #1003. Lane: openxfactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]>
There was a problem hiding this comment.
🔵 Needs a closer look
Six unresolved moderate findings remain in scripts/proposal-support.py.
Review details
Suppressed comments (6)
scripts/proposal-support.py:1070
standing_former_id_problemstreats any symlink that resolves to a directory as a standing packet, even when the target is outside the repository. A trackedopenspec/changes/<id>symlink is a non-directory entry in Git, so this can reject a valid move based on a packet the repository does not contain. Use the same containment-aware directory check as the other tree readers.
if standing.is_dir():
scripts/proposal-support.py:632
- When PyYAML is unavailable,
yamlisNoneand this branch returnsNoneeven if_text_atproved that the historical.openspec.yamlpath is present. That violates the function's documented “None only when absent” contract and lets append-only callers treat a declaration they could not parse as an empty/absent one; handle the missing parser as an error, as_load_origin_dispositionsdoes, instead of returningNone.
if text is None or yaml is None:
scripts/proposal-support.py:1538
- The exact archive arm accepts any directory whose name equals the identity, including
openspec/changes/archive/foo/. That is not a directory the pinned archiver can produce—archive_directory_nameonly emits a date-prefixed directory forfoo—so a malformed or stray archive entry can be treated as a valid baseline location. Restrict the exact arm to date-prefixed names while retaining exact matches for already date-prefixed identities.
if name != identity:
return False
scripts/proposal-support.py:1963
- This guard checks only
CHANGE_ID_RE, so the reservedarchivesegment is accepted as the current identity even thoughactive_change_dirandformer_id_problemsexplicitly reject it. A caller (or malformed tree) can therefore make the baseline walk treatopenspec/changes/archive/proposal.mdas an active packet, contradicting the reserved-identity contract. RejectRESERVED_CHANGE_IDhere before constructing the pathspecs.
if not CHANGE_ID_RE.fullmatch(change):
raise SupportError(f"invalid change name: {change}")
scripts/proposal-support.py:690
- This helper now preserves date-prefixed active IDs, but the archive-specific
verifypath still independently strips every archive directory prefix (verifyline 3720). After the pinned CLI archives2026-08-04-add-datedunder that unchanged name,verify(root, "2026-08-04-add-dated")derivesadd-datedand skips the archived packet entirely. Reuse the identity-aware archive naming rule in that filter and cover targeted verification of a preserved date-prefixed archive.
if directory.parent.name != RESERVED_CHANGE_ID:
return directory.name
return _ARCHIVE_DATE_RE.sub("", directory.name, count=1)
scripts/proposal-support.py:724
- This path-limited
git loguses Git's default history simplification, so it can omit a commit that created the full-name active packet on a merged side branch. In that casestdoutis empty and an archivedYYYY-MM-DD-iddirectory is incorrectly treated as unambiguous (stripped), allowing identity resolution to use the wrong baseline; use--full-historyhere asratifying_baseline()already does, and cover a merged-history case.
["git", "-C", str(root.resolve()), "log", "--format=%H", "-1", "--",
f"openspec/changes/{full}/proposal.md"],
capture_output=True, text=True, check=False,
- Files reviewed: 1/2 changed files
- Comments generated: 0 new
- Review effort level: Lite
Fix round 1, seventh bench round on PR #1038. Copilot's review at 14:24Z opened NO thread and listed six findings as "suppressed comments" — so a freeze that counted threads would have recorded zero unresolved and been true and useless. All six are real, all six are on this branch's own code, and all six are taken. **(1) `standing_former_id_problems` followed a symlink** (:1070). The containment guards added earlier in this round stop a foreign packet being BELIEVED; this arm REFUSES on what it finds, so following a link made it reject a LAWFUL move over a packet this repository does not contain. Now `contained_dir`, and a real standing packet is still refused. **(2) A missing YAML parser is not an absent declaration** (:632). `load_packet_at` returned None when `yaml is None` even for a path `_text_at` had just proved PRESENT — the documented "None only when absent" contract broken by the import rather than by the tree, and an empty established list handed to the append-only rule. It now refuses and says to install PyYAML; a genuinely absent path is still None, parser or no parser. **(3) The exact archive arm admitted a directory the archiver cannot produce** (:1538). `_archive_dir_carries` accepted any archive directory whose name equals the identity, `archive/foo/` included — but `archive_directory_name` emits `<date>-<id>` for every id that does not already carry a date, so that directory is not one the pinned CLI can write. The exact arm is now restricted to an identity that is itself dated, which is the single shape it exists for. **(4) The reserved segment was a change id the walk would resolve** (:1963). `ratifying_baseline` checked only `CHANGE_ID_RE`, which `archive` satisfies — so a caller, or a malformed tree, could make the walk resolve `openspec/changes/archive/proposal.md` as an active packet, contradicting the arm `active_change_dir` and `former_id_problems` both carry. Refused by name. **(5) `verify` kept a private copy of the date strip** (:690, at verify's archive filter). This round removed three copies of that `re.sub` and missed the fourth: after the pinned CLI archives `2026-08-04-add-dated` under that name unchanged, a bare strip derives `add-dated` and `verify(root, "2026-08-04-add-dated")` skips the archived packet altogether. It now filters with `names_this_change`, which reads both spellings and lets the ACTIVE ids settle the ambiguous one. **(6) The disambiguating probe was subject to history simplification** (:724). The `git log` that settles which of an archived directory's two identities it carries — landed one commit ago — used git's default simplification, which can omit the commit that created the full-name active packet on a merged side branch. An ambiguous name would then read as unambiguous and resolve to the wrong identity. `--full-history` now, the same flag and the same reason `ratifying_baseline` gives for its own walk. Two tests, both failing against `fac01b29`: `test_the_six_suppressed_findings_of_the_last_copilot_round` (`Lists differ: ["change-t: declares former id 'change-r'…"] != []`) carries (1), (3) and (4) as its own assertions, and `test_a_missing_yaml_parser_is_not_an_absent_ declaration` (`AssertionError: FormerIdError not raised`) carries (2). (5) and (6) are covered by the existing archive-verification and identity tests, and (5) is additionally proved by `proposal-support.py . verify add-declared-former-id` exiting 0 against the live corpus. tests/proposal-support: 197 passed before, 199 after, 290 subtests either way. tests/doc-health + pin_registrations + openspec_cli_pin + sequenced_after + carve_manifest + notebooklm: 2493 passed, 3 skipped, 30 subtests. `proposal-support.py . verify` exit 0, and `verify add-declared-former-id` exit 0; `validate-pin-registrations.py .` exit 0; `doc-health.py --single-repo .` byte-identical to the pre-fix-round run. Refs #1003. Lane: openxfactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]>
|
|
Lane: openxfactory-1 (openXfactory-1) FREEZE — fix round 1 completeHead Review threads — 20 total, 0 unresolvedEvery thread carries a reply naming the commit that took it and the Reviewer outcomes, verbatim
Check rollup at
|
| check | result |
|---|---|
lane-line |
SUCCESS |
openspec-cli-pin |
SUCCESS |
pytest-suite |
SUCCESS |
release-tag-gate |
SUCCESS |
signed-execution-chain-gate |
SUCCESS |
wallet-validation |
SUCCESS |
clearing-dispatch-gate |
SUCCESS |
merge-master-approval |
SUCCESS |
openreposhape-pin |
SUCCESS |
| SonarCloud Code Analysis | SUCCESS |
| Sourcery review | SKIPPED |
All six required checks green. mergeable: MERGEABLE.
closingIssuesReferences: [] — this pull request closes nothing by
keyword; #1003 is referenced and stays open, and the archive and the promotion
are separate acts.
Local validators at 256fe07a
| validator | result | exit |
|---|---|---|
python3 -m pytest tests/proposal-support -q |
199 passed, 290 subtests (176 at 5859f053) |
0 |
python3 -m pytest tests/doc-health tests/pin_registrations tests/openspec_cli_pin tests/sequenced_after tests/carve_manifest tests/notebooklm -q |
2493 passed, 3 skipped, 30 subtests | 0 |
python3 scripts/proposal-support.py . verify |
proposal support verification ok |
0 |
python3 scripts/proposal-support.py . verify add-declared-former-id |
proposal support verification ok |
0 |
python3 scripts/validate-pin-registrations.py . |
every in-tree path resolves |
0 |
python3 scripts/doc-health.py --single-repo . |
byte-identical to the pre-fix-round run | 0 |
What the round is about, in one line each
Nine commits, and the shape they share: every silence a gate reads is now two
facts, not one.
da9297e0— the undeclared-move probe's pairing and its source header both
fail closed. Measured: in a--filter=blob:noneclone the pairing read exits
128, and the walk took the RENAME COMMIT as the baseline while
origin_retention_errorsprintedORIGIN RETAINEDover a mutated origin.b90fc7f6— an id that begins with a date is not the archive's prefix.30d40c1c—archiveis a lawful slug and an unlawful identity.cce09fdd— a lineage only from a packet this repository contains, and only
one of them.018a65d3— one rule for where an identity can stand; five of that round's
eight findings were defects the previous round created.e6ff63fa— the two sets the containment guard left open.7568c9f1— a header that stands and does not parse is not an empty lineage.ef022a83— an unresolvable candidate commit is a read that failed (this
round's own[], argued for and wrong).fac01b29— an archived directory does not guess which of its two ids it
carries; history settles it, measured 0 of 167 ambiguous in this corpus.256fe07a— the six findings Copilot suppressed rather than posted.
Landing is the orchestrator's act on Brett Heap's word. This lane does not
merge, and has posted no LANDING.
|
Lane: openxfactory-1 (openXfactory-1) WORD 2026-09-14T21:09Z — Brett Heap, verbatim "land 1038 when green" (given first-hand in lane openxfactory-1's window). The landing word for this realization PR (slices 1–3 of |
|
Lane: openxfactory-1 (openXfactory-1) LANDING — lane openxfactory-1, session ea50c958-b384-4f43-b073-0540ec00231a@Eagle, 2026-09-14T21:09:24Z, PR #1038 into opensoft/openxFactory main Guard at 2026-09-14T21:09:28Z on head |
…tation call sites main 701c8fd (landed from PR #1038's fix round) narrowed change_id_of to strip the archive date prefix only where directory.parent.name is literally "archive" (RESERVED_CHANGE_ID) — fixing the defect Copilot raised against both PR #1038 and this PR (#1037): the old, unconditional strip mis-read an ACTIVE directory whose own id merely looks dated (this corpus's own `2026-08-04-add-dated`), stripping a slice of its real id. Both of this file's own call sites, and this suite's own corpus-sweep helper, called change_id_of on a bare leaf name read out of a citation string — Path(parts[3]) here, Path(n) in the test — with no real parent at all. Under the new contract that bare Path answers "not archived" and change_id_of hands the dated spelling back unchanged, so a citation to the archive's old date (or the test's own reconstruction of one) no longer matches the claim PacketIndex._build recorded under the stripped id, and two references that used to resolve now dangle: * test_an_archived_spelling_resolves_by_id_when_the_archive_date_moves * test_every_packet_in_this_corpus_resolves_to_exactly_itself Both call sites now prefix the leaf with the segment the citation was already read from (ARCHIVE_SEGMENT / "archive"), matching the contract PacketIndex._build already satisfies by passing a real directory whose parent truly is named archive. Both listed tests pass again; the full suite (tests/packet_reference tests/pin_registrations tests/proposal-support) is 291 passed, 290 subtests passed. Lane: openxfactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]>
…er than leave it stale test_a_symlink_is_refused_and_is_never_read_through asserted, as evidence for why this arm skips the ownership sweep on a symlink problem, that `support.former_identity_claimants(root)` still reads through the very link this arm had just refused — MEASURED at this branch's own head, and true there. It is no longer true against main: PR #1038 landed at `701c8fde` with the same containment guard (`contained_dir`/ `contained_file`) this arm carries, added to `former_identity_claimants` itself and therefore to `former_identity_ownership_problems`, which calls it. Re-measured post-merge: `former_identity_claimants(root)` on the test's own fixture now answers `{'change-a': [...]}`, never `change-from-outside`, so the assertion FAILED — not this arm's own behaviour drifting, a downstream fact this test cited going stale. The test now measures the current fact instead of the retired one. The skip itself is UNCHANGED and is kept on a narrower, still-true ground: this arm does not review `proposal-support.py`'s changes, so a refusal it has already reached should not start depending on staying in step with a containment guard a module it does not own happens to carry today. The module's two docstrings that named `tasks.md` § 3.4 as the still- future trigger for deleting `_identity_paths_at` are corrected the same way: § 3.4 HAS landed, but the swap it was waiting for is still not mechanical, and for a reason neither docstring anticipated. Main's `identity_paths_at` now fails closed through `_rows_or_refuse`, but that raises `OriginRetentionError` (a `SupportError`/`ValueError`, built for the archive gate's own four conditions) and never this module's `ArrivalCannotRun` (a `RuntimeError` this module owns so `validate-former-id-arrival.py` can catch exactly one exception for exit 2). Calling the shared reader directly here would let an unreadable read escape `except fia.ArrivalCannotRun` as an uncaught `OriginRetentionError` — the same "crash instead of refuse" shape this slice's own review round closed for `load_packet` (`d053b38e`), not a defect being introduced but one being correctly left unintroduced. `_identity_paths_at` stays; the swap is named as owed to whichever slice adds the adapter, not taken here. No behaviour of this gate changes. `python3 -m pytest tests/former_id_arrival -q` and the same with `GITHUB_EVENT_NAME=pull_request` both report 43 passed, 4 subtests passed — identical to this branch's pre-merge count. Lane: openxfactory-1 Co-Authored-By: Claude Sonnet 5 <[email protected]>
… opened
Un-drafting this PR triggered a seventh Copilot review and its first Codex
review, over the diff the merge-from-main left. Six findings, all TAKEN:
* The workflow's own anti-vacuity assertion required the corpus sweep's
ACTIVE count to be nonzero, so a corpus that has archived every packet
it ever held (`0 active and N archived` — a valid live state) would fail
a required check that actually read something. Now refuses only the one
shape that cannot be a real corpus: `0 active and 0 archived`.
* `former_id_problems` is asked about ONE identity, and the corpus arm
hands it only the commoner (stripped) reading of an archived directory.
A self-claim written under a DATED archive directory's OTHER (exact)
reading — `archive/2026-09-09-foo` declaring `former_ids:
[2026-09-09-foo]` — named an id neither `former_id_problems` compared
against nor the ownership sweep's self-claim skip caught (it skips under
the SAME other reading): the exact shape `packet_identities_of`'s own
docstring already names as a measured historical defect (`cce09fdd`),
closed there and, until now, not here. Measured against the parent:
`corpus_problems` returned `[]`; now one refusal, naming the reading.
* `declared_at` reads history through `support.git_show_text`, which
decodes with `errors="replace"` and never raises — unlike `load_packet`,
which decodes a manifest ON DISK strictly and only catches `YAMLError`,
so the corpus arm refuses non-UTF-8 bytes as "could not be read at all".
The range arm had no equivalent: a `�` a legitimate `.openspec.yaml`
has no reason to carry now refuses as CANNOT RUN instead of parsing a
lossy decode as a document the corpus arm would have refused outright.
* The CLI's own ratification-gap count read as a sentence fragment ("N of
a packet no identity of which has ever declared `Status: ratified`"),
naming neither what N counts nor what "a packet" refers to. Reworded to
name the count directly: "N packet-directory move(s) whose source
identity has never declared `Status: ratified`."
* `_identity_paths_at`'s archive loop asked only the STRIPPED reading of a
dated identity (`ARCHIVE_DIR_RE.match(name).group("id") == identity`),
though the module docstring already claimed "the two-candidate rule...
is reused" — it was not. `archive/2026-09-09-foo` is the archived `foo`
AND the archived `2026-09-09-foo` (`support._archive_dir_carries`'s own
docstring names why, from PR #1038's identical fix to the shared
reader), and asking only the first meant a ratification recorded for the
EXACT reading — including one recorded while already archived, which
this gate does not assume can't happen — resolved to "never ratified".
Fixed by calling `support._archive_dir_carries` itself, the predicate
PR #1038 already built and tested for this exact ambiguity, rather than
re-deriving a narrower version of it a second time. (Copilot, PR #1039.)
* The archive-relocation exception in `judge_commit` compared
`change_id_of_dir`'s STRIPPED reading of the destination against the
source's own UNSTRIPPED id, so a RATIFIED packet whose own id already
carries a date — archived UNCHANGED, per `archive_directory_name`'s own
rule — compared `example` against `2026-09-14-example`, never matched,
and had its perfectly ordinary archival refused as an undeclared rename:
the false-refusal shape a required gate with no bypass flag must never
take. Fixed the same way, by asking `support._archive_dir_carries`
whether the destination's bare name carries the source's id, under
either reading. Measured against the parent: refused; on this head,
excepted. (Codex P2 and Copilot, PR #1039.)
Four new tests, each measured against the parent to fail there and pass
here: `test_an_archived_self_claim_under_its_OTHER_reading_is_refused`,
`test_a_historical_manifest_with_invalid_utf8_is_refused_not_garbled`,
`test_a_dated_identitys_own_archival_is_excepted_too`, and
`test_ever_ratified_finds_the_EXACT_reading_of_a_dated_archived_id` (the
last calls `_identity_paths_at` directly, at a revision where the
identity stands ONLY in the archive, so the assertion is not masked by an
earlier commit's unaffected active-path reading).
`python3 -m pytest tests/former_id_arrival -q` and the same with
`GITHUB_EVENT_NAME=pull_request` both report 47 passed, 4 subtests
passed. `python3 -m pyflakes scripts/former_id_arrival.py
scripts/validate-former-id-arrival.py` is silent. The live corpus sweep
is unchanged (47 active, 167 archived, 0 problems): no packet in it
carries a dated id under either shape this round touches.
Lane: openxfactory-1
Co-Authored-By: Claude Sonnet 5 <[email protected]>
…ince amended Brett Heap ruled it, 2026-09-15T19:0xZ, by multiple choice in this lane's window, verbatim "Amend the row in #1041" (#1003 (comment)). Two claims in the `add-declared-former-id` OpenSpec Records row had been overtaken by the packet's own realization and are corrected where they stand, in the grammar the block already uses for a row amended by its own realization (`add-consent-custody-rederivation-record`, README:1564 — the superseded text is kept in place and dated rather than deleted). 1. The row quoted `docs/document-lifecycle.md`'s "Renaming a ratified change is therefore blocked until a change declares a FORMER ID (issue #833, a successor packet)" IN THE PRESENT TENSE, as what canon says. Slice 6 amends that sentence. The quote is kept and re-tensed — THEN STATED, "quoted here as the text that stood, not as the text that stands" — with a pointer to the amendment at the foot of the row. 2. The row said "`tasks.md` § 1 is ticked and §§ 2-7 stay open". That was true of the ratification and is false of the realization. It is re-tensed to the ratification it describes, and the amendment records what is true now: ratified 2026-09-13; realization slices 1-5 LANDED — PR #1038 → `701c8fde`, PR #1037 → `8f393758`, PR #1039 → `92d519b0` — and slice 6 is this pull request; § 4.5 (his operator act, re-measured live at 2026-09-15T19:41Z and still named by no branch ruleset) and § 7 (the archive and the promotion into `openspec/specs/release-realization/spec.md`) OUTSTANDING, the archive ruled admissible with § 4.5 open as a disposition plus a carry-forward issue. Thirty-one of thirty-nine boxes ticked, eight open. No other row moves and no numeral elsewhere in the block moves: this amendment neither archives nor un-archives anything, so the Active and Archived enumerations are exactly as `8944758c` left them. Refs #1003. Lane: openxfactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]>



Lane: openxfactory-1 (openXfactory-1)
Claim: #1003 (comment)
What this realizes
add-declared-former-idwas ratified 2026-09-13T22:48Z by Brett Heap,verbatim "ratify 1028 as encoded" — a multiple-choice ruling taking the
recommendation on all five decisions D1–D5, so the delta's wording stands
unchanged and nothing was substituted, restored or deleted. The record is
openspec/changes/add-declared-former-id/review/ratification-2026-09-13.md;the packet landed as PR #1028 → merge
28ad27af(encode commit2c75d82a).code_surface: openxFactoryis non-empty, so the Realization archive gateholds the archive behind merged-plus-green evidence. This is the first of the
realization pull requests: slices 1–3 of
design.mdD7's six.The three slices, and the scenarios each realizes
Slice 1 — the declaration and its reader (
59232b37, +369/−2 script,+353 tests;
tasks.md§§ 2.1, 2.2, 2.3, 2.5, 2.6).CHANGE_ID_REhoisted tomodule scope,
FormerIdError,former_id_problems(the six shape refusals),declared_former_ids/declared_former_ids_of,load_packet_at,append_only_problems,former_identity_claimants/former_identity_ownership_problems,standing_former_id_problems. Over ADDEDA moved packet declares the identity it was ratified under:
It includes two sweeps over this repository's own 47 active and 191 archived
packets.
Slice 2 — the archive gate (
2a9cfbda, +394/−78 script, +343/−31 tests;tasks.md§§ 3.1, 3.1a, 3.2, 3.3)._tree_rows(thels-treeread thatseparates ABSENT from UNREADABLE),
identity_paths_at/proposal_path_at(the two-candidate rule, a LIST,
origin-retention-identity-ambiguousovermore than one),
packet_yaml_of/packet_yaml_at,_identity_pathspecs,declared_former_ids_in_tree,ratifying_baseline(ONE--full-history --topo-order --reversewalk over the UNION of the identities'pathspecs, EARLIEST wins, no dates compared),
_refuse_an_undeclared_move,ratifying_committhinned to a wrapper,origin_retention_errorsreading thebaseline under the baseline IDENTITY. Over MODIFIED Origin retention at
archive:
and over ADDED A moved packet declares the identity it was ratified under:
The MODIFIED requirement's three carried-over scenarios — A staged-origin
change archives, An ad-hoc change without a support bundle archives, An
origin was mutated after ratification — are verbatim from canon and stay green
on their existing fixtures.
Slice 3 — the fail-closed reads (this session, +171/−19 script, +334 tests;
tasks.md§ 3.4). Over MODIFIED Origin retention at archive:Slice 2 landed the probe and left its callers reading a
Noneas "no row" —its docstring said so and named this slice. This changes callers, not probes:
_unreadable_read_refusal(one refusal,origin-retention-read-unavailable,CANNOT RUN, naming the git command that failed and the identity it was for, no
bypass flag),
_rows_or_refuse,_text_at_a_present_path,_text_at, and thefour reads behind a baseline — the commit enumeration, the per-commit archive
listing, each identity's presence probe, each blob — now each fail closed in
identity_paths_at,ratifying_baselineandorigin_retention_errors.The defect it closes, measured against slice 2's tip
2a9cfbdarather thanargued. One fixture packet, ratified under
change-r, origin mutatedafterwards:
origin_retention_errors--filter=blob:none, promisor cutORIGIN RETENTION NOT COMPARABLE change-r: the packet at the ratifying commit 4dc042695739 declares no origin (pre-contract packet)→[]The same history, ARCHIVED GREEN over a mutated origin, because the
.openspec.yamlat the ratifying commit could not be read andgit show'ssilence was read as "declares no origin".
design.mdM1 measured on git 2.43.0that
git ls-treeprints the row and exits 0 in that checkout whilegit showexits 128 — the same 128 a genuinely absent path answers with. Both fixtures
(
--filter=blob:nonefor the unreadable blob,--filter=tree:0 --no-checkoutfor the unreadable tree read and the unreadable
git logenumeration) arehermetic, need no network,
skipTestwhere the git in hand ignores the filter,and prove the probe really fails before anything is asserted about the code.
partial_checkoutis lifted from PR #1024's retained branch2bc60386, whichtasks.md§ 3.4 names as a candidate to lift.The #1027 fixture — asked, done, and why the second half is owed elsewhere
PR #1027 (
d6e5969e, already onmain) pinned the multi-hop gap astest_an_unratifying_rename_chain_escapes_the_guard_a_stated_gap. The houseconvention for closing such a pin is PR #999's, stated in
2dd54b8e's ownmessage: repurpose the fixture into a refusal and rename it. Slice 2 SPLIT
it, and flipped the DECLARED half:
test_a_declared_rename_chain_is_baselined_at_the_first_ratification— thesame
ratify r → rename+un-ratify r→s → rename s→t while draft → ratify tchain with every hop DECLARING:
ratifying_commitnow returns the FIRSTratification where the old fixture asserted the last,
ratifying_baseline(…)[1] == "change-r", and the mutation is reported "under the declared formeridentity change-r". That is the flip.
test_an_undeclared_rename_chain_is_the_landing_validators_to_refuse— thesame history declaring nothing, same answer as before, renamed to say who owns
the refusal.
The undeclared chain is NOT flipped to a refusal here, deliberately and on
three packet-grounded citations:
tasks.md§ 3.2 ("LEAVE THE UNDECLAREDREFUSAL EXACTLY WHERE IT IS"); the ADDED requirement An undeclared rename
arrival is refused at its landing, which puts that refusal at the LANDING and
whose D3 option (b) — putting it in the archive gate — was considered and
rejected; and mechanically, with nothing declared nothing in history connects
change-ttochange-r, so the path-limitedgit logforchange-tnevervisits the
r→scommit. Flipping it insideratifying_commitwould need therename-lineage walk the commissioning ruling declined by name ("history-walking
archaeology that cannot carry the intent bit"). The flip's second half is
owed to slice 4, where that fixture gains its refusal from the landing
validator over the same tree and takes the house-convention name
test_an_undeclared_rename_chain_now_refuses_at_its_landing.ratifying_commit's docstring already names the renamed fixture and says theclosure is at the landing.
Figures
tests/proposal-supportonmain2a9cfbda)2a9cfbdapython3 scripts/proposal-support.py . verifyproposal support verification ok, exit 0python3 scripts/validate-pin-registrations.py .every in-tree path resolves;2 pin registration(s) cohere, exit 0The one slice-3 test that passes before AND after is
test_a_genuinely_absent_path_is_still_read_as_absent— the regression pin onthe other half of the requirement: a read that CAN be performed and finds
nothing must still answer "nothing", or the gate refuses over every packet that
ever moved. The sixth test,
test_an_unreadable_commit_enumeration_is_not_an_unratified_packet, is beyondthe five the slice brief names, because § 3.4's fourth clause commissions that
behaviour by hand.
OPENSPEC_TELEMETRY=0 openspec validate --all --strictreports the SAME twopre-existing failures as
origin/main(change/add-chain-attestation,change/add-composed-view-authoring) and no third.What is NOT in this pull request
openspec/changes/file is touched, and no README OpenSpec Records row—
git diff --stat origin/main...HEAD -- openspec/is empty. Rule 6'slanding window therefore does not apply to this PR. The
tasks.mdticksare slice 6's: a tick is a claim about what landed and cannot be written
before the thing lands.
tasks.md§ 2.4 and § 4): the whole ofADDED An undeclared rename arrival is refused at its landing (ten
scenarios, The pairing read cannot be performed and The ratification lookup
cannot be performed among them), plus A former id is appended by a commit
that moves nothing, which reads a commit range.
resolves by identity, not by path, six scenarios, and its named consumer in
scripts/validate-pin-registrations.py.no author's — adding the
former-id-arrival-gatecontext to anopensoftorganization ruleset targeting
openxFactory/~DEFAULT_BRANCH, and closingit on a live read of
GET /orgs/opensoft/rulesets/<id>plusGET /repos/opensoft/openxFactory/rules/branches/mainAND a canary pullrequest going red and BLOCKED — never on the merged workflow file. Whether
§ 4.5 means a new required context at all, or whether the validator may ride
the already-required
pytest-suite, is an open decision for Brett Heap.separate words. The #849 range guard follows one rename hop only: a rename chain (ratify → rename+un-ratify → rename while draft → ratify) is accepted (routed from #999 Copilot review) #1003 stays open.
scripts/sequenced_after.py's collapsing probes: the requirement forbidsREUSING them for this read and does not ask for them to be repaired.
Landing is not this lane's act. This PR merges on Brett Heap's word.
Fix round 1
Nine findings across two reviewers and two pull requests, all nine TAKEN,
none refused. Four commits on top of
5859f053. Every claim was measured on afixture before it was taken, and every fix carries a test that FAILS against
the head it was raised on.
The four findings marked (via #1037) were raised on the stacked PR
#1037 against
scripts/proposal-support.py, which is this branch's slice 1–2 work — so theyare fixed here and #1037 inherits them on its next merge of this branch. All
four are replied to and resolved there.
PRRT_kwDOTAvnrs6iElb0:1541 — refuse when the undeclared-move probe is unreadableda9297e0PRRT_kwDOTAvnrs6iEma3:1516 — the baseline walk'sratified_under_a_former_pathtreats an unreadable source blob as "not ratified"da9297e0PRRT_kwDOTAvnrs6iElb4:1310 — preserve date-prefixed identities during archive lookupb90fc7f6PRRT_kwDOTAvnrs6iEmbV:554 —change_id_ofstripsYYYY-MM-DD-from every directory, live ones includedb90fc7f6PRRT_kwDOTAvnrs6iEmbp:1311 — the resolver always readsarchive/<date>-<id>as<id>b90fc7f6PRRT_kwDOTAvnrs6iEemp:554 — same as 4 (via #1037)b90fc7f6PRRT_kwDOTAvnrs6iEenD:614 —former_ids: [archive]passesCHANGE_ID_REthoughactive_change_dirreserves the literal (via #1037)30d40c1cPRRT_kwDOTAvnrs6iGr_N:734 —is_dir()/iterdir()follow symlinks without a containment check (via #1037)cce09fddPRRT_kwDOTAvnrs6iGr_s:1293 — the lineage lookup silently takes the first of two candidates (via #1037)cce09fddda9297e0— the undeclared-move probe's two reads fail closedSlice 3 closed every read the baseline walk takes and left the refusal that
GUARDS the walk reading its own two silences flat. Measured end to end on git
2.43.0, on a fixture where
change-ris ratified, its origin mutated, thenrenamed to
change-sby a commit that also rewrites one line of prose:5859f053git log --follow …ratifying_commitorigin-retention-path-movedorigin_retention_errors[]—ORIGIN RETAINED change-sThe mutated origin archived GREEN: the #833 failure reached through a partial
clone instead of through a rename.
_pairing_rowsnow separates "git pairednothing" from "the read could not be performed" the way
_tree_rowsalreadydoes,
_pairing_or_refuseis the one door the second leaves by, and the sourcepacket's header at
revision^goes through_text_atso presence comes offthe tree first. On a real partial checkout the second read is unreachable — a
pairing computable without content is an EXACT one, whose source blob at the
parent is the same object as the destination blob at the commit — and the test
says so rather than pretending otherwise, composing two measured values the way
test_an_unreadable_archive_listing_refuses_cannot_runalready does.b90fc7f6— an id that begins with a date is not the archive's prefixThe rule was already written down in this file:
archive_directory_namestatesthe pinned CLI's own behaviour (an id already carrying
YYYY-MM-DD-isarchived under that id UNCHANGED) and
names_this_changestates that the tworeadings of such a directory name "are indistinguishable from the name". The
identity readers took one of them, unconditionally, and for LIVE directories
where there is no ambiguity at all. Measured at
5859f053:Four readers fixed —
change_id_of, the new_archive_dir_carriesbehindidentity_paths_at,_change_ids_of_proposal_path(now a list), anddeclared_former_ids_in_treevianames_this_change. The third measurement isthe quietest and the worst: a declaring packet handed the UNDECLARED answer,
which is the shed-lineage failure arriving through the reader. Admitting both
readings also makes the ratified scenario A declared identity resolves to two
locations at one commit reachable for a dated id, and it refuses there.
30d40c1c—archiveis a lawful slug and an unlawful identityformer_id_problems("x", {"former_ids": ["archive"]})returned[]whileactive_change_dirrefuses the literal andidentity_paths_atanswers[]—a declared lineage the reader indexed and every resolution answers with
silence.
RESERVED_CHANGE_IDis hoisted besideCHANGE_ID_RE, one spelling,and
former_id_problemsgains a seventh arm.cce09fdd— a lineage only from a packet this repository contains, and only oneA committed symlink is
active_change_dir's own traversal reached from thetree instead of from the caller; git carries one at mode
120000. Withopenspec/changes/archivecommitted as a symlink outside the checkout thesweep claimed
'stolen-identity'from an.openspec.yamlnobody here wrote,and
declared_former_ids_in_treereturned that outside packet's list as thiscorpus's lineage.
contained_dirnow guards both readers. Separately, where anidentity holds a packet BOTH actively and in the archive, the lineage was the
first candidate's — chosen by the reader's ordering rather than by an author —
and now refuses
origin-retention-identity-ambiguousnaming both. Neitherrefusal fires on the corpus: 47 active ids, 167 archived directories, no
overlap, and zero tracked symlinks anywhere in the repository.
Second bench round — eight more threads, all eight TAKEN
Posted on
cce09fdd. Five of the eight are defects the first round createdor half-closed, which is the reason a second round is bench and not ceremony.
Fixed in
018a65d3.PRRT_kwDOTAvnrs6iG9tt—_identity_pathspecscannot reach the exact archive pathPRRT_kwDOTAvnrs6iG9vA— the accept channel authorises itself over an unread ratificationPRRT_kwDOTAvnrs6iG9vt— the sweep's archived self-claimPRRT_kwDOTAvnrs6iG9wN—ratifying_commit's retained paragraphs are now falsePRRT_kwDOTAvnrs6iHNFa— a contained directory can carry an uncontained.openspec.yamlPRRT_kwDOTAvnrs6iHNGM— the gate's lineage bypasses the two-candidate rulePRRT_kwDOTAvnrs6iHS5E— the archive wrapper's collision heuristic suppresses a lineagePRRT_kwDOTAvnrs6iHS5I— same as 12, from the other side10 — round one taught
_archive_dir_carriesthatarchive/<id>is alocation a preserved dated id occupies and left the commit ENUMERATION on the
glob
*-<identity>, which cannot match<identity>:ratifying_commitreturned None for a packet standing ratified at
openspec/changes/archive/2026-09-09-foo/proposal.md, whileidentity_paths_atresolved it. The two halves of one resolution disagreeing.11 —
_origin_mapping(None)is None and_changed_keys(None, …)is[],so an
acceptentry declaringchanged_keys: []compared EQUAL to ameasurement taken over a declaration that was never read: the acceptance
authorised and the baseline moved, on a checkout that could not read the
ratification. Both reads now go through
_text_at.12 / 17 — round one named this as a residue in a docstring; two reviewers
measured it.
archive/2026-09-09-foodeclaringformer_ids: [2026-09-09-foo]— a claim to be the move of itself — validated as
fooand was indexed.packet_identities_ofreturns both readings and the sweep refuses adeclaration naming either.
14 — round one guarded packet DIRECTORIES;
load_packetopens the headerthrough
is_file(), which follows a symlink. With.openspec.yamlcommittedas a symlink (mode
120000) the sweep imported'stolen-by-header'.16 —
names_this_change'sother_change_idsarm answers a TRANSIENTquestion and suppressed a legitimate match: with archived
fooatarchive/2026-09-09-fooand an unrelated live2026-09-09-foo,declared_former_ids_in_tree(root, "foo")returned[]. The repair is ONErule —
declared_former_ids_in_treenow resolves with_archive_dir_carries— and the live-ids reading moves to the arm it belongs on: a LIVE change has
not been archived, so the EXACT reading yields to a live id of that name and
the STRIPPED reading never does. Dropping it altogether was the first attempt
and this round's own test rejected it, as a lawful corpus then read as one
identity in two places.
13 and 15 are stated without overclaim. 13 is documentation only, no
test. For 15 the fixture built for it ALREADY refused at
cce09fdd, throughproposal_path_atat the commit the walk visits — the committed tree happeningto agree with the working one; the fix is taken because the refusal should not
depend on that coincidence. The accept-channel test for 11 was VACUOUS when
written through
origin_retention_errors(slice 3's baseline door raises on thesame read first) and now drives
_accept_declaration_problemsdirectly — foundby running it against the pre-fix head and watching it pass.
Third bench round — two threads, both TAKEN
Posted on
018a65d3. Both are defects the SECOND round created. Fixed ine6ff63fa.PRRT_kwDOTAvnrs6iHw_y— the append-only parent read conflates absent with unreadablePRRT_kwDOTAvnrs6iHxAo—change_dir_namesfollows symlinks, so the live set walks around the containment guard19 — round two moved the live-ids reading onto
_archive_dir_carries'sEXACT arm, where an entry in the live set does not merely add a name, it
SUPPRESSES one — and left the set read from
change_dir_names, one line abovethe containment guard that same round added. Measured at
018a65d3, withopenspec/changes/2026-09-09-fooan out-of-tree symlink and the packetstanding at
archive/2026-09-09-foo:declared_former_ids_in_tree(root, "2026-09-09-foo")returned[]where without the link it returns['old-foo']— an empty lineage sending the gate through the UNDECLAREDbaseline, reached by adding a link that resolves nowhere this repository owns.
contained_change_dir_namesis the resolver's set;change_dir_namesis leftalone, because the archive wrapper's reading of the operator's tree is a
different question and its answer is compared against names the pinned CLI
wrote.
18 —
load_packet_atis the tree-side reader the append-only comparisonrests on, and it read through a bare
git_show_text, whose None is a genuinelyabsent path and any failed git read alike. Measured:
append_only_problems("change-t", [], ["a"])is[]whileappend_only_problems("change-t", ["a", "b"], ["a"])refuses the removal — soa declaration DELETED or REORDERED is accepted whenever the established list
could not be read, the shed-lineage failure with the CHECKOUT doing the
shedding. It now reads through
_text_at. This reader has no consumer yet (thelanding validator is a later slice), which is exactly why the conflation
survived three rounds.
Fourth bench round — one thread, TAKEN
Posted on
e6ff63fa; fixed in7568c9f1.PRRT_kwDOTAvnrs6iIM9m— a present-but-unparseable declaration still reads as an empty oneThe third silence in the same family: round three taught
load_packet_attotell ABSENT from UNREADABLE and left PRESENT-BUT-UNPARSEABLE answering None
beside them. Measured at
e6ff63faover a packet whose.openspec.yamlis- not\n- a mapping,declared_former_ids_ofreturned[]andload_packet_atreturned None — the value a genuinely absent packet answerswith. Two fail-opens:
ratifying_baselinegets the UNDECLARED answer for apacket nobody could read, and
append_only_problemsgets an empty ESTABLISHEDlist to accept a removal against.
Both parse arms now refuse, as
FormerIdError— the class this file alreadyreserves for a declaration that cannot be read as one, which the ownership
sweep steps over by design and every gate caller propagates.
load_packetitself is unchanged: it is the general working-tree reader, and the guard
belongs to the reader that knows a broken declaration is not an empty one. The
four further locations the thread lists are not parse arms at this head; the
two that are, are both taken.
Fifth bench round — two threads, both TAKEN
Posted on
7568c9f1; fixed inef022a83. Both are this fix round's own work.PRRT_kwDOTAvnrs6iIy3N—_pairing_rowsturns a failedrev-parseinto[]PRRT_kwDOTAvnrs6iIy43—load_packet_at's summary line still promises the conflation21 — when
_pairing_rowswas split out ofrenamed_from, its docstringargued that a revision resolving to nothing answers
[]rather than Nonebecause "a question about a commit that is not there is not a read that
failed". True of a MISSPELLED revision, false of the shape that matters: the
only caller passes a full hash out of this repository's own
git log, so afailing
rev-parseon it means the object cannot be read — and[]reached_pairing_or_refuseas a successful read with no pairing, the same fail-openthat commit closed two lines below. Both of the probe's git calls now leave by
one door;
renamed_from, the tolerant door, still answers None for anunresolvable spelling.
22 — the previous round taught
load_packet_at's body to raise and leftits first line saying "None when absent or unparseable". A caller who reads
that line writes the conflation back by hand. The summary now reserves None for
a genuinely absent path and names both exceptions against the silence each
answers.
Sixth bench round — one thread, TAKEN
Posted on
ef022a83; fixed infac01b29.PRRT_kwDOTAvnrs6iJHKd— an archived directory's default identity is an unchecked stripThe archive gate's replay reads an ARCHIVED directory, and its default
identity was the date strip — spelled twice before this fix round, once after,
and wrong either way for a preserved dated id. For
archive/2026-09-09-foothestripped reading
fooomitsopenspec/changes/2026-09-09-foo/from thebaseline walk entirely, so the later ARCHIVE commit can become the baseline and
a mutation made before archiving passes — the #833 failure reached through the
identity rather than through a rename.
identity_of_packet_dirresolves it from HISTORY rather than from preference:the two readings differ in exactly one fact, whether an ACTIVE packet by the
directory's FULL name ever existed, which is one path-limited
git log. Whereit has no history the stripped reading is the only packet the name can be
about; where it does, both readings name a packet this repository really
carried and the resolver REFUSES, naming both and asking for an explicit id. A
git logthat could not be performed refuses too. Measured over this corpus:of 167 archived directories, ZERO have a full name that ever stood as
an active packet, and the archive wrapper — the only production caller — passes
changeexplicitly.Seventh bench round — six SUPPRESSED findings, all six TAKEN
Copilot's review at 14:24Z opened no thread and listed six findings as
"suppressed comments". A freeze that counted threads would have recorded zero
unresolved and been true and useless, so they are taken here in
256fe07a.:1070—standing_former_id_problemsfollows a symlink, so a link pointing outside can REJECT a lawful move:632— with PyYAML unavailable,load_packet_atreturns None for a path proved PRESENT:1538— the exact archive arm admitsarchive/foo/, a directory the pinned archiver cannot produce:1963—ratifying_baselineaccepts the reservedarchiveas an identity:690—verifykeeps a private fourth copy of the date strip:724— the identity-disambiguatinggit logis subject to history simplification24 is the mirror of the containment work earlier in this round: those
guards stop a foreign packet being BELIEVED, and this arm REFUSES on what it
finds, so following a link made it reject a lawful move over a packet this
repository does not contain. 25 is the "None only when absent" contract
broken by the import rather than by the tree. 26 narrows the exact arm to
the single shape it exists for — an identity that already carries a date.
27 is the reserved-segment arm
active_change_dirandformer_id_problemsboth carry, missing from the walk. 28 is the fourth copy of the strip,
after three were removed earlier in this round: after the CLI archives
2026-08-04-add-datedunder that name unchanged, a bare strip madeverify(root, "2026-08-04-add-dated")skip the archived packet altogether.29 matters most, because the probe it corrects landed one commit earlier:
git's default simplification can omit the commit that created the full-name
active packet on a merged side branch, so an ambiguous archive name would read
as unambiguous and resolve to the wrong identity.
--full-historynow, thesame flag and the same reason
ratifying_baselinegives for its own walk.Validators at
256fe07apython3 -m pytest tests/proposal-support -q5859f053)python3 -m pytest tests/doc-health tests/pin_registrations tests/openspec_cli_pin tests/sequenced_after tests/carve_manifest tests/notebooklm -qpython3 scripts/proposal-support.py . verifyproposal support verification okpython3 scripts/proposal-support.py . verify add-declared-former-idproposal support verification okpython3 scripts/validate-pin-registrations.py .every in-tree path resolvespython3 scripts/doc-health.py --single-repo .Twenty-nine findings, twenty-nine taken, none refused. Twenty-three tests
added, every one failing against the head its finding was raised on.
(Correction to the round-4 and round-6 validator tables above: their
"2493 passed" row named
tests/proposal-supportin the command, and the run itreports did not include that directory. The two figures are the ones in this
table, measured separately.)
refs #1003
🤖 Generated with Claude Code
Summary by Sourcery
Make origin-retention validation identity-aware by honoring declared former IDs and refusing to proceed when required history reads cannot be completed.
New Features:
former_idsdeclarations, including lineage shape, append-only history, standing identities, and ownership checks.Bug Fixes:
Enhancements:
Tests: