Skip to content

State the multi-hop rename-chain gap in ratifying_commit's docstring, and pin it - #1027

Merged
brettheap merged 1 commit into
mainfrom
fix/1003-interim-pin-multi-hop-gap
Sep 13, 2026
Merged

brettheap merged 1 commit into
mainfrom
fix/1003-interim-pin-multi-hop-gap

Conversation

@brettheap

@brettheap brettheap commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

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_commit ask every commit its outer walk visits, not only the one that ends up declaring ratified. 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_commit returns the later re-ratification, origin_retention_errors reports 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.

  1. ratifying_commit's docstring: one new paragraph pair naming the shape precisely, stating it is deliberate and open pending add-declared-former-id, and quoting the ruling's stated reason for declining a longer walk.
  2. One fixture in 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 pattern test_an_unratifying_rename_now_refuses_the_walk followed for the single-hop shape before Widen the origin-retention walk to every visited commit, not just the tip #999 closed it.
  3. 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 of origin/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 on main, unrelated to this change; no openspec/ path touched here.

refs #1003 only. 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:

  • Document the deliberate multi-hop rename-chain limitation in ratifying_commit, including its intended future resolution through declared former IDs.

Tests:

  • Add a regression fixture that reproduces and pins the multi-hop un-ratifying rename-chain gap, including the current baseline and absence of origin-retention errors.

…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]>
Copilot AI lite review requested due to automatic review settings September 13, 2026 05:05

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @brettheap, 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.

@sourcery-ai

sourcery-ai Bot commented Sep 13, 2026

Copy link
Copy Markdown

Reviewer's Guide

This 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 gap

sequenceDiagram
    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
Loading

File-Level Changes

Change Details Files
Document the deliberate multi-hop rename-chain limitation in ratifying_commit.
  • Explain why the current-name-bounded git walk misses an earlier un-ratifying hop.
  • Record the ruling’s rationale for deferring a lineage walk and identify add-declared-former-id as the intended remedy.
scripts/proposal-support.py
Add a regression fixture that pins the currently accepted multi-hop behavior and its real origin-retention consequence.
  • Construct ratify → mutate → rename/un-ratify → rename while draft → re-ratify history across separate commits.
  • Assert the later re-ratification is selected and no origin-retention errors are reported.
  • Document that the fixture should flip to refusal when the declared-former-id successor lands.
tests/proposal-support/test_proposal_support.py

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@brettheap

Copy link
Copy Markdown
Contributor Author

@codex review

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: d6e5969ecf

ℹ️ 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".

@sonarqubecloud

Copy link
Copy Markdown

@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-1 (openXfactory-1)

FREEZE — 2026-09-13T05:26Z

  • Head: d6e5969ecfd1adfc1a5ca48db4c799a46c48c879, ready (not draft), open.
  • Unresolved review threads: 0/0 (reviewThreads.totalCount via GraphQL).
  • closingIssuesReferences: [] (checked immediately after opening and again now).
  • Bench: closed after round 1 — Copilot recommended approval (0 comments generated, 0 threads); Codex's reply on this head found no issues ("Didn't find any major issues"); Sourcery posted only its descriptive reviewer's guide (rate-limited out of a full review) — nothing actionable from any bencher.
  • pytest-suite: run 34739449100, conclusion success (19m28s).
  • Six required checks, all SUCCESS on this head: lane-line, openspec-cli-pin, pytest-suite, release-tag-gate, signed-execution-chain-gate, wallet-validation. Advisory, all decided: clearing-dispatch-gate pass, merge-master-approval pass, openreposhape-pin pass, SonarCloud Code Analysis pass (quality gate passed, 0 new issues), Sourcery review skipping (rate limit).
  • Gate figures (branch d6e5969e vs a control worktree of origin/main 9378eca5): pytest tests/proposal-support -q 130 passed/72 subtests vs control 129 passed/72 subtests (+1 test, 0 failures, 0 new skips); proposal-support.py . verify exit 0 both; doc-health.py --single-repo . exit 0 both, byte-identical after normalising the checkout-name token (31 critical, 9 error, 26 warning, 23 info, 0 new regressions each); openspec validate --all --strict byte-identical both (104 passed, 3 failed, 107 items — pre-existing on main, no openspec/ path touched here).

refs #1003 only. Not landing this PR; #1003 stays open for Brett Heap's word.

@brettheap

Copy link
Copy Markdown
Contributor Author

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 d6e5969ecfd1adfc1a5ca48db4c799a46c48c879: six required checks SUCCESS (lane-line, openspec-cli-pin, pytest-suite, release-tag-gate, signed-execution-chain-gate, wallet-validation); closingIssuesReferences = []; 0 unresolved threads; main's newest decided pytest-suite = success; no other-lane open LANDING into opensoft/openxFactory main (who --landing). mergeStateStatus BLOCKED = the code-owner-review ruleset that never clears on the author's own account; admin merge on Brett Heap's recorded word (interim pin of the #1003 multi-hop gap (ruling point 2; refs #1003 only); plain fix, admin merge commit; Brett Heap word 2026-09-13T22:41Z verbatim "land 1027"). Merge = merge commit.

@brettheap
brettheap merged commit 04340d7 into main Sep 13, 2026
13 checks passed
@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-1 (openXfactory-1)

LANDED — lane openxfactory-1, session ea50c958-b384-4f43-b073-0540ec00231a@0e7d1a79a07e, 2026-09-13T22:43:03Z, PR #1027 into opensoft/openxFactory main → 04340d7

brettheap added a commit that referenced this pull request Sep 14, 2026
…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]>
brettheap added a commit that referenced this pull request Sep 15, 2026
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants