Skip to content

The origin-retention walk refuses a moved path instead of silently re-basing to the rename commit - #846

Merged
brettheap merged 8 commits into
mainfrom
fix/origin-retention-refuses-a-moved-path
Sep 9, 2026
Merged

brettheap merged 8 commits into
mainfrom
fix/origin-retention-refuses-a-moved-path

Conversation

@brettheap

@brettheap brettheap commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

Lane: openxfactory-1 (openXfactory-1)

Continuation (second): two prior authors stopped mid-work — the first on a rate limit at 62bea179, the second after pushing 6f691527; this session continued from the branch, audited it against the ruling on #833, and pushed f62126c3 and ea61cfae. Every figure below has been RE-MEASURED on the current head ea61cfae against origin/main 6df21737 (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_commit resolves 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:

--full-history --topo-order --reverse rather than a plain --reverse, because MISSING the earliest ratified blob is the failure that matters: the walk would then take a LATER commit as the baseline and wave through every mutation made between the real ratification and it.

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 (ratified 007d887b, 2026-09-05) renamed on a trial branch — where the gate printed ORIGIN RETAINED against a baseline four days later than the ratification, waving through every mutation in between. The two sibling --archive-gate arms (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 declare ratified.

  • renamed_from(root, revision, rel) — the path rel was 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 plain A — re-measured on the fixture: git log --follow … -1 <rename> -- <new path> reports R100, git show --name-status --find-renames … -- <new path> reports A). Bounded to one commit with -1 <revision>; a pairing counts only when its destination is rel itself. --follow FORCES rename detection, so no git config can switch the guard off — re-measured on git 2.43.0, diff.renames=false and diff.renameLimit=1 still report the pairing, and a fixture now carries that hostile config in its own .git/config and asserts the refusal over it.
  • ratified_under_a_former_path(root, revision, rel) — the former path, when the packet already declared Status: ratified there 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 answer None.
  • When it answers a path, the walk raises OriginRetentionError — CANNOT RUN, exit 2 through main'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_errors deliberately 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):

REFUSE origin-retention-path-moved: change-s: the origin-retention walk CANNOT RUN. Its baseline is the first commit whose `openspec/changes/change-s/proposal.md` declares `Status: ratified`, and that commit (8db2e8aee549) is not the ratification but a MOVE OR COPY: the packet already declared `Status: ratified` at `openspec/changes/change-r/proposal.md` as of 8db2e8aee549^, so this change was ratified under a path that is not the one it occupies now (`openspec/changes/change-s/proposal.md`) — and if `openspec/changes/change-r/proposal.md` still stands in the tree then the packet was COPIED to this id rather than moved to it, which git pairs the same way and which leaves the same baseline unestablishable. Taking 8db2e8aee549 as the baseline would compare the packet against itself as of that commit and wave through every origin mutation made between the real ratification and it — the `ORIGIN RETAINED` measured on issue #777 and the failure issue #833 names. Nothing in this corpus declares a FORMER ID, so the baseline cannot be established from history alone and this walk refuses rather than re-basing onto that commit: archive change-s under the id it was ratified with, or land the former-id declaration (a later packet) before renaming a ratified change. Renaming a DRAFT change is unaffected.

(8db2e8aee549 is 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, Traceback absent. 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.md past 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 to OriginRetentionAtArchiveTests (which builds real git history, as the gate reads real git history):

fixture expected
ratified, origin mutated, then renamed (git mv + commit) REFUSES: code, CANNOT RUN, change id, both paths, the candidate sha, FORMER ID, baseline cannot be established, #833; origin_retention_errors and archive_change both raise; the CLI exits 2 with the code on stderr and no traceback
ratified packet copied to a second id (old left standing — the shape 9ec13c1a actually is) REFUSES, and the message says so: MOVE OR COPY, COPIED, both ids, and the old directory asserted still standing
the same rename under a hostile git config (diff.renames=false, diff.renameLimit=1 in the fixture's own .git/config) REFUSES — the guard is not configurable off
draft renamed, ratified afterwards unchanged: baseline is the flip, [] findings
one commit that renames a draft and ratifies it unchanged: renamed_from pairs the move, ratified_under_a_former_path answers None, baseline is that commit, [] findings
never moved (ratified, unrenamed) unchanged: both helpers answer None, baseline is the flip, and the gate still passes it end to end (origin_retention_errors → [])
draft, never ratified, then moved unchanged: None baseline, not ratified finding — the draft arm is not hijacked
ratified, then renamed AND un-ratified in one commit, then re-ratified A STATED GAP, pinned (issue #849, Codex's P1): not refused, baseline is the re-ratification — see "the gap" below
the same rename asked about under four spellings of one commit (full hash, abbreviated hash, HEAD, an annotated tag) REFUSES on every spelling — and an unresolvable revision answers None rather than raising
every active change in this repository the guard refuses nothing (one subtest per change; no count is written into the test — the invariant is zero refusals over whatever is active)

Negative control. The renamed fixture on the unfixed scripts/proposal-support.py from origin/main 6df21737, same history, same call — re-run for this continuation, both modules driven against one fixture apiece from the same builder:

=== PRISTINE main (pre-fix) ===
real ratifying commit : 01d89c696c8f  (origin: 'quoting the ratified prose')
rename commit         : 4873df9fc3e9  (origin: 'quoting the corrected prose' — the MUTATION)
ORIGIN RETAINED change-s (declaration unchanged since the ratifying commit 4873df9fc3e9)
origin_retention_errors -> []
baseline the walk took  -> 4873df9fc3e9

=== THIS BRANCH ===
real ratifying commit : 4cd87f226b48  (origin: 'quoting the ratified prose')
rename commit         : 0e8cb2c42e84  (origin: 'quoting the corrected prose' — the MUTATION)
RAISED OriginRetentionError, exit-2 arm:
REFUSE origin-retention-path-moved: change-s: the origin-retention walk CANNOT RUN. …
CLI exit -> 2; traceback in stderr -> False

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 prints ORIGIN RETAINED under the hostile git config, where this branch still refuses.

Mutation checks, all four re-measured on this head over pytest tests/proposal-support:

mutant result
ratified_under_a_former_path → return None (guard disabled) 8 failures — the four refusal fixtures, plus all four subtests of the spelling fixture
the parent-is-a-draft check dropped (any pairing refuses) 1 failure — the rename-and-ratify-in-one-commit fixture, so the fixtures pin non-refusal as well as refusal
the revision resolution dropped 3 failures — the abbreviated-hash, HEAD and annotated-tag subtests; the full-hash subtest passes, which is exactly why nothing caught this before
--find-renames dropped SURVIVES, and is stated in the code rather than overclaimed: --follow is what forces detection, so the flag is a belt and the property it was credited with is held by the hostile-config fixture

Live corpus (re-measured at f62126c3, against origin/main 6df21737)

  • python3 scripts/proposal-support.py . verify <change> looped over every active change: 42 green, 0 failures on this branch, and 41 green, 0 failures on origin/main and 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).
  • Guard sweep over 189 packets (42 active + 147 archived): 0 refusals, and every resolved baseline byte-identical to the pristine main module'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/main 330 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.py drives 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 the standard row 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 62bea179 already carried the guard, the docs paragraph and eight fixtures. fa785ff5 adds, after auditing the branch against the ruling:

  1. The stale corpus count in the sweep's docstring ("35 active packets here" against 42 today) — Copilot's suppressed finding on this PR, and a drift that repeats with every landing. The test now states the invariant and writes no number down.
  2. The --find-renames overclaim corrected, and the property it was credited with pinned by a fixture — --follow forces detection (measured with the flag and without it, under diff.renames=false + diff.renameLimit=1), so the hostile config now appears in a fixture rather than in a promise.
  3. Two assertions the ruling names, made explicit — the refusal message says the baseline 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.

6f691527 then answers the two bench findings, both with measurement rather than assent:

  1. Codex's P1 — the un-ratifying-rename gap: stated, filed as 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, pinned by a fixture (section above).
  2. Copilot's copy-detection question — --find-copies is not needed and default settings do not miss the copy: --follow turns copy detection on for the followed path, and a copied packet reports C100 with the flag, without it, and under diff.renames=false (git 2.43.0, diff.renames unset repo-locally and globally in the fixture). The standing proof is the copy fixture, which passes on a default-configured runner. Now stated in renamed_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:

  1. renamed_from recognised only a full 40-hex revision. The pairing is matched by comparing git's own %H against the revision asked about, so HEAD, HEAD~1, an annotated tag or an abbreviated hash all compared unequal and were answered None — 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 answers None, as an unreadable history already did. It changes no answer in this corpus — the sole caller passes a full hash straight out of git 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).

ea61cfae then takes the bench's fifth round, whose three suppressed findings all make one point:

  1. The operator-facing texts said MOVE where the guard also refuses a COPY. renamed_from accepts git's C* pairing as well as its R* 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, the OriginRetentionError docstring 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 --follow over the path and refuse on any rename/copy hop whose SOURCE declared Status: ratified at 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 by test_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 in docs/document-lifecycle.md (the archive-gate bullet already enumerating the gate's arms). No openspec/ 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

…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
Copilot AI lite review requested due to automatic review settings September 9, 2026 12:47

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

Hi @brettheap! 👋

Your private repo does not have access to Sourcery.

Please upgrade to continue using Sourcery ✨

@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-1 (openXfactory-1)

@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 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 (OriginRetentionError with origin-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
Copilot AI review requested due to automatic review settings September 9, 2026 12:50
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Something went wrong. Try again later by commenting “@codex review”.

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

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

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
Copilot AI review requested due to automatic review settings September 9, 2026 13:17
@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-1 (openXfactory-1)

CONTINUATION — the first author of this branch stopped on a rate limit at 62bea179; this lane continued from the branch (session session_011pPD2SfAZtmh8qC3VAimXw), audited what was pushed against the ruling on #833, and pushed fa785ff5:

  • Copilot's suppressed finding is TAKEN. The corpus-sweep docstring hard-coded "35 active packets here" against 42 today. The test now states the invariant — zero refusals over whatever is active, one subtest per change — and writes no count down.
  • An overclaim in the guard's own comment is corrected. --find-renames was credited with making the guard immune to diff.renames=false; --follow is what forces rename detection. Measured on git 2.43.0: with the flag and without it, under diff.renames=false and diff.renameLimit=1, git still reports the pairing — and dropping the flag breaks no test (a surviving mutant, now stated where it was overclaimed). The property is pinned by a new fixture carrying the hostile config in its own .git/config.
  • Two assertions the ruling names, made explicit: the refusal message says the baseline cannot be established, and the never-moved ratified packet is asserted unchanged end to end (origin_retention_errors → []), not only at the walk.
  • Merged main (98081b34) so the measurements are against the current corpus, then re-measured everything: 189 packets swept (42 active + 147 archived, add-openspec-cli-pin archive move included), 0 refusals, 0 baseline differences vs the pre-guard module; 42/42 active changes verify green (identical to main); pytest tests/proposal-support tests/sequenced_after 339 passed / 44 subtests (main: 330 / 2); pytest tests/doc-health 1635 passed; doc-health --single-repo . exit 0 with findings identical to main.

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

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.

🟡 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

Comment thread scripts/proposal-support.py Resolved

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 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".

Comment thread scripts/proposal-support.py Resolved
…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
Copilot AI review requested due to automatic review settings September 9, 2026 13:36
@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-1 (openXfactory-1)

CHECK STATE at 6f691527, and one RED that is not this PR's: merge-master-approval is failing ESTATE-WIDE since ~13:15Z today.

Measured, not inferred:

  • Last SUCCESS of that workflow anywhere in this repository: 2026-09-09T13:09:18Z (change/archive-govern-archived-record-edits-2). Every run since fails, on six branches across five lanes — fix/origin-retention-refuses-a-moved-path, fix/cited-to-paths-resolve, change/opendox-oqb-replumb-1-slug-and-sessions, change/opendox-oqb-replumb-2-wire-names, change/opendox-carve-manifest-validator, realize/amend-mirror-floor-regeneration-merge-authority.
  • This branch's own earlier heads PASSED it at 12:47Z (4099cd49) and 12:50Z (62bea179) with byte-identical .github/ and contracts/ — nothing in this PR touches either, and the failure appeared on the first run after the outage began.
  • The failing step is the decision-core checkout, not the evaluation: Decision core unreadable — opensoft/codexFactory@4b12ba83add713666a94129fc45552d8989f8488 could not be checked out with the repo identity. The preflight resolved a credential (HAS_REPO_APP_KEY: true, identity=repo), so this is the App's Contents read on opensoft/codexFactory, not a missing secret. The pinned commit itself is intact and readable with a user credential (opensoft/codexFactory@4b12ba83, 2026-09-07T16:15:37Z, "Merge pull request Propose add-notebook-projection-identity: the projection's hosting identity becomes a declared two-case intake fact #273 from opensoft/floor/bot-regeneration"), so it is not a force-push or a rewritten history. A re-run (attempt 2) failed identically.
  • The workflow states its own standing: "This check is ADVISORY and is required by no ruleset, so this failure blocks no merge. It is red rather than green on purpose: a green run that read no core would manufacture the appearance of a review that did not happen." Verified against this repository's six active rulesets — the required contexts are signed-execution-chain-gate, lane-line, openspec-cli-pin, wallet-validation, pytest-suite, release-tag-gate. merge-master-approval is in none of them.

Operator item for Brett's console, not a lane act: re-grant/repair the OPENXFACTORY_APP_* installation's read-only Contents on opensoft/codexFactory (or add opensoft/openxFactory to the selected list for the org XFACTORY_APP_* secrets — the workflow's own two remedies). Until then every openxFactory PR in every lane carries this one advisory red.

Everything required by a ruleset is green or in flight on this head; this lane does not merge.

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.

🔵 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_from compares the first git log record hash to the caller-provided revision string (rows[0].strip() != revision). That makes the helper silently return None for 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. Normalizing revision to 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]>
Copilot AI review requested due to automatic review settings September 9, 2026 14:15

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.

🔵 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 codes R* and C*). 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* like R*). 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_from treats C* the same as R*, 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

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

@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-1 (openXfactory-1)

ea61cfae answers the bench's fifth round — and a REQUIRED check is red for a reason that is not this PR. Both measured below.

The bench round, taken (ea61cfae)

Copilot's fifth round raised three suppressed findings that all make one point, and it is right: renamed_from accepts git's C* pairing as well as its R* one, a fixture has pinned the COPY refusal since the guard landed, but three operator-facing texts described only a MOVE — the refusal message, the OriginRetentionError docstring and the lifecycle bullet. 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 an operator can actually check: if the former path still stands in the tree then the packet was COPIED to this id rather than moved to it. No behaviour changed — the same commits refuse, the same commits pass. Pinned where it was wrong: 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. Re-measured on this head: pytest tests/proposal-support tests/sequenced_after 341 passed / 48 subtests; 189-packet sweep 0 refusals, 0 baselines moved; 42/42 active changes verify green; doc-health --single-repo . exit 0 with its finding lines byte-identical to every earlier head of this branch.

pytest-suite — REQUIRED, and red ESTATE-WIDE since ~13:15Z today, same root cause as the advisory

The earlier check-state comment on this PR called everything required "green or in flight". The in-flight one then failed, and it is required by the wallet-gate ruleset. It is not this PR's doing:

  • Last SUCCESS of pytest-suite anywhere in this repository: 2b6fa97f (change/archive-govern-archived-record-edits-2), queued 2026-09-09T13:09:19Z. Every run queued from 13:15:41Z onward fails — on eight refs across seven branches, main included: main (6df21737, failed 14:01:36Z), fix/origin-retention-refuses-a-moved-path, fix/cited-to-paths-resolve, change/archive-bump-openspec-cli-pin-to-1.12, change/opendox-oqb-replumb-1-slug-and-sessions, change/opendox-oqb-replumb-2-wire-names, change/opendox-carve-manifest-validator, realize/amend-mirror-floor-regeneration-merge-authority.
  • This branch's own earlier head 62bea179 PASSED it at 13:16:27Z (queued 12:50, before the outage), with the same code the guard has now.
  • The tests are not failing — the pinned-triple assertions are. At f62126c3: selected=10662 passed=10639 skipped=23 failures=0 errors=0. Zero failures, zero errors, floors cleared with margin (selected +3572, passed +3569). What trips it is skipped 23, pinned exactly 21, plus the two named-verifier assertions: tests.review_lane_pin.test_floor_snapshot.TheFreshnessVerifier::test_the_snapshot_is_byte_identical_to_the_pinned_core and TheVectorReplay::test_every_vector_replays both report skipped, wanted passed. The two extra skips ARE those two tests.
  • The cause is the same codexFactory org move as the advisory red, stated by the job itself: the "Check out the pinned decision core" step ends CORE_OUTCOME: failure with repository 'https://github.com/opensoft/codexFactory/' not found, and the workflow's own warning predicts the outcome — "the pinned decision core could not be checked out … The skipped-count pin below will fail this job and name this as the cause." The pinned commit opensoft/codexFactory@4b12ba83 is intact and readable with a user credential; the repository now lives at codeXfactory/codexFactory.
  • merge-master-approval fails at f62126c3 for the identical reason (Decision core unreadable — opensoft/codexFactory@4b12ba83… could not be checked out with the repo identity), and states its own standing: ADVISORY, blocks no merge. pytest-suite makes no such claim, because it is required.

So Brett's "merge when green" precondition is NOT met on the required set, and not because of anything in this diff. Required contexts across this repository's six active rulesets are signed-execution-chain-gate, lane-line, openspec-cli-pin, wallet-validation, pytest-suite, release-tag-gate; five of the six are green here and pytest-suite is red on main too. This lane does not merge and does not touch .github/ to unblock itself — repointing the decision-core checkout at codeXfactory/codexFactory, or re-granting the App's Contents read, is an operator act on the whole estate and a ruling, not a lane's patch inside a scripts/ PR.

Operator item for Brett's console (unchanged from the earlier comment, now with a required check behind it, so it gates every openxFactory merge rather than only decorating one): repair the cross-repository read of the pinned decision core — the org move to codeXfactory is today's change, and both the required pytest-suite and the advisory merge-master-approval recover with it.

@brettheap

Copy link
Copy Markdown
Contributor Author

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; merge-master-approval is advisory, red for the org-move cause, tolerated and disclosed.

@brettheap

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

…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]>
Copilot AI review requested due to automatic review settings September 9, 2026 15:43
@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-1 (openXfactory-1)

HEAD MOVED BY MERGE-FROM-MAIN (2026-09-09T15:44Z): ea61cfae → d29b6db6. PR #801 (slice B1, the workflow repoint to codeXfactory/codexFactory) merged at e86eca35; a re-run would replay the old merge ref, so main was merged in for a fresh one. The merge commit carries no content of its own — this PR's diff against main is the same 3 file(s) as before. Codex re-requested at ea61cfae answered 15:06Z with its usage limit — recorded as ABSENCE, not clearance; Copilot's final round (14:49Z) recommends approval, 0 unresolved threads. Landing guard runs on d29b6db6 when its pytest-suite and main's are green, on the same word.

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 changes are well-scoped, strongly regression-tested, and I only found a minor docstring formatting issue.

Review details
  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Lite

Comment thread scripts/proposal-support.py Resolved
@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-1 (openXfactory-1)

FROZEN + LANDING PROVENANCE — 2026-09-09T16:12:35Z. Head d29b6db6 (merge-from-main of the reviewed head ea61cfae, no content of its own). Brett's words: "merge 842 and 846 when green, then ratify the 729 packet" (2026-09-09) and "land 842 and 846 when green" (reaffirmed 2026-09-09 ~15:1xZ); ruling "Hold until main is green again" satisfied — main's newest decided pytest-suite is success at e86eca35 (run 34371838117, skipped 21; the org-move cause cured by #801). Main has since moved to 19c8d5a4 on other lanes' ideation-dashboard merges whose suites are pending or superseded-cancelled, not red, with files disjoint from this PR (decided=success@e86eca3 pending=2 cancelled_newer=2). Guard on live values: six required checks SUCCESS; merge-master-approval = SUCCESS (advisory); unresolved review threads 0 (Copilot's merge-head round dispositioned on the threads); closingIssuesReferences = #833 and the body's closing keywords name exactly that; no other lane's LANDING open on openxFactory main. Codex: re-requested at ea61cfae, answered with its usage limit (ABSENCE recorded, not clearance); Copilot's final round recommends approval. Admin merge with provenance: the PR is authored as brettheap and a self-approval cannot clear the review requirement (B2 pattern).

@brettheap
brettheap merged commit 183d1b4 into main Sep 9, 2026
10 checks passed
@brettheap

Copy link
Copy Markdown
Contributor Author

Lane: openxfactory-1 (openXfactory-1)

LANDED — lane openxfactory-1, 2026-09-09T16:12:50Z, PR #846 → 183d1b43 on opensoft/openxFactory main. Origin #833: CLOSED.

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

Labels

None yet

Projects

None yet

2 participants