Repository navigation
Conversation
#849 widened the walk to ask every commit it VISITS whether that commit moved an already-ratified packet, but the enumeration underneath is a path-limited `git log` for the name the tree spells today, and a path-limited `git log` follows no rename. So the closure reached exactly one hop. Put a lawful draft rename between the move and the current name — `ratify r → rename+un-ratify r→s → rename s→t while draft → ratify t` — and the walk for `t` begins at the `s→t` hop, whose former blob is a draft and refuses nothing; the `r→s` hop that moved the ratified packet is never enumerated, and the later re-ratification is taken as the baseline, waving through every origin mutation made in between. That is #833's failure and #849's, reached by one hop more than either closed, and it is the reproduction filed in #1003 off PR #999's review bench. The hops are now followed backwards through `renamed_from` — the `--follow` pairing no git config can switch off — rather than by making the enumeration `--follow`, which walks the simplified history of one path and would have traded away the `--full-history` property the walk depends on. Each earlier name is enumerated the same way the current one is, predecessors are asked FIRST so a refusal names the earliest hop that moved a ratified packet, and the question asked at each commit is unchanged: `kinds="RC"` where the blob is ratified, `kinds="R"` where it is not. RENAMES ONLY, never copies, which is the line #999 drew for the same reason — following a copy backwards would walk into the source packet's history and refuse a lawful fork-by-copy on a gate with no bypass flag (#690). The baseline still comes from the current name alone: a ratification found under a former name is a refusal, never a commit to re-base onto, because nothing in this corpus declares a former id (#833). Realization of the promoted requirement, not an extension of it: `release-realization` § "Origin retention at archive" compares against "the declaration present at ratification" and names no rename, former path or hop count, and the ratified realization record (`docs/document-lifecycle.md`, Status: standard) already states the rule with no hop count — "Renaming a ratified change is therefore blocked until a change declares a FORMER ID". So this is code and fixtures, as #695, #846 and #999 each were, and no OpenSpec packet. Measured. `pytest tests/proposal-support -q`: 135 passed, 70 subtests (129 before, +6, no new skips). Over the whole corpus — 210 active plus archived packets, the pre-fix and post-fix modules loaded side by side — 0 refusals before, 0 refusals after, 0 baselines moved, 147 resolving to a commit and 63 reading "not ratified" either way; 0.31s → 0.43s per packet for a gate that runs once per archive. An un-ratification that lands in its OWN commit BEFORE the rename is NOT closed here: every hop then moves a draft, whether a re-ratification after a return to draft is lawfully a new baseline is a governance question rather than an author's, and today's answer is pinned by a fixture rather than changed. 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 1 day and 15 hours by commenting @sourcery-ai review. Upgrade to get a review now.
Reviewer's GuideFixes origin-retention validation so it follows and checks every rename hop back to the packet’s ratified identity, without following copies or changing baseline semantics; comprehensive fixtures cover regressions, lawful draft/copy cases, and the explicitly deferred scenario. Sequence diagram for whole rename lineage origin-retention validationsequenceDiagram
participant Gate as Archive gate
participant RC as ratifying_commit
participant History as _commits_touching
participant Lineage as _predecessor_history
participant Rename as renamed_from
participant Refusal as _refuse_if_moved
Gate->>RC: ratifying_commit(root, change)
RC->>History: _commits_touching(current_path)
loop Each current-name commit
RC->>Lineage: _predecessor_history(current_path, revision)
Lineage->>Rename: renamed_from(revision, path, kinds=R)
alt Earlier rename exists
Lineage->>History: _commits_touching(former_path, revision^)
loop Earlier-name commits
Lineage->>Lineage: _predecessor_history(former_path, earlier)
Lineage->>Refusal: _refuse_if_moved(earlier_path, earlier)
Refusal-->>Lineage: Continue or raise refusal
end
end
RC->>Refusal: _refuse_if_moved(current_path, revision)
Refusal-->>RC: Ratified baseline or refusal
end
RC-->>Gate: Ratifying commit or OriginRetentionError
Flow diagram for rename-lineage origin-retention decisionsflowchart TD
A[Start with current packet path] --> B[_commits_touching current path]
B --> C[_predecessor_history follows renamed_from]
C --> D{Former path via rename?}
D -- No --> E[_refuse_if_moved current commit]
D -- Yes --> F{Copy or rename?}
F -- Copy --> G[Do not follow copy]
F -- Rename --> H[_commits_touching former path before rename]
H --> I[Check predecessor commits first]
I --> J{Ratified packet moved?}
J -- Yes --> K[Raise OriginRetentionError at earliest hop]
J -- No --> L[Continue lineage checks]
L --> E
G --> E
E --> M{Current commit ratified?}
M -- Yes --> N[Use current-name commit as baseline]
M -- No --> O[Continue current-name history]
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
@codex review |
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved history-failure, lineage-limit, merge-parent, and boundary-test issues remain.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Extends archive origin-retention checks across multi-hop packet rename histories.
Changes:
- Adds rename-lineage traversal and centralized refusal handling.
- Preserves draft-rename and copy-fork behavior.
- Adds regression fixtures for rename chains and edge cases.
File summaries
| File | Summary |
|---|---|
tests/proposal-support/test_proposal_support.py |
Adds multi-hop rename, draft, copy, and stated-gap regression coverage. |
scripts/proposal-support.py |
Implements lineage traversal. Unresolved findings: one critical issue (2 votes) for masking Git failures, and three moderate issues (1, 2, and 1 votes) concerning the 64-hop cap, merge-parent handling, and missing boundary coverage. |
Review details
Suppressed comments (2)
scripts/proposal-support.py:970
- This hard cap rejects a packet after 64 rename hops before checking whether any hop moved a ratified packet. A packet that remained draft through 65 ordinary renames and was ratified only at the end would therefore be refused even though the documented archive contract says draft renames are unaffected, and this gate has no bypass. Traverse the finite Git lineage without an arbitrary false-refusal cap, or explicitly establish a governed limit and its archive behavior.
if hops >= _LINEAGE_HOP_LIMIT:
raise OriginRetentionError(
f"REFUSE origin-retention-path-moved: {change}: the "
f"origin-retention walk CANNOT RUN. Following this packet's "
f"rename lineage back from `{rel}` passed "
scripts/proposal-support.py:976
- The new
_LINEAGE_HOP_LIMITfail-closed path is not covered by the added fixtures. A 65-hop rename history should raiseOriginRetentionError; without a boundary test, an off-by-one inhopsor a regression inseencould recurse or pass while the suite remains green. Add a generated over-limit fixture and assert the refusal is surfaced by the archive gate.
if hops >= _LINEAGE_HOP_LIMIT:
raise OriginRetentionError(
f"REFUSE origin-retention-path-moved: {change}: the "
f"origin-retention walk CANNOT RUN. Following this packet's "
f"rename lineage back from `{rel}` passed "
f"{_LINEAGE_HOP_LIMIT} hops without reaching a name that was "
f"never renamed into — `{path}` came in from `{former}` at "
f"{revision[:12]} — which nothing in this corpus does, so the "
f"walk stops rather than following a lineage it cannot bound. "
f"The baseline was never established, and a check that cannot "
f"run must not pass (issue #1003).")
- Files reviewed: 2/2 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 50bc03a92d
ℹ️ 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".
All three are about what the new walk does BESIDES closing the chain, and all three are taken rather than argued. A PATH IS NOT AN IDENTITY (Codex P2). Reading the whole history of an intermediate name drags a previous occupant's hops into this packet's lineage: an old ratified `r` renamed to `s`, `s` renamed onward, the name later taken by a new draft that is renamed to `t` and ratified, and the walk refused `t` for somebody else's move — permanently, this gate having no bypass flag. `_incarnation` now trims a predecessor's history to the incarnation the hop actually renamed away, reading newest first and stopping at the commit where the name stood in no parent. Trimming loses no hop: git pairs a rename when the destination is ADDED, so only that commit can carry a predecessor at all. A FAILED `git log` IS NOT AN EMPTY HISTORY (Copilot). `_commits_touching` now answers None where git declined to answer and `[]` only where git said there is nothing, and the lineage refuses CANNOT RUN on None — `origin-retention-history-unreadable` — rather than reading silence as "there is nothing earlier here". The current name's own enumeration keeps the behaviour it always had, which is itself a refusal: measured on a repository with a hop's parent commit object deleted, the gate answers `not ratified` and the archive stops. THE PREDECESSOR BOUND IS EVERY PARENT, not `<hop>^` (Copilot). Measured first, because the shape matters more than the fear: git reports no rename pairing AT a merge commit — `git log --follow -1 <merge> -- <path>` answers with the branch's own rename commit, and `renamed_from` accepts a pairing only where git's `%H` is the revision asked about — so the merged rename is asked about at the branch commit that made it, where the parent read is exact, and the walk already refused that shape. A fixture now pins it. `_parents` is used anyway because it is the honest shape of the question. AND THE DEPTH CAP IS GONE (Copilot, suppressed). "Renaming a DRAFT change is unaffected" carries no number, so the walk carries none: it is iterative rather than recursive, bounded by the history itself, and a packet renamed seventy times while draft archives on the ratification it finally got. The lineage is also LAZY now, so the ordinary packet's early return costs what it always did: `tests/proposal-support` went 98s → 73s on the same machine, against 41s before the lineage existed, with the corpus sweep fixture the bulk of it either way. Four fixtures, three of them red against this branch's own previous commit: the reused intermediate name, the unreadable lineage, the seventy-hop draft chain (the merge one passes there too, which is the point — it pins a measurement rather than repairing a defect). `pytest tests/proposal-support -q`: 139 passed, 70 subtests. Corpus sweep over 210 active plus archived packets, pre-fix module beside post-fix: 0 refusals either way, 0 baselines moved, 63.3s → 74.9s for the whole corpus. refs #1003 Lane: openxfactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]>
No conflict: main's landings since 3cf8b0b touch the openDox/openXdox pin lockstep, the engineering profile's display facet and the code-surface gate packet, none of which this branch reads. refs #1003 Lane: openxfactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
Resolve the documented depth-limit inconsistency and ensure unreadable history and reused-path incarnations fail closed.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (1)
scripts/proposal-support.py:1066
- Only predecessor segments are trimmed; the current-name segment still includes every historical incarnation of that path. If a ratified packet once occupied the current id, was renamed away, and a new draft is later authored at that same id, this loop reaches the old move and refuses the unrelated packet before its own ratification. The added reused-name fixture covers only an intermediate name; the current segment also needs an incarnation boundary (or an equivalent identity check).
THE CURRENT NAME'S OWN SEGMENT IS NOT TRIMMED, unlike the predecessors':
the walk has always asked every commit that touched the name the tree
spells today, whatever occupied it before, and narrowing that here would
be a behaviour change this issue did not ask for.
- Files reviewed: 2/2 changed files
- Comments generated: 4
- Review effort level: Lite
|
RULING affecting this PR — Brett Heap, 2026-09-13T03:0xZ, verbatim "option 2 on 1003 with the fix" (full record on #1003, issuecomment link there): #1003's remedy is option 2 — the former-id declaration mechanism (#833 (b)) encoded fail-closed on an undeclared rename arrival, plus the interim docstring+pinned-fixture half — not option 1, which this PR implements. As #1003's claim holder, lane openxfactory-1 decides whether to redirect this PR to the option-2 shape or close it in favor of an option-2 packet. Lane: openxfactory-5 (openXfactory-5) |
A READ GIT DECLINED IS NOT AN ANSWER, and four of them were being taken as one. `git_show_text` returns None for a path that is ABSENT and for a blob it could not READ; `renamed_from` returns None for "no pairing" and for a `git log --follow` that failed; `_commits_touching` answered None for the current name and the caller wrote `or []`. Read flat, a checkout carrying only part of its history reports no ratified predecessor, no predecessor at all and no earlier history — three clean answers, none of them true — and the guard is silently off exactly where it cannot prove anything. Copilot filed all three on `a90e6ccd`; all three are taken as one design, because they are one defect. MEASURED, NOT FEARED, on a real partial checkout. A `--filter=blob:none` clone whose promisor is unreachable LISTS a predecessor's `proposal.md` in its tree and cannot read the blob behind it (git 2.43.0), and it cannot pair any rename that was not byte-exact, because similarity detection reads blobs. On the #1003 chain in such a checkout the previous commit's walk answered `ORIGIN RETAINED` over an origin mutated after ratification, resolving the late re-ratification as its baseline, while the same history fully readable refuses `origin-retention-path-moved`. That is now a fixture. SO EACH READ KEEPS THE TWO APART, in this module's own convention — None is git declining, an empty answer is git saying there is nothing. `_pairing_at` answers `""` for no pairing and None for a failed read, with `renamed_from` left as its flattened reading for the callers that want one. `_path_present` asks `git ls-tree`, which separates ABSENT (exit 0, no row) from UNREADABLE (non-zero) where `git show` cannot. `_readable_blob` asks both and refuses on the disagreement, so a commit where the packet is absent still answers "not ratified here" — the deletion commits the walk visits depend on that — while a blob nobody can read refuses. `_unreadable_history` now NAMES the read that failed, because "cannot verify" without it sends an operator to look for a defect in the packet rather than for the missing half of their checkout. THE CURRENT NAME'S OWN ENUMERATION IS FIXED TOO, which the previous round left alone on the reasoning that it already refused. It did — on the `not ratified` arm, which tells an operator to go and commit a ratification that is sitting in the history they could not read. A refusal must name what happened. AND THE BASELINE READ IN `origin_retention_errors`, which is the same defect one layer up: `was_text` is the declaration AT RATIFICATION, and an unreadable read of it fell into the pre-contract "NOT COMPARABLE" branch, skipping every comparison and returning no findings at all — an archive passing on a silence. Absent is still NOT COMPARABLE; unreadable now refuses. The disposition record's own reads were measured rather than changed: an unreadable commit there already fails the acceptance and leaves the mutation refused. NO DEPTH CAP, ON THE RECORD (the fourth finding). The PR description still described `_LINEAGE_HOP_LIMIT = 64` from the first draft; the implementation dropped it deliberately in `a90e6ccd` and the reasoning holds — the walk is iterative with a `seen` memo over a finite history, so it terminates without one, and "renaming a DRAFT change is unaffected" carries no number for a cap to enforce. A constant would refuse a packet renamed often but lawfully, on a gate with no bypass flag (#690). The description is corrected to the code rather than the code to the description, and `ratifying_commit`'s docstring now says so where a reader will look. Four fixtures, all red against `a90e6ccd`: the two partial checkouts (one that cannot read the predecessor's blob, one that cannot read the pairing), the current name's unreadable enumeration, and the split between `renamed_from`'s flat reading and the guard's. Each partial checkout proves its own premise before asserting anything — the tree lists what the blob read cannot reach — and skips rather than passing if a git ignores the filter. `pytest tests/proposal-support -q`: 141 passed, 71 subtests, against 129 on `main`. Corpus sweep over 211 active plus archived packets, main's module beside this one: 0 refusals either way, 0 baselines moved, 0 answers changed. refs #1003 Lane: openxfactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]>
No conflict: main's landing since 5488529 is add-target-release-deferred-allocation — the third `target_release` value, its validator and its own tests — which this branch neither reads nor is read by. refs #1003 Lane: openxfactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]>
`acaffe97` said the disposition record's own reads were "measured rather than changed" — an unreadable commit there already fails the acceptance and leaves the mutation refused. That was a reading of the code, and a reading is not a fixture: the next hand to touch `_accept_declaration_problems` has nothing to fail. So the claim is measured again, with a real object deleted out of `.git/objects`, and pinned where that hand will meet it. BOTH HALVES ASK THE SAME QUESTION WHERE THE CODE DID NOT CHANGE. The record's own read: with the accepted mutation's blob unreadable, the entry fails its own predicate — "declares no origin, so there is no declaration to accept" — the headline mutation finding stands, and `archive_change` refuses. Fail closed, reached through a check the record already carried. And the ORDERING that makes the other read safe: the declaration AT RATIFICATION goes through `_readable_blob` BEFORE any disposition is consulted, so a silence there refuses `origin-retention-history-unreadable` and the record — valid, committed, naming that very commit — is never reached at all. RED AGAINST `a90e6ccd` on the second half, and not in the way a missing helper is red: that module answered `ORIGIN RETENTION NOT COMPARABLE change-r: the packet at the ratifying commit declares no origin (pre-contract packet)` and returned NO findings — an archive passing on a silence, over a mutated origin, with a valid disposition record sitting right there. That is the failure `acaffe97` ends, now measured end to end rather than described. MEASURED. `pytest tests/proposal-support -q`: 142 passed, 72 subtests, against 129 passed, 72 subtests on `origin/main` 9378eca — +13, no skips. `proposal-support.py . verify` exit 0. `doc-health.py --single-repo`, this branch against a control at 9378eca: both exit 0, both 328 lines, IDENTICAL once the repo-identity token is normalised (31 critical, 9 error, 26 warning, 23 info, 0 new regressions). `openspec validate --all --strict`: 104 passed, 3 failed on both, the same three `disposition-codexfactory-*` packets that carry no delta by construction. refs #1003 Lane: openxfactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]>
`partial_checkout` was defined TWICE in `OriginRetentionAtArchiveTests` (`5886ca39`, lines 2146 and 2238). Python binds the second, so the first was dead the moment it was written — and dead in the worst way, since a later hand edits the copy that reads first and watches nothing change. The two bodies are identical apart from docstring wording and one comment, so the SECOND one stays and the running bytes are untouched. AND THE COMMENT ABOVE THEM SAID MORE THAN WAS MEASURED. It read that both fixtures' partial clone "accepted the late re-ratification and printed `ORIGIN RETAINED` over a mutated origin". Against `a90e6ccd` that is true of ONE of them: on the #1003 chain, whose hop cannot be paired without reading blobs, the walk RETURNED a baseline (`209823db046c`) and printed `ORIGIN RETAINED` while `origin_retention_errors` answered `[]`. On the byte-exact chain a sibling arm still refused — but it named the LAST hop where the full clone names the FIRST, which is the lineage trimmed at a tree it could not read, and is why that fixture pins `_incarnation` directly rather than through an outcome. The comment now says which is which, because the pair only teaches that if the difference is on the page. `pytest tests/proposal-support -q`: 142 passed, 72 subtests — unchanged by either edit, which is the point of both. refs #1003 Lane: openxfactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]>
There was a problem hiding this comment.
🟡 Changes recommended
Reconcile the documented depth limit with the implementation/tests and remove the duplicate helper.
Get a fresh assessment by requesting another Copilot review.
Review details
Suppressed comments (2)
scripts/proposal-support.py:1226
- The PR description says the lineage is bounded by
_LINEAGE_HOP_LIMIT = 64, but this implementation explicitly imposes no depth cap and the new test requires a 70-hop chain to succeed. Please reconcile the description with the shipped behavior (or add the documented limit and update the test), otherwise the supported behavior is ambiguous.
ITERATIVE, WITH A `seen` MEMO, rather than recursive: the lineage is
finite (every hop is bounded by a strictly earlier commit, and no commit
is its own ancestor), so no cap on its depth is needed and none is
imposed — a cap would be a refusal for a packet renamed often but
lawfully, and "renaming a DRAFT change is unaffected" has no number in it
tests/proposal-support/test_proposal_support.py:2387
- The PR description says lineages deeper than
_LINEAGE_HOP_LIMIT = 64must refuse, but this change explicitly implements no depth cap and adds a 70-hop test that must archive successfully. Please reconcile the implementation/fixture with the stated contract, or update the PR description so the delivered behavior is unambiguous.
commit_all(root, "ratify it under the name it ended up with")
head = self.sha(root)
self.assertEqual(support.ratifying_commit(root, current), head)
self.assertEqual(
support.origin_retention_errors(root, moved,
change=current), [])
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Lite
There was a problem hiding this comment.
🔵 Needs a closer look
Reconcile the documented 64-hop lineage cap with the unbounded implementation and regression test.
Review details
Suppressed comments (1)
scripts/proposal-support.py:1227
- The implementation and the 70-hop regression test explicitly make the lineage unbounded, but the PR description says a
_LINEAGE_HOP_LIMIT = 64exists and that deeper lineages refuse. Please reconcile this contract before merge—either implement/test the cap or update the description and acceptance notes to state the intentional unbounded behavior.
ITERATIVE, WITH A `seen` MEMO, rather than recursive: the lineage is
finite (every hop is bounded by a strictly earlier commit, and no commit
is its own ancestor), so no cap on its depth is needed and none is
imposed — a cap would be a refusal for a packet renamed often but
lawfully, and "renaming a DRAFT change is unaffected" has no number in it
(raised by the review bench on PR #1024).
- Files reviewed: 2/2 changed files
- Comments generated: 0 new
- Review effort level: Lite
|
|
Lane: openxfactory-1 (openXfactory-1) FREEZE
The bench, closed
The round-4 re-flag is REFUSED as already taken: the description was corrected at 04:25Z (see "A correction to this description" in the body, and the reply on the SonarCloud: ONE finding, refused with a measurementQuality Gate ERROR on
What the continuation rounds put on the record
Figures on the head: Not landing, not closing the issue, not deleting the branch — the lane stops here. |
|
Lane: openxfactory-1 (openXfactory-1) CLOSED in favor of the option-2 packet — lane openxfactory-1, session 3da6c3f9@Eagle, 2026-09-13T04:45:57Z. Brett Heap's RULING on #1003 (2026-09-13T03:0xZ, verbatim "option 2 on 1003 with the fix"; record at #1003 (comment), echoed on this PR at #1024 (comment)) selects the former-id declaration mechanism, fail-closed on an undeclared rename arrival, plus an interim docstring-and-fixture pin of the multi-hop gap. It names this PR as the option-1 shape that is NOT selected, and leaves redirect-or-close to this lane as #1003's claim holder. This lane's call is CLOSE: openxFactory refuses non-fast-forward pushes, so a redirect would stack revert commits on top of a walk the ruling says is deleted when the mechanism lands. A clean successor is the smaller record. What stands from this PR:
Successors, both this lane's under the standing #1003 claim:
refs #1003 |




Lane: openxfactory-1
The gap
#849widened the origin-retention walk to ask EVERY commit it visits whether that commit moved an already-ratified packet — but the enumeration underneath it is a path-limitedgit logfor the name the tree spells today, and a path-limitedgit logfollows no rename. The closure therefore reached exactly ONE hop. Put a lawful draft rename between the move and the current name —ratify r → rename+un-ratify r→s → rename s→t while draft → ratify t— and the walk fortbegins at thes→thop, whose former blob is a draft and refuses nothing, while ther→shop that actually moved the ratified packet is never enumerated at all; the later re-ratification is then taken as the baseline, waving through every origin mutation made in between. That is #833's failure and #849's, reached by one hop more than either closed. The reproduction is the one filed in #1003 off PR #999's review bench (threadPRRT_kwDOTAvnrs6hsp6c,scripts/proposal-support.py:840at that head), and it is now a fixture.First finding: this is REALIZATION, not an OpenSpec change
Asked and answered before any code beyond the failing tests, because a widened refusal on a gate with no bypass flag is governance surface if canon does not already carry it.
The requirement #695, #846 and #999 all realize is
openspec/specs/release-realization/spec.md:262§ "Origin retention at archive", and it is the only hit inopenspec/specsfor origin + retention/rename/former:The text names no rename, no former path and no hop count — it is silent on renames in both directions. What it does name is the thing that decides the question: the comparison is against the declaration present AT RATIFICATION. The #1003 defect is that after a rename chain the walk compares against a commit that is not the ratification, so the comparison the requirement mandates is not the comparison being run. Closing it implements the ratified sentence rather than extending it.
Three checks behind that reading, each measured rather than argued:
openspec/changes/archive/2026-08-06-add-proposal-origin-contract/specs/release-realization/spec.md, 20 lines either side) — the requirement has never been amended, so there is no later scoping to read.docs/document-lifecycle.md,scripts/proposal-support.pyand two test files; The origin-retention walk refuses a moved path instead of silently re-basing to the rename commit #846 (theorigin-retention-path-movedrefusal, proposal-support's origin-retention walk silently re-bases to a LATER commit when a ratified change's path moves (a rename), waving through every mutation between the real ratification and it — the failure its own docstring names; no refuse, no bypass #833) touched the doc, the script and its tests; Widen the origin-retention walk to every visited commit, not just the tip #999 (The #833 refuse guard asks only the candidate commit: an un-ratifying rename followed by a re-ratification still re-bases the origin-retention baseline #849) touched the script and its tests. Noopenspec/path in any of them.docs/document-lifecycle.md(Status: standard), amended by The origin-retention walk refuses a moved path instead of silently re-basing to the rename commit #846: "Renaming a ratified change is therefore blocked until a change declares a FORMER ID (issue proposal-support's origin-retention walk silently re-bases to a LATER commit when a ratified change's path moves (a rename), waving through every mutation between the real ratification and it — the failure its own docstring names; no refuse, no bypass #833, a successor packet); renaming a DRAFT change, and a single commit that renames a draft and ratifies it, are unaffected." Nothing there is scoped to one hop — the hop count was an artefact of how the walk enumerates commits.So: a
fix/PR, code and fixtures, no OpenSpec packet and no doc change (the doc's sentence above is already true of this branch and was already true of a lineage it could not yet reach).What moved — the walk
scripts/proposal-support.py.ratifying_commit's body is five lines over the helpers below; the question it asks each commit is unchanged._commits_touching(root, rel, bounds=None)— the existing--full-history --topo-order --reverse --format=%Henumeration, lifted out and given optional bounds so a predecessor's history can be read as it stood BEFORE the hop that renamed it. Deliberately not--follow:--followwould have to replace the enumeration, and it walks the simplified history of one path, which would trade away the--full-historyproperty the walk depends on (a commit that changed the file on a merged branch must not be pruned)._parents(root, revision)—git rev-list --parents -n 1, so a hop's history is bounded by every parent rather than by<hop>^. A lineage that ran through a merge is then read from both sides (bench round 1)._incarnation(root, change, rel, hop)— the predecessor's own commits, TRIMMED to the incarnation that hop renamed away: reading newest first, commits are kept until one is reached where the name stood in no parent, and that one is the last kept. Without the trim, a name previously occupied by a DIFFERENT packet drags that occupant's hops into this packet's lineage — a false refusal, permanent, on a gate with no bypass flag (bench round 1, and its own fixture). The trim loses no hop: git pairs a rename only where the destination is ADDED, so only the commit that brought a name into being can carry a predecessor at all._lineage_commits(root, change, rel)— the walk itself, iterative with a frame per name, predecessors asked FIRST so a refusal names the EARLIEST hop that moved a ratified packet, and aseenmemo over(former, revision)pairs. Renames only (kinds="R"), never copies: following a copy backwards would walk into the SOURCE packet's history and refuse a packet honestly authored as a draft copy of a ratified one, on a gate with no bypass flag by design (Origin retention at archive has no running implementation; #685 shipped a post-ratification edit to the archived .openspec.yaml origin block #690)._refuse_if_moved(...)/_moved_packet_refusal(...)— the per-commit question and the refusal text, each in one place for both callers, asked with the path that commit spelled. The baseline still comes from the current name alone: a ratification found under a former name is a refusal, never a commit to re-base onto, because nothing in this corpus declares a former id (proposal-support's origin-retention walk silently re-bases to a LATER commit when a ratified change's path moves (a rename), waving through every mutation between the real ratification and it — the failure its own docstring names; no refuse, no bypass #833).No depth cap, and that is a decision rather than an omission. The walk is iterative over a finite history with a
seenmemo, so it terminates without one, and the realization record's own sentence — "renaming a DRAFT change is unaffected" — carries no number for a cap to enforce. A constant would refuse a packet renamed often but lawfully, on a gate with no bypass flag (#690), which is a refusal nobody ruled.test_a_long_lawful_draft_rename_chain_is_not_cappedwalks 70 hops and expects a baseline, andratifying_commit's docstring says why where a reader will look.What moved — and every read of history fails closed
The bench's second round found the other half of the same design: git answers "there is nothing there" and "I cannot tell you" with the same empty value in more than one place, and a widened walk reads more history, so it meets more of them. Read flat, a checkout carrying only part of its history reports no ratified predecessor, no predecessor at all and no earlier history — three clean answers, none of them true, and the guard silently off exactly where it cannot prove anything.
_pairing_at(root, revision, rel, *, kinds)—""where git ANSWERED and reported no pairing,Nonewhere git DECLINED (an unresolvable revision, a--followthat failed).renamed_fromstays as its flattened reading for the callers and fixtures that legitimately want one; the guard reads the tri-state._path_present(root, revision, rel)—git ls-tree, which separates ABSENT (exit 0, no row) from UNREADABLE (non-zero) wheregit showcannot. This is the incarnation boundary test: "the name stood in no parent" is now read off the TREE, not off a failedgit show._readable_blob(root, change, revision, rel)— the text,Nonewhere the path is genuinely absent (the deletion commits the walk visits depend on that answer), and a REFUSAL where git could not read it._unreadable_history(change, need)— the refusal,origin-retention-history-unreadable, exit 2, CANNOT RUN, the same shape as every other arm of this gate.needNAMES the read that failed ("it needed the blob…as at…", "whether…renamed…in from an earlier name"), because "cannot verify" without it sends an operator hunting a defect in the packet rather than the missing half of their checkout.origin_retention_errorsis the same defect one layer up:was_textis the declaration AT RATIFICATION, and an unreadable read of it fell into the pre-contract "NOT COMPARABLE" branch, skipping every comparison and returning no findings at all. Absent is still NOT COMPARABLE; unreadable now refuses._accept_declaration_problemswere measured rather than changed, and are now pinned: with the accepted mutation's blob unreadable the entry fails its own predicate, the headline mutation finding stands and the archive refuses; and the declaration AT RATIFICATION is read through_readable_blobBEFORE any disposition is consulted, so a silence there refuses before the record is reached at all.Measured, not feared. A
--filter=blob:noneclone whose promisor is unreachable LISTS a predecessor'sproposal.mdin its tree and cannot read the blob behind it (git 2.43.0), and it cannot pair any rename that was not byte-exact, because similarity detection reads blobs. On the #1003 chain in such a checkout the pre-fix walk RETURNED a baseline and printedORIGIN RETAINEDover an origin mutated after ratification (origin_retention_errors→[]), where the same history fully readable refuses. Both are fixtures.A correction to this description
Until this round, the paragraph above the fixtures described
_predecessor_history(...)and "a lineage deeper than_LINEAGE_HOP_LIMIT = 64hops refuses". That was the FIRST DRAFT of the implementation, not the code: the cap was dropped deliberately, the helper was replaced by_lineage_commits/_incarnation, and a 70-hop fixture asserts the lawful chain is not refused. The bench caught the contradiction between the description and the shipped behaviour, and the description is corrected to the code rather than the code to the description.What is NOT closed, said rather than implied
An un-ratification that lands in its OWN commit BEFORE the rename leaves every hop moving a DRAFT, so no hop answers the question and the later re-ratification is still the baseline. Whether a re-ratification after a return to draft is lawfully a NEW baseline is a governance question rather than an author's; #1003 names the shape whose un-ratification rides IN the rename commit. Today's answer for the other shape is PINNED by
test_an_un_ratification_before_the_rename_is_a_stated_gap— the precedent being #846's own stated-gap fixture for #849's shape, which #999 later flipped — rather than changed here.A shallow clone is the other stated boundary: at a grafted boundary commit git reports no parents and therefore no rename pairing, which is
renamed_from's pre-existing blindness rather than anything this branch widens or narrows. Refusing every shallow checkout outright is a new refusal class on a gate with no bypass flag (#690) and belongs to a change that says so. It is named in the walk's docstring.Fixtures — thirteen, five of them red first
All in
OriginRetentionAtArchiveTests, with four helpers (rename_and_un_ratify,a_lineage_with_a_mutated_origin,a_moved_ratified_lineage/an_un_ratifying_lineage,partial_checkout+assert_the_full_clone_refuses).test_a_rename_chain_refuses_at_the_hop_that_moved_the_ratified_packet(the issue's reproduction)50bc03a9OriginRetentionError not raisedr→shoptest_a_three_hop_rename_chain_still_refuses_at_the_first_hop50bc03a9OriginRetentionError not raisedtest_a_ratified_packet_renamed_twice_refuses_at_the_first_hop50bc03a9test_a_draft_renamed_twice_and_ratified_at_the_end_still_archives(control)50bc03a9test_a_draft_fork_by_copy_renamed_afterwards_still_archives(control — the copy boundary)50bc03a9test_an_un_ratification_before_the_rename_is_a_stated_gap(pin)50bc03a9test_a_reused_intermediate_name_does_not_contaminate_a_later_packet(+ its anti-vacuity half)a90e6ccdtest_a_rename_that_landed_through_a_merge_still_refusesa90e6ccdtest_a_lineage_git_will_not_read_refuses_rather_than_reading_a_silence(extended byacaffe97)a90e6ccdgit logread its failure as an empty history and refused on thenot ratifiedarmorigin-retention-history-unreadable, naming the read that failedtest_a_long_lawful_draft_rename_chain_is_not_capped(70 hops)a90e6ccdtest_a_partial_checkout_that_cannot_read_the_predecessor_refusesacaffe97_incarnationkept ONE commit where the full checkout keeps two, the ratified hop trimmed outtest_a_partial_checkout_that_cannot_read_the_pairing_refuses(the #1003 chain)acaffe97ratifying_commitRETURNED a baseline,ORIGIN RETAINEDprinted over a mutated origin,origin_retention_errors→[]test_an_unreadable_accepted_declaration_refuses_the_acceptance5886ca39a90e6ccd—ORIGIN RETENTION NOT COMPARABLE … declares no origin (pre-contract packet)and NO findings, with a valid disposition record presentAlso in this round, found by reading rather than filed:
partial_checkouthad been defined twice in the class (Python binds the second), and the comment above the pair claimed both fixtures' partial clone had previously "accepted the late re-ratification" where only one had. Both corrected in2bc60386, with the running bytes untouched.Gates
Branch
2bc60386against a control clone atorigin/main9378eca5:python3 -m pytest tests/proposal-support -q→ 142 passed, 72 subtests passed; control → 129 passed, 72 subtests passed. +13 fixtures, no skips, nothing existing changed.test_the_guard_refuses_nothing_on_this_repository_today) asserts the same invariant over whatever is active, one subtest per change.python3 scripts/proposal-support.py . verify→ exit 0,proposal support verification ok.python3 scripts/doc-health.py --single-repo ., branch vs control: both exit 0, both 328 lines,diffCLEAN once the repo-identity token (the checkout's own directory name) is normalised. Headline on both, as-of 2026-09-13: canon share 40.3%, 31 critical / 9 error / 26 warning / 23 info, new regressions 0.OPENSPEC_TELEMETRY=0 openspec validate --all --strict: 104 passed, 3 failed (107 items) on BOTH, the three being thedisposition-codexfactory-*packets that carry no spec delta by construction. This branch touches noopenspec/path, which is why the identity is the measurement.No other consumer:
ratifying_commit,ratified_under_a_former_pathandrenamed_fromare called from nothing outside this script and its own tests (grep over the whole tree), and the nightlyproposal-origindoc-health family compares manifest against packet without walking history, so it shares neither the gap nor the fix.refs #1003 · refs #999 · refs #849 · refs #833
🤖 Generated with Claude Code
Summary by Sourcery
Make origin-retention validation trace a packet's full rename lineage so ratified origins cannot be bypassed through intermediate renames and re-ratification.
Bug Fixes:
Enhancements:
Tests: