Repository navigation
State the multi-hop rename-chain gap in ratifying_commit's docstring, and pin it - #1027
Conversation
…g, and pin it Issue #1003 (Copilot's review of PR #999): the origin-retention walk's outer `git log` is bounded to the change's CURRENT path, so it visits the commit that renames the packet INTO its present name and nothing earlier. A chain of two rename hops — ratify, rename-and-un-ratify in one commit, rename again while draft in a separate commit, ratify under the third name — puts the un-ratifying hop and the landing hop in different commits: the landing hop's own parent is already a draft, so the one-hop-back check finds nothing amiss, and the commit that actually carried the ratified-to-draft flip is never visited at all. `ratifying_commit` returns the later re-ratification, and a mutation made after the real ratification is waved through — the #833 failure, reached by a second rename hop instead of one. Brett Heap's ruling on #1003, 2026-09-13 ("option 2 on 1003 with the fix"), takes the declared-former-id mechanism (`add-declared-former-id`, a successor packet under #1003) as the actual fix, and rules its interim half here: state the gap, deliberately left open, and pin today's acceptance with a fixture — not a longer lineage walk, which the ruling declines as "history-walking archaeology that cannot carry the intent bit distinguishing rename-of-ratified from lawful fork-by-copy, and code that would be deleted when the declaration mechanism lands." `ratifying_commit`'s docstring now names the shape and cites both the gap and its successor. A new fixture builds the chain, mutates the origin after the true ratification, and asserts today's actual answer: the baseline is the later re-ratification, not the real one, and `origin_retention_errors` returns `[]` — expected to flip to a refusal once the successor lands. `docs/document-lifecycle.md` is unchanged. PR #846's own precedent documented the origin-retention guard's positive refusal there, but never stated the #849 gap it filed in that file — only in the code docstring and a fixture — so this interim half matches that manner by leaving the doc alone too. Measured on this head: `pytest tests/proposal-support` 130 passed / 72 subtests (control `origin/main` at 9378eca: 129 passed / 72 subtests; +1 test, 0 failures, 0 new skips). `proposal-support.py . verify` exit 0 on both. `doc-health.py --single-repo .` exit 0 on both, findings byte-identical after normalising the checkout-name token (31 critical, 9 error, 26 warning, 23 info; 0 new regressions on each). `openspec validate --all --strict` byte-identical on both (104 passed, 3 failed — pre-existing on main, no openspec path touched here). 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 12 hours by commenting @sourcery-ai review. Upgrade to get a review now.
Reviewer's GuideThis interim PR explicitly records issue #1003’s deliberate multi-hop rename-chain gap and adds a focused fixture proving and pinning the current fail-open result, without changing production behavior or touching the eventual declared-former-id remedy. Sequence diagram for the pinned multi-hop rename-chain gapsequenceDiagram
participant R as ratifying_commit
participant G as git log for current id t
participant C as Commit history
participant T as test fixture
T->>R: ratifying_commit(root, change)
R->>G: Walk commits touching current path t
G->>C: Visit s-to-t rename
C-->>R: Parent is already draft
G->>C: Visit later ratification of t
C-->>R: Return later re-ratification
R-->>T: baseline = later re-ratification
T->>T: origin_retention_errors = []
Note over C: Earlier r-to-s commit performed the true un-ratifying flip
Note over G,C: r-to-s never touched current path t, so it is not visited
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.
🟢 Approval recommended
The documented gap and regression fixture are fully reviewed with no unresolved blocking issues.
Pull request overview
Documents and pins the known multi-hop rename-chain gap without changing runtime behavior.
Changes:
- Documents the deliberate limitation in
ratifying_commit. - Adds a regression fixture preserving current behavior.
File summaries
| File | Description |
|---|---|
tests/proposal-support/test_proposal_support.py |
Adds a fixture reproducing and pinning the multi-hop gap. |
scripts/proposal-support.py |
Documents the limitation and planned former-ID remedy. |
Review details
- Files reviewed: 2/2 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.
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ 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". |
|
|
Lane: openxfactory-1 (openXfactory-1) FREEZE — 2026-09-13T05:26Z
|
|
Lane: openxfactory-1 (openXfactory-1) LANDING — lane openxfactory-1, session ea50c958-b384-4f43-b073-0540ec00231a@0e7d1a79a07e, 2026-09-13T22:42:51Z, PR #1027 into opensoft/openxFactory main Guard at 2026-09-13T22:42:55Z on head |
…this commit does not carry Copilot's four findings on PR #1041, all four TAKEN. Each is the same defect seen from four sides: prose written as though slice 4 had already landed. 1. `docs/document-lifecycle.md` (§ 5.3's sentence) presented `scripts/validate-former-id-arrival.py` as a gate the reader could run, on a tree that carries no such file. The sentence now names the gate as the one `add-declared-former-id` § 4 BUILDS and then says the rule and the enforcement separately, dated: as measured 2026-09-14 that gate had not landed on `main` (§ 4.1–4.4) and was named by no branch ruleset (§ 4.5), so until both are done an undeclared arrival is refused by the rule and stopped by nothing. Canon now states a rule that is canon and an enforcement that is not yet in place, rather than blurring the two. 2. `tasks.md`'s amendment header claimed "§§ 2 AND 3 ARE BUILT" while § 2.4 stands open three screens below — a top-level claim contradicting the boxes. It now reads "§ 2 EXCEPT § 2.4, AND ALL OF § 3", and says why § 2.4 is slice 4's: it is the one § 2 task that reads a COMMIT RANGE. 3. `ratifying_commit`'s docstring called the arrival gate the validator "this packet realizes", on a file where it is not beside the reader. It now says the gate is a SEPARATE LANDING (slice 4, PR #1039), that a checkout predating that merge carries this walk and no such validator, and that REQUIRING the check is a further act again (§ 4.5). 4. The #1027 fixture's docstring said an undeclared r→s hop "can never be created in the first place". Not yet: with § 4.5 outstanding the branch rules require no such check, so a commit of exactly that shape can still land. The sentence is now conditioned on the gate being REQUIRED, and says what does not change either way — WHERE the refusal belongs. No behaviour moves: three docstrings and one sentence of canon prose. `OPENSPEC_TELEMETRY=0 openspec validate add-declared-former-id --strict` is valid, `proposal-support.py . verify add-declared-former-id` is ok, and `python3 -m pytest tests/proposal-support -q` is 199 passed, 290 subtests passed in 69.00s. Refs #1003, #833. Lane: openxfactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]>
…ate reports before it enforces Two Codex P2 findings on b1c6a9e, both staleness against the tree this branch documents. tasks.md § 2.6 said its production caller was "in flight"; it landed with slice 4 (PR #1039, merge 92d519b), and scripts/former_id_arrival.py calls former_identity_ownership_problems on every run. The #1027 fixture's docstring said the refusal was "reported and enforced by nothing" until both acts occur; the workflow reports on every pull request today, and only enforcement waits on § 4.5. Refs #1003. Lane: openxfactory-1 Co-Authored-By: Claude Fable 5.1 <[email protected]>



Lane: openxfactory-1 (openXfactory-1)
The interim half of Brett Heap's ruling on #1003, 2026-09-13 (verbatim: "option 2 on 1003 with the fix"). The ruling comment: #1003 (comment) — point 2: "the multi-hop gap documented in
ratifying_commit's docstring and pinned with a fixture (the #846 precedent), so the open gap is on the record as deliberate." The permanent remedy — a declared former-id, encoded fail-closed on the undeclared case — is a separate OpenSpec change,add-declared-former-id, claimed under #1003 and authored in parallel; this PR does not touch it. Option 1 (the full rename-lineage walk, PR #1024, now retired in favor of the option-2 packet) and option 3 (an interim chain guard) were not selected — the ruling declines both as "history-walking archaeology that cannot carry the intent bit distinguishing rename-of-ratified from lawful fork-by-copy, and code that would be deleted when the declaration mechanism lands."The gap. #849 closed the single-hop shape — a commit that renames an already-ratified packet and un-ratifies it in the same breath, re-ratified later under the same name — by having
ratifying_commitask every commit its outer walk visits, not only the one that ends up declaringratified. That outer walk is still bounded to ONE path, the change's current id, so it only ever visits the commit that renames the packet INTO its present name and whatever comes after. Issue #1003 (routed from Copilot's review of #999) reproduces a chain one hop longer: ratify → rename-and-un-ratify in one commit → rename again while still draft, in a separate commit → ratify under the third name. The un-ratifying hop and the hop that lands the current name are now two different commits: the landing hop's own parent is already a draft (the un-ratify happened earlier, under the packet's previous name), so the one-hop-back check finds nothing amiss, and the commit that actually carried the ratified-to-draft flip is never visited at all — it never touched the current path.ratifying_commitreturns the later re-ratification,origin_retention_errorsreports nothing, and a real origin mutation sitting between the true ratification and the resolved baseline is waved through — the #833 failure, reached by a second rename hop instead of one.What this PR does.
ratifying_commit's docstring: one new paragraph pair naming the shape precisely, stating it is deliberate and open pendingadd-declared-former-id, and quoting the ruling's stated reason for declining a longer walk.OriginRetentionAtArchiveTests—test_an_unratifying_rename_chain_escapes_the_guard_a_stated_gap— that builds exactly that chain (with a genuine origin mutation after the true ratification, so the fixture proves real stakes rather than a vacuous non-refusal) and pins today's answer: baseline = the later re-ratification,origin_retention_errors=[]. Named and documented, per house convention, to flip to a refusal once the successor lands — the same patterntest_an_unratifying_rename_now_refuses_the_walkfollowed for the single-hop shape before Widen the origin-retention walk to every visited commit, not just the tip #999 closed it.docs/document-lifecycle.md: unchanged. PR The origin-retention walk refuses a moved path instead of silently re-basing to the rename commit #846's own docs edit stated the guard's positive refusal, but never stated the 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 gap it filed there — only in the code docstring and a fixture — so this interim half matches that manner rather than The origin-retention walk refuses a moved path instead of silently re-basing to the rename commit #846's.Nothing else. No change to any other behaviour, no new helper, no
openspec/path.Figures, measured on this head (
d6e5969e) and a control worktree oforigin/main(9378eca5):pytest tests/proposal-support -q: branch 130 passed / 72 subtests; control 129 passed / 72 subtests. +1 test, 0 failures, 0 new skips either side.python3 scripts/proposal-support.py . verify: exit 0 on both, identical output.python3 scripts/doc-health.py --single-repo .: exit 0 on both; findings byte-identical after normalising the checkout-name token (oxf/control-main) — 31 critical, 9 error, 26 warning, 23 info, 0 new regressions on each.OPENSPEC_TELEMETRY=0 openspec validate --all --strict: byte-identical on both (104 passed, 3 failed, 107 items) — a pre-existing condition onmain, unrelated to this change; noopenspec/path touched here.refs #1003only. Issue #1003 stays open throughout; if and when that changes is Brett Heap's word to give.🤖 Generated with Claude Code
Summary by Sourcery
Record and pin the known multi-hop rename-chain gap in ratification checks without changing current behavior.
Enhancements:
ratifying_commit, including its intended future resolution through declared former IDs.Tests: