Repository navigation
The origin-retention walk refuses a moved path instead of silently re-basing to the rename commit - #846
Conversation
…o the rename Issue #833: `ratifying_commit` resolves the archive gate's origin baseline by walking ONE path — the change id the tree spells today — so a ratified change whose directory is renamed afterwards has no history under its new name before the rename, and the first ratified blob the walk finds IS the rename commit. That baseline is later than every mutation made between the real ratification and the move, and `origin_retention_errors` printed `ORIGIN RETAINED` over it (measured on issue #777, four days of drift): verbatim the failure the walk's own docstring names. The walk now asserts what a ratifying commit IS — a FLIP, whose parent does not already declare `ratified`. `renamed_from` asks git (through `--follow`, the one mode that pairs a rename for a single path, bounded to one commit and with `--find-renames` explicit so a `diff.renames=false` config cannot switch the guard off) whether the candidate MOVED the path; when it did, and the packet already declared `Status: ratified` at its former path, the walk raises `OriginRetentionError` — CANNOT RUN, exit 2, no bypass — naming the change, both paths, the candidate and that the baseline cannot be established without a former-id declaration. Renaming a DRAFT, and one commit that renames a draft and ratifies it, are unaffected. Former-id support is a later packet. Measured: 189 packets (43 active, 146 archived) resolve the same baselines as before, 0 refusals; 43/43 active changes verify green; doc-health findings identical to main; +8 tests including the renamed, copied, draft-renamed, rename-and-ratify, never-moved and never-ratified fixtures plus a live-corpus sweep. On the unfixed module the renamed fixture prints `ORIGIN RETAINED` with the rename as its baseline. Lane: openxfactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LZG3GzLmkzpEMyzE1QwKtu
There was a problem hiding this comment.
Hi @brettheap! 👋
Your private repo does not have access to Sourcery.
Please upgrade to continue using Sourcery ✨
|
Lane: openxfactory-1 (openXfactory-1) @codex review |
There was a problem hiding this comment.
🟢 Approval recommended
The change is narrowly scoped, adds strong fixture coverage for both failure and non-failure shapes, and integrates cleanly with the existing exit-2 refusal handling without expanding the gate’s surface area.
Pull request overview
This pull request hardens the archive-gate’s origin-retention baseline resolution so it refuses (exit 2) when a ratified packet’s directory was later renamed/copied, preventing the gate from silently re-basing onto the rename commit and potentially waving through post-ratification origin mutations.
Changes:
- Add rename/copy detection at the candidate “ratifying” commit and refuse the walk when the packet was already ratified under a former path (
OriginRetentionErrorwithorigin-retention-path-moved). - Add fixture-backed tests covering rename/copy refusal and confirming lawful cases (draft rename, rename+ratify in one commit, never-ratified move) remain unchanged.
- Document the new refusal behavior in the lifecycle documentation alongside the other archive-gate arms.
File summaries
| File | Description |
|---|---|
| scripts/proposal-support.py | Adds the moved-packet refusal guard (renamed_from, ratified_under_a_former_path) and raises a named OriginRetentionError instead of re-basing the baseline. |
| tests/proposal-support/test_proposal_support.py | Adds fixtures/tests that pin both the refusal behavior and the non-refusal behavior for lawful histories, plus a corpus sweep to ensure no unintended refusals. |
| docs/document-lifecycle.md | Updates lifecycle docs to describe the moved-packet refusal arm and its implications. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
A "nothing refused" sweep over a corpus that reached the guard for no packet would pass while asserting nothing. Both halves are now stated: the loop saw active changes at all, and at least one of them resolved a ratifying commit. Lane: openxfactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01LZG3GzLmkzpEMyzE1QwKtu
|
Codex Review: Something went wrong. Try again later by commenting “@codex review”. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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.
🟢 Approval recommended
The change is narrowly scoped, well-defended with fixture-based tests, and aligns the gate’s behavior with the documented failure mode by refusing when a safe baseline cannot be established.
Review details
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
tests/proposal-support/test_proposal_support.py:1649
- This test docstring hard-codes corpus counts (“35 active packets here”), but the repository currently has 43 active changes (excluding
archive/), so the comment is already stale and will keep drifting as new changes are added/archived. Consider removing exact counts and describing the invariant being tested (no refusals) instead.
- Files reviewed: 3/3 changed files
- Comments generated: 0 new
- Review effort level: Lite
…refuses-a-moved-path
Continuation of this branch after its first author stopped at 62bea17. Three audit findings from re-measuring what the branch claims: 1. THE CORPUS COUNT IN A DOCSTRING WAS ALREADY STALE ("35 active packets here" against 42 today), which is Copilot's suppressed finding on this PR and a drift that repeats with every landing. The sweep now states the INVARIANT — zero refusals over whatever is active, one subtest per change — and writes no number down. 2. `--find-renames` IS NOT THE MECHANISM that makes a git config unable to switch the guard off, and both the code comment and the first commit message said it was. `--follow` FORCES rename detection: measured on git 2.43.0, `diff.renames=false` and `diff.renameLimit=1` still report the pairing with the flag AND without it, and dropping the flag breaks no test (a surviving mutant, now stated where it was overclaimed). The flag stays as a belt. What the claim needed was a fixture, so the hostile config is set in a fixture's own `.git/config` and the refusal is asserted over it — the PROPERTY (#690's no-bypass posture reaches this arm too) rather than the flag. 3. Two assertions the ruling names were implicit: the refusal message says the baseline "cannot be established", and the never-moved ratified packet passes the gate END TO END (`origin_retention_errors` -> `[]`) and not only at the walk. Re-measured on the merged tree (main 245ee85, which archived add-openspec-cli-pin): 189 packets swept (42 active, 147 archived), 0 refusals, and every resolved baseline byte-identical to the pre-guard module's — 189 compared, 0 differences. 42/42 active changes verify green, identical to main. `pytest tests/proposal-support tests/sequenced_after`: 339 passed / 44 subtests here, 330 passed / 2 subtests on main. `pytest tests/doc-health` (the other suite that loads this module): 1635 passed. `doc-health.py --single-repo .`: exit 0, findings identical to main (91 lines, 10 critical / 8 error / 57 warning / 16 info, 0 new regressions), the only difference the canon word count (+109, the one documentation paragraph). Lane: openxfactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_011pPD2SfAZtmh8qC3VAimXw
|
Lane: openxfactory-1 (openXfactory-1) CONTINUATION — the first author of this branch stopped on a rate limit at
Reviewer note: the negative control and the refusal wording in the PR body are both from real runs on this head, not transcribed from the first author's. @codex review |
There was a problem hiding this comment.
🟡 Changes recommended
The new renamed_from guard claims to detect copies but does not explicitly enable git copy detection, risking missed “copied packet” cases on default git configs.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 1
- 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: fa785ff502
ℹ️ 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".
…e gap CODEX (P1). The guard asks its question of the CANDIDATE commit only, so a commit that renames an already-ratified packet AND un-ratifies the destination is never a candidate, and the later re-ratification carries no pairing: the walk takes the re-ratification as its baseline. Real, and NOT patched here. The obvious closure — refuse on any hop in the followed history whose source declared `ratified` at that hop's parent — was probed over all 189 packets (42 active + 147 archived): 4 carry a hop before their baseline, all four with a draft source, 0 refusals. It is a no-op today and still wrong to take, because history cannot separate that shape from a NEW packet authored as a copy of a ratified one, entering as a draft and ratified later (ordinary authoring; identical in git — source ratified at the hop's parent, destination not ratified at the hop). A hop-chain guard refuses both, and this gate has no bypass flag, so a lawful fork-by-copy would become unarchivable until a former-id declaration landed. So the line stays where the destination enters RATIFIED, the gap is STATED in `ratified_under_a_former_path`'s docstring, filed as issue #849 for the former-id packet to take, and PINNED by a fixture that records what the walk answers today — mutation in between and all — so a successor flips it deliberately rather than by accident. COPILOT (copy detection). `--find-copies` is not needed and the claim that copy detection is off by default does not reach this call: `--follow` turns it on for the followed path. Measured on git 2.43.0 — a copied packet reports `C100` with `--find-renames`, without it, and under `diff.renames=false` — and the standing proof is the copy fixture itself, which passes on a default-configured runner. Stated in the docstring where the claim lives. Docstrings and one fixture only; no behaviour changed (the guard sweep's 189 packets, 0 refusals, 0 baseline differences still stands). `pytest tests/proposal-support tests/sequenced_after`: 340 passed, 44 subtests. Lane: openxfactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_011pPD2SfAZtmh8qC3VAimXw
|
Lane: openxfactory-1 (openXfactory-1) CHECK STATE at Measured, not inferred:
Operator item for Brett's console, not a lane act: re-grant/repair the Everything required by a ruleset is green or in flight on this head; this lane does not merge. |
There was a problem hiding this comment.
🔵 Needs a closer look
The new renamed_from helper currently fails for non-canonical git revision strings (e.g., HEAD, tags, abbreviated SHAs), which could silently disable moved-packet detection for future call sites unless the revision is normalized.
Review details
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
scripts/proposal-support.py:616
renamed_fromcompares the firstgit logrecord hash to the caller-providedrevisionstring (rows[0].strip() != revision). That makes the helper silently returnNonefor valid git revisions that are not full 40-hex SHAs (e.g.,HEAD,HEAD~1, tags, or abbreviated SHAs), even though the git invocation itself accepts those. Normalizingrevisionto a full commit hash up front keeps the guard correct for all callers and prevents accidental non-detection if a future call site passes a non-canonical revision string.
- Files reviewed: 3/3 changed files
- Comments generated: 0 new
- Review effort level: Lite
`renamed_from` recognises a pairing by comparing git's own `%H` against the revision it was asked about, so every revision that is not a full 40-hex hash — `HEAD`, `HEAD~1`, an annotated tag, an abbreviated hash — compared unequal and was answered None: NO PAIRING, no refusal, the #833 defect back through a caller rather than through a config. The revision is now resolved first (`rev-parse --verify <revision>^{commit}`, which also peels an annotated tag), and a revision that resolves to nothing answers None as an unreadable history already did. Raised by the review bench on PR #846 (Copilot, third round, as a suppressed finding with no thread of its own). It changes no answer in this corpus: the sole caller passes a full hash straight out of `git log --format=%H`, the 189-packet sweep (42 active + 147 archived) still refuses 0 and still resolves every baseline byte-identical to the pre-guard module, and the two suites are unchanged but for the new fixture. It is taken anyway because silent NON-detection is the failure class the whole guard exists to end, and a guard that can be switched off by naming its commit differently is the same defect as one a git config can switch off. Pinned by `test_the_guard_reads_any_spelling_of_the_candidate_commit`, which asserts the pairing and the refusal path over four spellings of the same commit. Mutation-checked: with the resolution removed, three of the four subtests fail (abbreviated hash, `HEAD`, annotated tag) and the full-hash one passes — the fixture pins the property, not the code shape. Refs #833 Lane: openxfactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]>
There was a problem hiding this comment.
🔵 Needs a closer look
The new refusal behavior also applies to copied packets, but the user-facing refusal message and lifecycle docs currently describe only “moves/renames,” which is misleading given the implemented and tested copy-refusal path.
Review details
Suppressed comments (3)
Previously missed (3) — in code that hasn't changed since the last review.
scripts/proposal-support.py:804
- The refusal message hard-codes the detected event as a "MOVE", but
renamed_from()treats both renames and copies as predecessors (status codesR*andC*). In the copy case (old path still exists), this message is misleading for operators and makes troubleshooting harder.
docs/document-lifecycle.md:433 - This new doc paragraph explains the refusal only in terms of a rename, but the implementation also refuses when a ratified packet is copied to a new id (the guard treats
C*likeR*). Mentioning copies here would align docs with behavior and avoid surprising operators.
scripts/proposal-support.py:501 OriginRetentionError's docstring describes the new arm as only a renamed packet, but the guard also refuses a copied packet (renamed_fromtreatsC*the same asR*, and there is a fixture asserting copy refusal). The docstring should reflect the actual behavior so future readers don't assume copies are handled differently.
- Files reviewed: 3/3 changed files
- Comments generated: 0 new
- Review effort level: Lite
There was a problem hiding this comment.
🟢 Approval recommended
The behavioral change is narrowly scoped to the origin-retention baseline resolver, is exercised end-to-end with targeted fixtures (including negative controls), and has no external call sites beyond this module/tests.
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 0 new
- Review effort level: Lite
|
Lane: openxfactory-1 (openXfactory-1)
The bench round, taken (
|
|
Lane: openxfactory-1 (openXfactory-1) Brett's word reaffirmed 2026-09-09T15:02Z: "land 842 and 846 when green" (after the App install on codeXfactory; ruling "Hold until main is green again" lifts when main's pytest-suite rerun 34358102328 reports success). Landing guard on this PR: six required checks green on the frozen head; |
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
…a-moved-path Fresh merge ref so pytest-suite runs the repointed pinned-core checkout; no content change to the PR's own diff. Lane: openxfactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]>
|
Lane: openxfactory-1 (openXfactory-1) HEAD MOVED BY MERGE-FROM-MAIN (2026-09-09T15:44Z): |
|
Lane: openxfactory-1 (openXfactory-1) FROZEN + LANDING PROVENANCE — 2026-09-09T16:12:35Z. Head |
RATIFIED 2026-09-09 by Brett Heap (openxFactory operator authority), in session, verbatim: "merge 842 and 846 when green, then ratify the 729 packet" (2026-09-09T13:13:41Z, recorded on openxFactory issue #729). THE WORD IS ONE UTTERANCE OF THREE CLAUSES IN ORDER, AND THE ORDER WAS KEPT: PR #842 merged 4cdadd5 at 16:11:57Z (closing #840) and PR #846 merged 183d1b4 at 16:12:40Z (closing #833), both green after #801 cured the codexFactory org-move red; this is the third clause. The earlier "author the 729 packet" (2026-09-09T12:32:46Z) stays recorded as the ORIGIN of the authoring. THE VETO POINT WAS PUT AND WAS NOT TAKEN. design.md D1 — option A (a reason-quoted code span reported only where it matches EXACTLY a unit of the requirement's basis that the block does not carry and that no marker declares removed) against option B (any code span standing inside a reason, the remedy shape issue #729's own body proposed) — was carried in the pull request body, in tasks.md § 1.2, in the README row and on issue #729, with B written out beside A and its four costs MEASURED. A is RATIFIED AS DESIGNED, ground two included, and so is the narrowing D5 adds to the ruling's literal wording ("and that no marker declares removed", narrower in the SILENT direction), which was disclosed on #729 at 14:22Z — before the act the word made conditional on #842 and #846 landing green. A veto of A would have been a veto of GROUND TWO ONLY; ground three rested on no predicate choice. WHAT MOVES. proposal.md, design.md and tasks.md carry Status: ratified with EXACTLY ONE citation line each (Ratified: in the proposal's front matter, Ratified by: in the other two), which is what ratified-provenance counts. .openspec.yaml gains approved_by + approved_on BESIDE the drafting provenance it was authored with — kind and id unmoved, the addition-not-rewrite shape add-drafted-proposal-origin defined, and the shape the archive gate's origin-retention arm reads, which is why the status flip and the approval pair move in ONE commit. The README OpenSpec Records row flips. Two records are captured beside the packet: review/ratification-2026-09-09.md and review/verification-2026-09-09.md. TWO DISCLOSURES CARRIED INTO THE RECORD RATHER THAN LEFT TO BE FOUND. (a) families.FAMILY_RESOLUTION line 117 has carried modified-block-currency as CONTESTED since the flip of 2026-08-31 (#357) and that table has no per-class grain, so issue #729's "not contested" premise was stale; the packet claims NO exemption and states the inheritance plainly (design.md D7), and the MODIFIED block carries canon's now-false "deliberately absent from FAMILY_RESOLUTION" paragraph BYTE-FAITHFULLY BY NECESSITY — a MODIFIED block restates canon as canon states it and this packet replaces exactly one sentence — recorded as residue at tasks.md § 5.3. (b) #719's promoted Removed from canon marker names a sentence canon no longer carries, so ground three would fire on it; it is deliberately NOT restated, on this requirement's own rule that a marker is not a carriage unit in either direction, and the AMENDED BY note says so in terms. WHAT DOES NOT MOVE. No promoted canon is touched, no code and no test moves, no ledger row moves (a row's derived keys read no lifecycle status), and § 5.2–§ 5.7 stay UNTICKED — the archive is a separate act on merged-plus-green realization evidence and on a separate word, so #729 closes at archive and not at this landing, which is why this pull request carries no closing keyword. VERIFIED ON THE RATIFIED TREE, every number re-derived after the encode and with both records in the lifecycle scan set: openspec validate amend-marker-defect-reporting --strict valid; --all --strict 100 passed / 3 failed with the failure SET byte-identical to origin/main 183d1b4's same three (disposition-codexfactory-declared-renames, pin-openspec-cli-dependency-closure, spec/repo-boundary-governance) and none of them this packet's; the pinned 1.12 entrypoint 1 passed / 0 failed clean; proposal-support verify ok; sequenced_after passed (42 active, 9 declaring) with the ledger consistent (190 rows) and ZERO rows moved; scope_globs passed; doc-health --family modified-block-currency 0/0/0/8+1 = 9 info, finding lines IDENTICAL to the origin/main control; doc-health --single-repo 10 critical / 8 error / 57 warning / 16 info with the finding-line diff against the PRE-RATIFICATION branch EMPTY and the only line differing from origin/main's being another change's pre-existing "missing status header" that #847 archived out of the active scan set on main after this branch's last merge; the family names this change ZERO times; pytest tests/doc-health 1646 passed (test_modified_block_currency.py 139, the two touched files 178). A MERGE FROM MAIN AND A RE-MEASURE ARE OWED AT LANDING. The branch's last merge took e86eca3 (#801) at 15:44Z and #842/#846/#847 landed after it, so this tree does not carry them; verification-2026-09-09.md § 9 states in advance which figures move when the merge is taken. Refs #729 Lane: openxfactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]>
…ity case Two fix-round items, both confined to the guard's tests. SonarCloud flagged 9.3% duplication on new code (gate: <=3%). The un-ratifying-rename regression test (test_an_unratifying_rename_now_ refuses_the_walk) asserted the same "walk refuses, names the right commit, origin_retention_errors and archive_change both stop" shape as the pre-existing test_a_ratified_change_renamed_afterwards_refuses_the_ walk, nearly line for line -- the two differ only in which commit the message must name and one #849-only substring. Both now call a new shared helper, assert_walk_refuses, that asserts the common shape once; each caller passes only what is actually different. Copilot's outstanding review thread on the kinds="R" branch (added to close #849): the sibling copy test, test_a_ratified_packet_copied_to_a_ new_id_refuses_too, copies a destination that is ALREADY ratified at the copy commit, so it exercises the kinds="RC" arm and would still pass even if the kinds="R" arm were accidentally widened back to "RC" -- which would make a lawful fork-by-copy (a new packet authored as a draft copy of a ratified one, ratified later) unarchivable, the exact failure ratified_under_a_former_path's own docstring says that arm exists to avoid. Added test_a_ratified_packet_copied_as_a_draft_and_ratified_later_is_not_ refused: copies a ratified packet, flips the copy back to draft in the same commit, ratifies it later, and asserts the walk does not refuse. Verified against a local mutation (kinds="RC" unconditionally): the new fixture fails on it while the existing copy test still passes, then both pass again once the mutation is reverted. Neither change touches scripts/proposal-support.py (unmodified from 99adaa9) or what the guard refuses; the CLI contract is unchanged. Confirmed test_an_unratifying_rename_now_refuses_the_walk still fails against origin/main's pre-#849-fix guard ("OriginRetentionError not raised") and passes against this branch's guard. refs #849, #833, #846 Lane: openxfactory-2 Co-Authored-By: Claude Fable 5.1 <[email protected]> Co-Authored-By: Claude Sonnet 5 <[email protected]>
… tip (#999) * Widen the origin-retention walk to every visited commit, not just the tip The #833 refuse guard (ratifying_commit / ratified_under_a_former_path) only asked ratified_under_a_former_path about the commit whose OWN blob declares Status: ratified. A commit that renames an already-ratified packet AND un-ratifies the destination in the same commit is never such a candidate, so it was skipped, and a later, pairing-free re-ratification commit was accepted as the baseline instead -- later than the real ratification, waving through any origin mutation in between. That is #833's failure reached by a longer route, and PR #846 left it as a stated gap pinned by test_an_unratifying_rename_escapes_the_guard_a_stated_gap. ratifying_commit now calls ratified_under_a_former_path for every commit its walk visits, not only the one that declares ratified: kinds="RC" (unchanged) where the commit's own blob is ratified, kinds="R" (new, renames only) where it is not. Restricting the broadened case to true renames -- never copies -- keeps a packet honestly authored as a draft copy of an already-ratified one archivable: only a rename destroys the former path outright, so only a rename can be told apart from ordinary authoring by history alone. The refusal message is reworded to stay truthful whether or not the flagged commit itself declares ratified, while keeping every substring the existing #833 tests assert on. test_an_unratifying_rename_escapes_the_guard_a_stated_gap is repurposed into test_an_unratifying_rename_now_refuses_the_walk, asserting the walk now raises OriginRetentionError naming the rename commit rather than the re-ratification. All other origin-retention fixtures (happy path, draft rename then ratify, squash rename+ratify, copy into an already-ratified destination, hostile git config) are unchanged. refs #849, #833, #846 Lane: openxfactory-2 Co-Authored-By: Claude Fable 5.1 <[email protected]> Co-Authored-By: Claude Sonnet 5 <[email protected]> * Share the #833 refusal assertions and pin the fork-by-copy compatibility case Two fix-round items, both confined to the guard's tests. SonarCloud flagged 9.3% duplication on new code (gate: <=3%). The un-ratifying-rename regression test (test_an_unratifying_rename_now_ refuses_the_walk) asserted the same "walk refuses, names the right commit, origin_retention_errors and archive_change both stop" shape as the pre-existing test_a_ratified_change_renamed_afterwards_refuses_the_ walk, nearly line for line -- the two differ only in which commit the message must name and one #849-only substring. Both now call a new shared helper, assert_walk_refuses, that asserts the common shape once; each caller passes only what is actually different. Copilot's outstanding review thread on the kinds="R" branch (added to close #849): the sibling copy test, test_a_ratified_packet_copied_to_a_ new_id_refuses_too, copies a destination that is ALREADY ratified at the copy commit, so it exercises the kinds="RC" arm and would still pass even if the kinds="R" arm were accidentally widened back to "RC" -- which would make a lawful fork-by-copy (a new packet authored as a draft copy of a ratified one, ratified later) unarchivable, the exact failure ratified_under_a_former_path's own docstring says that arm exists to avoid. Added test_a_ratified_packet_copied_as_a_draft_and_ratified_later_is_not_ refused: copies a ratified packet, flips the copy back to draft in the same commit, ratifies it later, and asserts the walk does not refuse. Verified against a local mutation (kinds="RC" unconditionally): the new fixture fails on it while the existing copy test still passes, then both pass again once the mutation is reverted. Neither change touches scripts/proposal-support.py (unmodified from 99adaa9) or what the guard refuses; the CLI contract is unchanged. Confirmed test_an_unratifying_rename_now_refuses_the_walk still fails against origin/main's pre-#849-fix guard ("OriginRetentionError not raised") and passes against this branch's guard. refs #849, #833, #846 Lane: openxfactory-2 Co-Authored-By: Claude Fable 5.1 <[email protected]> Co-Authored-By: Claude Sonnet 5 <[email protected]> * Make kinds keyword-only on renamed_from and ratified_under_a_former_path Copilot review on PR #999: the PR description states kinds is keyword-only, but both signatures still accepted it positionally as a fourth argument -- inconsistent with origin_errors(..., *, strict) in this same module, which does enforce its own keyword-only boundary. Every existing call site already passes kinds=... by keyword or omits it (grepped scripts/ and tests/), so adding the `*` separator to both renamed_from and ratified_under_a_former_path is a pure API-boundary tightening with no behavioural change: full module test run is unaffected (85 passed, 67 subtests passed). refs #849 Lane: openxfactory-2 Co-Authored-By: Claude Fable 5.1 <[email protected]> Co-Authored-By: Claude Sonnet 5 <[email protected]> --------- Co-authored-by: Claude Fable 5.1 <[email protected]>
… on the question entirely Copilot's second round, one thread, TAKEN IN PART and REFUSED IN PART, with the measurement that settles which part is which. THE FINDING: `docs/document-lifecycle.md` is `Status: standard` and backed by `openspec/specs/document-lifecycle/spec.md`, and this amendment publishes the former-id policy before `add-declared-former-id`'s `release-realization` delta is promoted (§ 7.1 open), so `main` could advertise policy its backing spec does not carry. MEASURED, NOT ARGUED: `grep -rn "FORMER ID\|former_ids\|Renaming a ratified" openspec/specs/` returns NOTHING — 0 matches, exit 1 — and canon's promoted *Origin retention at archive* says not one word about a rename. The sentence being amended was DOCUMENT PROSE FROM THE START, landed by PR #846 beside a refusal in code, never promoted into a spec. So this edit replaces doc-only prose with doc-only prose; it contradicts no promoted requirement, and the "backing spec does not carry it" objection applies identically to the sentence standing there today. TAKEN: the citation now states the packet's OWN state so a reader knows what the sentence rests on — *"`add-declared-former-id`, the successor packet issue #833 named — RATIFIED 2026-09-13, its `release-realization` delta promoting into canon at that packet's own archive and not before; #1003"*. A reader who wants the requirement text knows where it is and that it is not canon yet. REFUSED: deferring the amendment to the promotion pull request. `tasks.md` § 5.3 is a RATIFIED task in § 5, "the reference resolver and the documents — REALIZATION", and this packet's `code_surface:` names this file; the archive (§ 7.1) is held BEHIND the realization evidence by `release-realization`'s own *Realization archive gate*, so deferring the doc to the archive inverts the order the packet was ratified with. Whether that ratified order should be departed from is not a reviewer's call and not this author's: it is Q4, it is Brett Heap's, the pull-request body says his confirmation is outstanding, and if he rules the other way commit `1ef15e86` and this one drop out and the rest stands. `tasks.md` § 5.3's own note carries the same measurement, so the packet records why the edit was lawful rather than leaving it in a review thread. Refs #1003, #833. Lane: openxfactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]>
…l land, and it is still refused where it always was Copilot's third round, one thread, TAKEN. "Stopped by nothing" was overbroad in three places, and the correction is the same in each: what is missing today is the LANDING refusal, not every refusal. PR #846's `origin-retention-path-moved` still refuses a single undeclared hop AT THE ARCHIVE and is untouched by this packet (`tasks.md` § 3.2 says so in as many words), so the honest statement is that an undeclared arrival can still LAND while the archive refusal stands — and that the multi-hop chain escapes that one, which is the whole argument for a declaration. Corrected in `docs/document-lifecycle.md` (the § 5.3 sentence), in `ratifying_commit`'s docstring, and in `tasks.md` § 5.3's own tick note, so the three places that describe the same state now describe it the same way. No behaviour moves. `openspec validate add-declared-former-id --strict` is valid, and `python3 -m pytest tests/proposal-support -q` is 199 passed, 290 subtests passed in 70.90s. Refs #1003, #833. Lane: openxfactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]>
…they left `add-declared-former-id` § 2.4, §§ 4.1-4.4 and §§ 5.0-5.2a are ticked against what LANDED, never against a branch: slice 4 as PR #1039, merge `92d519b0` (2026-09-15T19:15:01Z) — `scripts/former_id_arrival.py`, `scripts/validate-former-id-arrival.py`, `tests/former_id_arrival/test_former_id_arrival.py`, `tests/former_id_arrival/test_former_id_arrival_gate_wiring.py` and `.github/workflows/former-id-arrival-gate.yml`; and slice 5 as PR #1037, merge `8f393758` (2026-09-15T19:02:27Z) — `scripts/packet_reference.py`, `tests/packet_reference/test_packet_reference.py`, the `check_citations` arm of `scripts/validate-pin-registrations.py` and `tests/pin_registrations/test_pin_registration_sweep.py`. Every reader, every commit and every fixture named under a box was verified to exist on `main` before it was written down. The § 2 preamble said a narrower thing and now says the true one. BRETT HEAP'S RULINGS OF 2026-09-15, each written under the box it settles with the recording URL beside it. * **Q4 - "Yes, task 5.3 is authority"** (19:00Z, #1003 comment 5686436893). The amendment of `docs/document-lifecycle.md` - `Status: standard`, ratified by PR #846's act - rests on this packet's own ratified task § 5.3, which commissions the edit by quoting the exact sentence, plus `proposal.md`'s `code_surface:`, which names the file. No separate amendment route, and not deferred to promotion. § 5.3's "Q4 IS OUTSTANDING" paragraph is replaced by the ruling; the phrase survives nowhere in this packet. * **Q1 - "Dedicated required check"** (same record). The arrival gate stays a dedicated workflow and the context to require is the job id `former-id-arrival-gate`. § 4.5 STAYS UNTICKED: the shape is ruled, the act is his console act and it is not performed. Re-measured live at 2026-09-15T19:41Z, `GET /repos/opensoft/openxFactory/rules/branches/main` still returns three required-status-check rules and the gate is in none of them, so it runs and refuses nothing. * **Q2 - "Yes, with disposition + carry-forward issue"** (same record). The packet may archive with § 4.5 open, carrying the disposition plus a carry-forward issue, on the `add-signed-execution-chain` precedent (its own § 4.5/4.6 archived open at openxFactory issue #534, requirement 9 reaching canon meeting its own degraded case). The self-report is CITED where it already stands - `.github/workflows/former-id-arrival-gate.yml:13-21` and `:23-32` - rather than duplicated, and the one place the precedent had that this packet does not is named: the CLI itself emits no warning. FILING the carry-forward issue is the orchestrator's act at the archive, on his word, and is not performed here. * **Q5 - "File it after #1041 lands"** (19:0xZ, #1003 comment 5686628685). § 6.1's successor is filed as a routing record, not claimed, after this pull request lands. Filing is a reserved act; the box stays open. * **"Close when #1041 lands"** (same record). Recorded under § 7.2 AS A DEPARTURE rather than papered over: that box reads "AT THE ARCHIVE PULL REQUEST AND NOWHERE ELSE" and his ruling puts the closing earlier, at this slice's landing. It is his call, the box says so itself, and the box stays open because the act has not happened. Nothing on this branch carries a closing keyword against #1003 in any form. `docs/document-lifecycle.md` § 5.3's enforcement clause is RE-DATED and not rewritten: it said "as measured on 2026-09-14 that gate had not landed on `main`", which stopped being true at `92d519b0`. It now says the gate HAS landed and RUNS on every pull request, is named by no branch ruleset, and that an undeclared arrival therefore sees a red check beside a merge button that works. The rule and its enforcement stay stated separately; the ratified sentence and the promoted clause "renaming a DRAFT change, and a single commit that renames a draft and ratifies it, are unaffected" are untouched. § 5.4's figures are DATED rather than re-asserted: 104 / 64 / 40 is the reading at `701c8fde` on 2026-09-14, and the tree has moved twice since, an archive being exactly the act that moves this population. What the successor gains instead of a third re-implementation of M4's uncommitted recipe is named - § 5.1's resolver is committed and tested, separates the identity half from the file half, and will not read 104 / 64 / 40 because the extraction recipe differs and not because the corpus changed. LEFT OPEN, with the owner under each: § 4.5 (his console act), §§ 6.1-6.5 (residue), § 7.1 (the archive and the promotion) and § 7.2 (the closing). Thirty-one boxes ticked, eight open. Refs #1003. Lane: openxfactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]>
Lane: openxfactory-1 (openXfactory-1)
Continuation (second): two prior authors stopped mid-work — the first on a rate limit at
62bea179, the second after pushing6f691527; this session continued from the branch, audited it against the ruling on #833, and pushedf62126c3andea61cfae. Every figure below has been RE-MEASURED on the current headea61cfaeagainstorigin/main6df21737(which has advanced by #845 since the last measurement) — the refusal wording and the negative control are from runs on this head, not transcribed — and what each continuation changed is at the end.The defect (measured, issue #833)
proposal_support.ratifying_commitresolves the origin-retention baseline by walking one path —openspec/changes/<change>/proposal.md, the id the tree spells today — and its own docstring already names the failure that matters:A ratified change whose directory is renamed produces exactly that: there is no history under the new name before the rename, so the first ratified blob the walk finds is the rename commit. Measured on issue #777 —
bump-openspec-cli-pin-to-1.12(ratified007d887b, 2026-09-05) renamed on a trial branch — where the gate printedORIGIN RETAINEDagainst a baseline four days later than the ratification, waving through every mutation in between. The two sibling--archive-gatearms (validate-sequenced-after.py,validate-scope-globs.py) refused loudly on the same tree, because they resolve BY ID at a ref (sequenced_after.proposal_path_at_ref) and say so when the id has no proposal there. The retention walk did not, and there is no bypass flag on this gate by design (#690, after #685).The guard
scripts/proposal-support.py— the walk now asserts what a ratifying commit is: a FLIP, and a flip's parent does not already declareratified.renamed_from(root, revision, rel)— the pathrelwas renamed or copied from at one commit, via git's own detection through--follow(the one mode that pairs a rename for a single path; a pathspec-limited diff filters the source side out before detection runs and reports a plainA— re-measured on the fixture:git log --follow … -1 <rename> -- <new path>reportsR100,git show --name-status --find-renames … -- <new path>reportsA). Bounded to one commit with-1 <revision>; a pairing counts only when its destination isrelitself.--followFORCES rename detection, so no git config can switch the guard off — re-measured on git 2.43.0,diff.renames=falseanddiff.renameLimit=1still report the pairing, and a fixture now carries that hostile config in its own.git/configand asserts the refusal over it.ratified_under_a_former_path(root, revision, rel)— the former path, when the packet already declaredStatus: ratifiedthere at<revision>^. Renaming a DRAFT stays lawful, and so does a single commit that renames a draft and ratifies it (the squash shape this repository lands everything as): both answerNone.OriginRetentionError— CANNOT RUN, exit 2 throughmain's existing handler, no traceback, no bypass — naming the change, the path at the candidate commit, the current path, the candidate sha and that the baseline cannot be established without a former-id declaration, citing 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.origin_retention_errorsdeliberately does not catch it: this is not a comparison that failed but the comparison being impossible, so it is not one more line in a findings list.Refusal wording, verbatim from a real CLI run (
proposal-support.py <fixture> archive change-s --yes, exit 2, stderr, no traceback):(
8db2e8aee549is the fixture's own rename commit — the sha is whatever the moved packet's history holds; the wording above is byte-for-byte what the CLI printed on this head, exit 2, stderr,Tracebackabsent. The COPY fixture prints the same wording, which is why the message says MOVE OR COPY and names the discriminator an operator can check: whether the former path still stands.)Former-id support is a later packet. Following a ratified change across a declared rename — the full remedy in #833's option (b) — needs an id declaration this corpus does not have; nothing here invents one from rename detection, and where detection finds no pairing at all (a move that also rewrote
proposal.mdpast git's similarity threshold, or a delete-and-add in separate commits) the pre-#833 behaviour stands, stated in the docstring rather than papered over. The blunt edge is stated too: a packet authored as a near-verbatim copy of an already-ratified one, entering history ratified, pairs the same way and takes the same refusal — history alone cannot separate "this moved" from "this was copied", which is what a former-id declaration would settle, so the ambiguous case answers CANNOT RUN rather than guessing. Zero packets in this corpus trip it (below).Fixtures + the negative control
tests/proposal-support/test_proposal_support.py— eleven tests added toOriginRetentionAtArchiveTests(which builds real git history, as the gate reads real git history):git mv+ commit)CANNOT RUN, change id, both paths, the candidate sha,FORMER ID,baseline cannot be established,#833;origin_retention_errorsandarchive_changeboth raise; the CLI exits 2 with the code on stderr and no traceback9ec13c1aactually is)MOVE OR COPY,COPIED, both ids, and the old directory asserted still standingdiff.renames=false,diff.renameLimit=1in the fixture's own.git/config)[]findingsrenamed_frompairs the move,ratified_under_a_former_pathanswersNone, baseline is that commit,[]findingsNone, baseline is the flip, and the gate still passes it end to end (origin_retention_errors→[])Nonebaseline,not ratifiedfinding — the draft arm is not hijackedHEAD, an annotated tag)Nonerather than raisingNegative control. The renamed fixture on the unfixed
scripts/proposal-support.pyfromorigin/main6df21737, same history, same call — re-run for this continuation, both modules driven against one fixture apiece from the same builder:ORIGIN RETAINED, zero findings, baseline = the rename — with a post-ratification origin mutation sitting in the history between the two. The control is also pinned inside the fixture, so it holds whatever the code does: the origin at the rename commit EQUALS the working tree's (a baseline taken there finds nothing) while the origin at the real ratifying commit DIFFERS (there is a mutation to catch). The pre-fix module also printsORIGIN RETAINEDunder the hostile git config, where this branch still refuses.Mutation checks, all four re-measured on this head over
pytest tests/proposal-support:ratified_under_a_former_path→return None(guard disabled)HEADand annotated-tag subtests; the full-hash subtest passes, which is exactly why nothing caught this before--find-renamesdropped--followis what forces detection, so the flag is a belt and the property it was credited with is held by the hostile-config fixtureLive corpus (re-measured at
f62126c3, againstorigin/main6df21737)python3 scripts/proposal-support.py . verify <change>looped over every active change: 42 green, 0 failures on this branch, and 41 green, 0 failures onorigin/mainand on the local merge of this branch into it (main archived one packet in Archive govern-archived-record-edits: the archived-record edit rule promotes into document-lifecycle (archive act on Brett Heap's word "archive both") #845 after this branch last merged it, which is the whole of the difference).mainmodule's — 189 compared, 0 differences. The guard is a proven no-op on the lawful corpus.pytest tests/proposal-support tests/sequenced_after -q:origin/main330 passed, 2 subtests; this branch 341 passed, 48 subtests (+11 tests, +46 subtests = one per active change in the corpus sweep, plus four spellings of one commit). On the local merge with main: 341 passed, 47 subtests (one fewer active change to sweep). None skipped.pytest tests/doc-health -q— the other suite that loads this module (test_proposal_origin.pydrives the gate wiring): 1635 passed.python3 scripts/doc-health.py --single-repo .: exit 0. Run on the local merge with main and diffed against main's own run, the findings are identical — 91 finding lines,10 critical, 8 error, 57 warning, 16 info. New regressions vs previous report: 0— and the ONLY two differing lines in the whole report are the canon word count (+153 words) and thestandardrow that carries it, from the one documentation bullet. The finding lines are byte-identical across every head this branch has had.What the continuation changed
The first author's head
62bea179already carried the guard, the docs paragraph and eight fixtures.fa785ff5adds, after auditing the branch against the ruling:--find-renamesoverclaim corrected, and the property it was credited with pinned by a fixture —--followforces detection (measured with the flag and without it, underdiff.renames=false+diff.renameLimit=1), so the hostile config now appears in a fixture rather than in a promise.cannot be established, and the never-moved ratified packet is asserted unchanged end to end (origin_retention_errors→[]), not only at the walk.Plus a merge from
main(98081b34) so the branch measures the current corpus.6f691527then answers the two bench findings, both with measurement rather than assent:--find-copiesis not needed and default settings do not miss the copy:--followturns copy detection on for the followed path, and a copied packet reportsC100with the flag, without it, and underdiff.renames=false(git 2.43.0,diff.renamesunset repo-locally and globally in the fixture). The standing proof is the copy fixture, which passes on a default-configured runner. Now stated inrenamed_from's docstring.Both threads are replied to and resolved.
f62126c3(this continuation) takes the one bench finding that was left unanswered — Copilot's third round raised it as a suppressed comment, so it opened no thread and nothing was owed to it procedurally:renamed_fromrecognised only a full 40-hex revision. The pairing is matched by comparing git's own%Hagainst the revision asked about, soHEAD,HEAD~1, an annotated tag or an abbreviated hash all compared unequal and were answeredNone— no pairing, no refusal, 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 back through a caller instead of through a config. The revision is now resolved first (rev-parse --verify <revision>^{commit}, which also peels an annotated tag) and an unresolvable revision answersNone, as an unreadable history already did. It changes no answer in this corpus — the sole caller passes a full hash straight out ofgit log --format=%H, and the 189-packet sweep still refuses 0 with 0 baselines moved — and is taken anyway because silent NON-detection is the failure class this guard exists to end: a guard that can be switched off by naming its commit differently is the same defect as one a git config can switch off. Pinned over four spellings, and mutation-checked (table above).ea61cfaethen takes the bench's fifth round, whose three suppressed findings all make one point:renamed_fromaccepts git'sC*pairing as well as itsR*one — a "rename" that leaves the old directory standing is a duplicated packet, and a fixture has pinned the copy refusal since the guard landed — but the refusal message, theOriginRetentionErrordocstring and the lifecycle bullet described only a move. In the copy case nothing moved and the old id is still in the tree, so that wording sent an operator hunting a rename that is not in the history. All three now say MOVE OR COPY and the message states the discriminator the operator can check: if the former path still stands, the packet was COPIED to this id rather than moved to it. No behaviour changed — the same commits refuse, the same commits pass — and the copy fixture now asserts the wording and that the old directory still stands, so a successor cannot narrow the message back to renames while a copy still refuses.The audit found nothing else owed: the ruled refuse guard, all four fixtures the ruling names (renamed-after-ratification refuses, unrenamed unchanged, draft unchanged, negative control on the unfixed module) and the docs bullet were already on the branch and were re-verified here rather than re-authored.
The gap this does NOT close, stated and filed (issue #849)
Codex raised it as a P1 and it is real: the guard asks its question of the CANDIDATE commit, so a commit that renames an already-ratified packet AND un-ratifies the destination is never a candidate, the later re-ratification carries no pairing, and the walk takes that re-ratification as its baseline — #833's failure by a longer route.
The obvious closure is a HOP CHAIN — walk
git log --followover the path and refuse on any rename/copy hop whose SOURCE declaredStatus: ratifiedat that hop's parent. Probed over every packet here (189 = 42 active + 147 archived): 4 carry a hop before their baseline, all four with a DRAFT source, and the hop-chain guard would refuse 0 of the 189. A no-op today, and still not taken, because history cannot separate that shape from a NEW packet authored as a COPY of a ratified one, entering as a draft and ratified later — ordinary authoring, and identical in git (source ratified at the hop's parent, destination not ratified at the hop). A hop-chain guard refuses both, and this gate has NO bypass flag by design (#690, after #685), so a lawful fork-by-copy would be permanently unarchivable until a former-id declaration landed.So the line stays where the destination enters RATIFIED; the gap is stated in
ratified_under_a_former_path's docstring with the probe figures, filed as issue #849 for the former-id packet (#833's option (b)) to take, and pinned bytest_an_unratifying_rename_escapes_the_guard_a_stated_gap— which builds that exact history and records that the walk answers[], so a successor flips it deliberately rather than by accident.Scope
scripts/proposal-support.py,tests/proposal-support/test_proposal_support.py, and one paragraph indocs/document-lifecycle.md(the archive-gate bullet already enumerating the gate's arms). Noopenspec/path touched; no contract, schema or workflow moved.No OpenSpec change — plain remedy per the #638 precedent, on Brett Heap's word 2026-09-09 ("lets do 3 item you recomend").
Closes #833
🤖 Generated with Claude Code
https://claude.ai/code/session_011pPD2SfAZtmh8qC3VAimXw