Skip to content

Close the oversized-upload holes #438 left: verify the rename SETTLES, and stop instead of minting a fifth duplicate - #604

Merged
brettheap merged 2 commits into
mainfrom
fix/462-oversized-adoption-settle
Sep 3, 2026
Merged

brettheap merged 2 commits into
mainfrom
fix/462-oversized-adoption-settle

Conversation

@brettheap

Copy link
Copy Markdown
Contributor

Lane: openxfactory-smalls

#438 fixed the oversized-upload path twice over — a bounded rename poll instead of a fixed sleep(2), and stray ADOPTION instead of a duplicating re-run — and on 2026-08-28 (the post-#452 projection sync) both halves missed, each doing exactly what it was written to do. Two applies each minted a new xf-sync-*.md stray in xf-canon (3 → 4), silently: no adoption line, no raise, exit 0, canonical title absent afterwards.

(b) The rename verifier proved a moment, not a steady state

Both applies' polls passed on attempt 1 — id + title read back correctly — the manifest was written, the run exited clean, and the title later regressed to the temp filename, consistent with the provider re-stamping the title when ingestion of the 279KB body completes.

After the poll confirms, _verify_rename_settled now re-reads the title after RENAME_SETTLE_DELAY_S, attempts one re-rename if it regressed, and raises on the existing loud path if the regression survives that retry. It is one retry, never a loop.

Why a settle delay rather than an end-of-run sweep. sync_book writes mf[rel] immediately after add_text_source returns and the manifest is flushed per book, so a sweep would discover the regression after the run had recorded that document as projected — and the next run would then re-upload it, compounding again. The regression has to be caught before that write. The plumbing agrees: sync_book returns (ok, overflowed) with no channel for renamed ids, so a sweep would mean threading state through sync_book and main for a check that belongs where the rename happens.

Why 45s. From the issue's evidence, not taste: the re-stamp arrives when ingestion of a large body completes (seconds-to-a-minute after the write is accepted), and a rename issued against a fully ingested stray took immediately and was still in place 2+ minutes later. 45s sits in the middle of that band and costs three quarters of a minute once per oversized document — one document in the current corpus. Module constant, monkeypatched in tests.

(a) Adoption could never match this class

_adopt_matching_stray compared the projected body against nlm source content on the strict digest, and the provider does not return large bodies verbatim: all four strays of the 279,235-byte ideation-dashboard spec came back as 281,645 bytes (+2,410). For this document class the "safe" fall-through to a normal add IS the compounding path.

  • The strict digest stays the first gate — unchanged, nothing to argue with.
  • Then a bounded fallback: only strays whose body length is within ADOPTION_LENGTH_TOLERANCE_BYTES = 4,096 of the projected body are candidates (contains the observed +2,410 with room to grow; ~4% of the smallest document that can reach this path at all and ~1.5% of the 279KB one). Candidates are compared on _normalized_digest and adopted when exactly one matches.
  • Normalization set (each named in the docstring, each applied to BOTH sides): JSON unwrap (as the strict digest already does), Unicode NFC, CRLF/CR → LF, per-line trailing whitespace, trailing newlines at end of document. The docstring states the honest limit: every one of those can only SHRINK a body, so none of them explains the observed +2,410 — which is exactly why the failure mode is a stop, not an upload.
  • Length never adopts by itself, and a title pattern never adopts at all.

Stop instead of upload

A within-tolerance stray that does not match — or more than one match — raises with every candidate named (id, temp title, provider byte length), the projected byte length, and the hand adoption from the issue ("rename ONE fully-ingested stray to the contract title … wait, verify, re-plan; do NOT re-run --apply"). No upload is attempted. main contains a book's failure, so the other books still complete and the run exits nonzero.

Zero within-tolerance strays → normal add, exactly as today.

Transcript visibility

The oversized path narrates itself even on success: uploaded as <id>, renamed on attempt N, settle re-verify: title held, adopted stray <id> by strict|normalized digest, and the regression/re-rename lines. Both stray-minting applies were indistinguishable in the transcript from clean ones, which is how they went unnoticed until parity read the document MISSING.

Tests

New file tests/notebooklm/test_sync_oversized_adoption.py (the sibling suite is 3,000 lines that several lanes edit at once; a parallel PR touches ensure_workspace_record in the same script — no overlap with these functions). Every provider call is stubbed and both sleeps are monkeypatched; the settle sleep is where the provider's re-stamp is injected, which is the honest model of "ingestion completed while we waited".

Covered: strict adoption still wins · a provider-transformed stray adopted on the normalized digest (with the strict gate asserted to be failing) · one within-tolerance non-matching stray stops with no add call · two within-tolerance strays report both and adopt neither · a far-outside stray and no strays at all both fall through to a normal add · the settle re-verify reads back AFTER the delay · a regression that persists raises (and is bounded to exactly 2 renames) · one re-rename repairs a regression · an adopted stray is settle-verified too · the normalization set folds only what it claims.

Mutation-proved 6/6 — dropping the settle re-verify (4 fail), falling through instead of stopping (2), tolerance 0 (1), dropping NFC (2), dropping the per-line rstrip (2), raising without the one retry (2).

tests/notebooklm: 190 passed, 26 subtests in 4.1s   (was 179 + 26)

No live provider verification was run, deliberately and on the same reasoning #438 recorded: the honest evidence path is the hermetic proof plus the next real apply exercising it naturally, rather than re-uploading a 279KB source to watch it work.

Docs

docs/lifecycle-notebook-projection.md §5 gains an Oversized documents block — settle re-verify, bounded adoption, the loud stop, and the hand-repair recipe as runnable commands — and the evidence record where #438's fix is described carries a dated "residual, filed as #462, fixed" note.

Closes #462

🤖 Generated with Claude Code

https://claude.ai/code/session_012WEcJUPMqpciTRSbJZzkh2

…, and stop instead of minting a fifth duplicate

#438's two halves both missed live on 2026-08-28 (issue #462), each doing
exactly what it was written to do.

(b) The rename's read-back proved a MOMENT. Both applies passed the poll on
attempt 1 and the title later regressed to the temp filename when ingestion of
the 279KB body completed — exit 0 over a stranded source. After the poll
confirms, the title is now re-read after RENAME_SETTLE_DELAY_S (45s, the middle
of the band the evidence gives: the re-stamp arrives on ingestion completion,
and a rename against a FULLY INGESTED stray held 2+ minutes). One re-rename is
attempted; a regression that survives it raises on the existing loud path.

(a) Adoption could never match this class. The provider returned 281,645 bytes
for the 279,235-byte document, so the strict digest differed every time and the
documented safe fall-through to a normal add minted a fresh duplicate on every
run (canon went 3 strays to 4, silently). The strict digest stays the FIRST
gate; when it fails, a bounded fallback considers only strays within
ADOPTION_LENGTH_TOLERANCE_BYTES (4,096, containing the observed +2,410) of the
projected body and adopts the one whose provider-normalized digest matches —
JSON unwrap, NFC, line endings, per-line trailing whitespace, trailing
newlines, each named in the docstring and applied to BOTH sides. Length never
adopts by itself and a title pattern never adopts at all.

And where the old code uploaded another copy, the run now STOPS: a
within-tolerance stray that does not match, or more than one match, raises with
every candidate named, both byte lengths, and the hand adoption that worked
live. Zero within-tolerance strays still falls through to a normal add.

The oversized path also narrates itself on success (uploaded as <id>, renamed
on attempt N, settle re-verify: title held, adopted stray <id> by
strict|normalized digest) — both stray-minting applies were indistinguishable
in the transcript from clean ones.

Tests: tests/notebooklm/test_sync_oversized_adoption.py, a new file (the
sibling suite is 3,000 lines several lanes edit at once). 11 tests, every
provider call stubbed and both sleeps monkeypatched — the settle sleep is where
the provider's re-stamp is injected. Mutation-proved 6/6: dropping the settle
re-verify, falling through instead of stopping, a zero tolerance, dropping NFC,
dropping the per-line rstrip, and raising without the one retry each fail
tests. notebooklm suite 190 passed / 26 subtests in 4s.

Closes #462

Lane: openxfactory-smalls
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_012WEcJUPMqpciTRSbJZzkh2
Copilot AI lite review requested due to automatic review settings September 3, 2026 00:01

@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

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

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, include comprehensive hermetic tests for the new failure/repair modes, and the updated runbook docs match the implemented behavior.

Pull request overview

This PR hardens the NotebookLM sync’s oversized-upload path to prevent silent stray duplication by (1) re-verifying that post-upload renames remain stable after ingestion completes, and (2) tightening stray “adoption” so the sync stops loudly instead of uploading another duplicate when a near-sized temp-titled source already exists but cannot be safely matched.

Changes:

  • Add a “rename settle” re-verification step (with a single bounded re-rename) after the rename poll succeeds.
  • Add a bounded, length-gated normalized-digest fallback for adopting temp-titled strays; if it can’t decide unambiguously, fail the book rather than upload.
  • Add a dedicated hermetic test suite for the new adoption/settle behaviors and update lifecycle/evidence documentation accordingly.
File summaries
File Description
scripts/sync-notebooklm-books.py Adds rename settle verification, normalized adoption fallback, and “stop instead of upload” behavior for ambiguous near-sized strays.
tests/notebooklm/test_sync_oversized_adoption.py New hermetic tests covering strict + normalized adoption, ambiguity stop, and rename regression/repair behavior.
docs/lifecycle-notebook-projection.md Documents oversized document behavior, stop conditions, and the operator hand-repair recipe.
docs/notebook-projection-migration-evidence-2026-08-24.md Updates the historical evidence record with the residual holes (#462) and the new fixes.
Review details
  • Files reviewed: 4/4 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.

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

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

Copilot AI review requested due to automatic review settings September 3, 2026 13:50

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 directly address the proven failure modes with bounded control flow, clear operator-facing errors/transcript lines, and comprehensive hermetic tests covering the new branches and stop conditions.

Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@brettheap

Copy link
Copy Markdown
Contributor Author

RULING for lane openxfactory-smalls PR #604 (head 33a7532f = 5cf8c557 + merge of main after #602 landed): Brett Heap, 2026-09-03, "merge all six". Held until the branch was refreshed against main and CI re-ran on the COMBINED tree, because #602 and this PR both edit scripts/sync-notebooklm-books.py — all five checks green on 33a7532f (pytest-suite 21m3s). Admin-merged on his word; PRs opened as brettheap cannot be self-approved. Codex: quota-refused three times, never reviewed. Copilot: approval recommended, 0 comments.

Lane: openxfactory-smalls

@brettheap
brettheap merged commit 2b0615d into main Sep 3, 2026
6 checks passed
@brettheap
brettheap deleted the fix/462-oversized-adoption-settle branch September 3, 2026 14:13
brettheap added a commit that referenced this pull request Sep 3, 2026
A fourth commit landed on origin/main after the round-1 fix; §5.7 said
"TWO catch-up merges" when a third had since happened.

Lane: openxfactory-f2

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01GSRxesWQMRgFKUjoJiDd1w
brettheap added a commit that referenced this pull request Sep 3, 2026
…611/#614/#602/#604: README both sides; corpus pin re-derived a third time

`main` moved seven merges past this branch's base `6da1e1f5` while PR #608
sat awaiting the convener's merge word — #611 (archived
`declare-spent-bundle-state`: realized #587 `3fa222f3`, `main` green run
`33654163291`, four orchestrator decisions affirmed, promoted), #614 (pins
one `--as-of` clock across the self-gate's two report renderings), #602
(re-points a stale workspace record instead of returning "reconcile by
hand"), #604 (closes the oversized-upload duplicate-minting hole), plus
three more (#601, #599, #603) that touch neither conflicted file. GitHub
could no longer build the test-merge commit. Force-pushing is forbidden
here, so this is a CATCH-UP MERGE and not a second rebase.

TWO FILES CONFLICTED. `README.md` auto-merged cleanly — main removed the
`declare-spent-bundle-state` active row and added its archive entry, and
this branch's `create-medxchart-overlay-boundary` row stands exactly as
this branch wrote it; the diff against `origin/main` is that one row and
nothing else.

`tests/sequenced_after/test_sweep.py` conflicted. MAIN'S PIN BLOCK AND
MOVEMENT LOG ARE THE BASE (`git checkout --theirs`, keeping every entry
main has, #611's included), and the pin is then RE-DERIVED ON THE MERGED
TREE rather than netted out of arithmetic:

  main at 2b0615d                  33 active + 125 archived = 158 change
                                    ids, 108 co-modified, 50 sole
                                    modifiers, 20 / 13 active
                                    co-modified/sole
  merged tree                       158, 109, 49, 21 / 12
  merged tree, with only
  .../create-medxchart-overlay-boundary/specs/domain-descendant-boundary/
  moved aside                       158, 108, 50, 20 / 13
  origin/main at 2b0615d           158, 108, 50, 20 / 13

The exclusion reproduces main's own reading EXACTLY, and main's own tree
confirms that reading independently, so this branch's single `## MODIFIED
Requirements` delta over `domain-descendant-boundary` is the whole of the
difference between the two trees a third time: +1 `co_modified`, +1
`active_co_modified`, -1 `sole_modifiers`, -1 `active_sole`, and
`change_ids` and `active` not at all. No fourth change moved in the
window; #614/#602/#604 touch no `openspec/changes/**/specs/**` delta
(confirmed via `git diff --stat 6da1e1f..2b0615d -- openspec/changes/`,
which shows only #611's own rename).

The five pinned values become, all measured and none inferred:

  sweep.co_modified          == 109
  sweep.active_co_modified   == 21
  sweep.change_ids - 1       == 157   (held through #611's archive and this
                                      ratification alike)
  sweep.sole_modifiers - 1   == 48    (was 49 on main after #611)
  sweep.active_sole - 1      == 11    (was 12 on main after #611)

The pin moves in the SAME COMMIT as the corpus, which is that test's own
protocol.

VALIDATION ON THE MERGED TREE:

  openspec validate create-medxchart-overlay-boundary --strict   valid
  openspec validate --all --strict                               86 passed,
                                                                 0 failed
                                                                 (86 items)
  python3 -m pytest tests/sequenced_after -q                     118 passed
  scripts/doc-health.py --single-repo .                          6 critical,
                                                                 6 error,
                                                                 29 warning,
                                                                 14 info,
                                                                 0 new
                                                                 regressions

The `--all --strict` total moved 87 → 86 because #611 ARCHIVED an active
change (`declare-spent-bundle-state`) without adding a replacement; this
packet adds none and moves it not at all. The doc-health report is
IDENTICAL to the same run on `origin/main` at `2b0615da` in every finding
and count once the checkout directory name is normalised — the two runs
differ only in one `staged-candidate-aging` trend line's `min=` day count
(0 vs 1, both `class="contested"`, no action required), a clock artifact
of the two runs' wall time and not a corpus difference. `grep -c
create-medxchart-overlay-boundary` on this branch's report is 0.

The two `review/` records still state the pre-merge readings and are
corrected in the commit that follows this one, before capture — capture
is the merge of PR #608, which has not merged.

Lane: openxfactory-max001

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_012RQo21NbWtnTVsb6JU67at
brettheap added a commit that referenced this pull request Sep 3, 2026
… a third time pre-capture (main at 2b0615d)

CAPTURE IS MERGE, AND NOTHING IS MERGED. `record-immutability` forbids editing a
`Status: record` document AFTER capture; capture is the merge of the pull
request that establishes it, and PR #608 has not merged. These two records have
therefore never been captured, and correcting them on the branch is lawful. No
capture happened before this merge and none is claimed.

WHAT MOVED, AND WHY. `main` moved seven merges past this branch's previous
catch-up point `6da1e1f5` — #611 (archived `declare-spent-bundle-state`:
realized #587 `3fa222f3`, `main` green run `33654163291`, four orchestrator
decisions affirmed, promoted), #614, #602, #604, plus #601/#599/#603, which
touch neither this file nor the corpus pin — and this branch took the second
catch-up merge at `5cf9a67b` in the commit directly below. Of the seven, only
#611 moves the live corpus pin, and it moves exactly one of its five readings:
archiving a co-modified ACTIVE change lowers `active_co_modified` alone,
leaving the corpus-wide `co_modified`, `sole_modifiers`, `active_sole` and
`change_ids` untouched.

COUNTS MOVED, AND ONLY COUNTS:

  openspec validate --all --strict        87/87 -> 86/86
                                          (#611 ARCHIVED one ACTIVE change
                                          without adding a replacement; this
                                          packet adds none and moves this
                                          total not at all)

  this branch's own sweep                 158 / 109 / 49 / 22 / 12
                                          -> 158 / 109 / 49 / 21 / 12
                                          (change ids / co-modified / sole
                                          modifiers / active co-modified /
                                          active sole)

  measured-by-exclusion baseline,         158 / 108 / 50 / 21 / 13
  which is main's own reading             -> 158 / 108 / 50 / 20 / 13

so this packet's contribution, restated from main's newer baseline, still
reads `co_modified` 108 -> 109, `active_co_modified` 20 -> 21, `sole_modifiers`
50 -> 49 and `active_sole` 13 -> 12 — the same +1 / +1 / -1 / -1 shape it has
carried through every re-derivation, with `change_ids` and `active` still
moving not at all.

MEASURED BY EXCLUSION, NOT INFERRED. The baseline above was proved by moving
`openspec/changes/create-medxchart-overlay-boundary/specs/domain-descendant-boundary/`
aside on the merged tree and re-running
`python3 scripts/validate-sequenced-after.py . --sweep`, and independently
confirmed by running the same sweep on `origin/main` at `2b0615da` itself,
which prints the same 158 / 108 / 50 / 20 / 13.

NOTHING ELSE IN THE RECORDS CHANGED. Beyond those counts and the `Captured:`
header naming the third tree, no governance statement, no evidence block, no
console output, no finding and no citation moved. The full account is
`verification-2026-09-03.md` § 9's "RE-DERIVED A THIRD TIME" paragraph and the
matching line added to `ratification-2026-09-03.md`'s corrected-pre-capture
paragraph.

Lane: openxfactory-max001

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_012RQo21NbWtnTVsb6JU67at
brettheap added a commit that referenced this pull request Sep 3, 2026
This branch was authored against `origin/main` at `7af2725c`, which is the
real merge base — not `2b0615da`, which is itself a later `main` commit. Main
moved on by the ratifications of `create-medxchart-overlay-boundary` (#608)
and `create-medxpractice-overlay-boundary` (#609) — BOTH RATIFIED AND STILL
ACTIVE, neither archived — and by #614, #602, #604, #601, #599 and #603.

TWO CONFLICT POINTS, both named in advance by this branch's own README block
and sweep docstring, and both resolved by KEEPING BOTH SIDES rather than by
taking either wholesale.

README.md — the "OpenSpec Records" block auto-merged, the two sides having
touched disjoint regions, and the result was checked rather than assumed:
main's expanded RATIFIED entries for both overlay-boundary packets stand under
"Active changes", and this branch's move of `add-project-repo-schema` out of
that list and into "Archived changes" stands as well. This branch's "NOTE FOR
THE NEXT REBASE" paragraph is rewritten to RECORD its own discharge instead of
still demanding it.

tests/sequenced_after/test_sweep.py — the corpus pin, the one textual
conflict. `active_co_modified` resolves to 20, WHICH IS NEITHER SIDE'S NUMBER:
#608's ratification made an already-active change a co-modifier and raised it
20 -> 21, this branch's archive of `add-project-repo-schema` moved a
co-modified active change out of the active corpus and lowered it 20 -> 19,
and on the merged tree both are true at once so the two moves cancel at 20.
MEASURED, not netted by arithmetic, on both trees via
`python3 scripts/validate-sequenced-after.py . --sweep`: `origin/main` at
`0bf37d14` reads 33 active + 125 archived = 158 change ids, 109 co-modified,
49 sole modifiers, 21 / 12 active co-modified/sole; the merged tree reads
32 active + 126 archived = 158, 109, 49, 20 / 12. EXACTLY ONE READING DIFFERS,
main's own reading being the by-exclusion control since this archive is the
only difference between the two trees. Every other pin therefore keeps MAIN'S
post-#608/#609 value — `co_modified` 109, `sole_modifiers - 1` 48,
`active_sole - 1` 11, `change_ids - 1` 157 — and BOTH movement-log bullets are
kept, main's and this branch's, with a third recording the merged reading.
#609 moves no pin at all: its delta carries no `## MODIFIED Requirements`
block, so it was and remains a sole modifier.

NO `contract-v3.1` INVENTORY MEMBER MOVED. The 283 registered paths were
intersected with everything `main` touched across `7af2725c..0bf37d1`: main's
only edits under `contracts/`, `scripts/` or `docs/` are
`scripts/nlm_auth.py`, `scripts/sync-notebooklm-books.py`,
`scripts/validate-manifest-digests.py` and four `docs/notebook*` /
`docs/lifecycle-notebook-projection.md` files, and NONE of the seven is a
registered row. The inventory therefore stands as cut and is not rebuilt.

Lane: repo-shape
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_015WekBEXf55Xv64psGe5t3T
brettheap added a commit that referenced this pull request Sep 3, 2026
…03, realized by #593 (3c237cd), green on main (run 33717394896) (#615)

* Archive update-standards-body-current-publications: ratified 2026-09-03, realized by #593 (3c237cd), green on main (run 33717394896)

Brett's word: "archive it". Finishes work an Opus agent left on disk,
uncommitted, after being killed twice by provider errors — verified
rather than redone: the 8-file move to
openspec/changes/archive/2026-09-03-update-standards-body-current-publications/,
the byte-identical promotion to
openspec/specs/standards-body-registry/spec.md (real Purpose section,
requirements diff-clean against the delta), and the README "OpenSpec
Records" entry.

Took a catch-up merge of origin/main first: declare-spent-bundle-state's
own archive (PR #611, squash 7af2725) landed on main after this
branch was cut from 6da1e1f, so every gate and pin below is
re-measured against 7af2725 rather than the stale base. Corrected the
sequenced_after live pin accordingly in the same commit as the corpus
move (its own protocol): active_sole - 1 falls 12 -> 11 (this archive,
a SOLE modifier); active_co_modified already held at 20 from the
sibling archive this branch merged, not from this one. Ran
`python3 scripts/validate-sequenced-after.py . --sweep` on both trees
to confirm: 32 active + 126 archived = 158, 108, 50, 20 / 12.

Also added tasks.md 5.7 naming this PR as the landing act for the
archive that ran uncommitted in the isolated clone.

Gate evidence: PR #593 squash 3c237cd
on main; pytest-suite run 33717394896 (2026-09-03T05:26Z) and
signed-execution-chain-gate both success on that commit.

Validated: openspec validate --all --strict 86 -> 86 passed (33
active + 53 specs -> 32 active + 54 specs); pytest tests/doc-health
1500 passed either side; pytest tests/test_standards_body_registry.py
17 passed; pytest tests/sequenced_after 118 passed;
scripts/validate-omnigent-contracts.py all checks passed; doc-health.py
--single-repo . 6 critical / 6 error / 29 warning / 13 info either
side, 0 new regressions, and --family promotion-fidelity /
duplicate-packet / status-validity all zero findings either side.

Lane: openxfactory-f2

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01GSRxesWQMRgFKUjoJiDd1w

* README: re-measure the archive entry's gates against the second catch-up merge

origin/main moved 5 more commits (#603 #599 #601 #614 #602, tip
1c3e744) while this PR was being finished. None touch this packet's
files, so the archive act itself is unaffected, but the doc-health.py
--single-repo info count and the base commit cited in the entry were
stale. Re-measured back-to-back on 1c3e744 (before) and the merged
tree (after): 6 critical, 6 error, 29 warning, 14 info, 0 new
regressions, unchanged by this act. Also records the one transient
pytest tests/doc-health network-read failure
(test_this_repository_can_consult_the_retention_namespace) that a
clean rerun did not reproduce.

Lane: openxfactory-f2

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01GSRxesWQMRgFKUjoJiDd1w

* tasks.md: name PR #615 as the landing act

Fills the placeholder §5.7 left after PR creation.

Lane: openxfactory-f2

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01GSRxesWQMRgFKUjoJiDd1w

* tasks.md: stop claiming PR #615 already landed on main

Copilot review round 1, taken: 5.7 said "LANDED ON main" while the PR
is still open. Corrected to state the PR exists and is open, not
merged; a follow-up line records the squash SHA once it actually
merges.

Lane: openxfactory-f2

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01GSRxesWQMRgFKUjoJiDd1w

* tasks.md: name the third catch-up merge (#604)

A fourth commit landed on origin/main after the round-1 fix; §5.7 said
"TWO catch-up merges" when a third had since happened.

Lane: openxfactory-f2

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01GSRxesWQMRgFKUjoJiDd1w

* Fix two Markdown rendering defects Copilot flagged

Round 2/3: an inline-code span split across two lines in tasks.md
(inline spans can't contain a newline) and a stray line break in
README.md that orphaned "with" on its own line. Cosmetic only, no
claims changed.

Lane: openxfactory-f2

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01GSRxesWQMRgFKUjoJiDd1w

* Advance the review-lane pin onto codexFactory's regenerated 58-entry floor

THE OPENXFACTORY HALF OF A TWO-REPOSITORY REPAIR THIS PR'S OWN PROMOTION
FORCED. Promoting `standards-body-registry` adds a path under
`openspec/specs/`, and codexFactory's `repository_gate_floor` for this
repository ENUMERATES that surface exactly — so the new spec arrived OFF the
floor and `tests/review_lane_pin/test_floor_snapshot.py`'s LQ-A7 coverage
assertion reddened the REQUIRED `pytest-suite`. That is the guard working: a
spec the floor does not carry is a spec the floor does not protect.

THE ORDER IS FORCED AND IS THE RUNBOOK'S
(`docs/repository-gate-floor-repair-runbook.md` in the pinned core, and the
ordered repair the assertion prints on failure): codexFactory regenerates the
block at an openxFactory commit that ALREADY carries the new path, and only
then may this pin advance onto it — a pin cannot name a document that does
not yet exist.

CODEXFACTORY'S HALF LANDED FIRST: PR #184, merge
`8cb173738ebecd773eadd1b77b11d29029b37382` (2026-09-03T19:53:55Z),
regenerated by `scripts/merge_master/generate_specs_floor_block.py` at
openxFactory `c9928846` — this branch's own head, the only tree carrying the
new path.

FIVE SITES MOVE, IN ONE LOGICAL CHANGE, because the tests fail if any of them
disagree:

  contracts/review-lane-pin.yaml          core_commit  db157dbb -> 8cb17373
  .github/workflows/merge-master-approval.yml  PINNED_CORE_COMMIT (same)
  .github/workflows/merge-master-approval.yml  core checkout ref: (same)
  .github/workflows/pytest-suite.yml           core checkout ref: (same)
  contracts/review-lane-floor-snapshot.yaml    re-copied at the new commit

and the snapshot's declared witnesses move with it:
`entry_count` 57 -> 58, `sha256` bf7a6b69… ->
22993960b31ff7853df719a701b0f53cd62c420ed7fe25b2da1ba6646bf16f7b.

THE SNAPSHOT IS A WITNESS AND WAS NOT HAND-EDITED. It is a byte copy fetched
from the pinned core at `8cb17373` and verified two independent ways: sha256
as above over 9219 bytes, and GIT'S OWN content addressing —
`git hash-object` of the vendored file equals the blob sha codexFactory's
tree carries at that path and commit, `cdb08cd603a0d10c44f3c843e024d73bd1d6e1ce`.
The freshness comparison in `test_floor_snapshot.py` — which SKIPS when the
core is absent — was additionally run WITH the core on disk
(`PINNED_CORE_CHECKOUT=…`): 56 passed, ZERO skipped, so the byte-for-byte
assertion CI performs actually ran and passed here.

MEASURED, NOT ASSUMED. The new floor is the old floor plus exactly
`openspec/specs/standards-body-registry/spec.md` — nothing removed, no dead
entry introduced. 58 entries = the same 4 hand-reasoned chokepoints + 54 spec
paths (was 53). Coverage over the merged tree: all 54 tracked paths under
`openspec/specs/` are floored, 0 uncovered, and 0 floored spec paths are dead.
`project-repo-schema` has NOT landed, so 54 is the correct surface.

LOCKSTEP RE-MEASURED RATHER THAN CARRIED OVER: xFactory's two judging surfaces
still name `f4702f64` (read from xFactory main 2026-09-03), so
`lockstep.status` stays `diverged` and the obligation to converge at a future
re-point ceremony stands. The gap widened by ONE ENTRY, not by a new kind of
divergence — the cause is unchanged from 2026-09-01 and still forced by the
feature.

Also files forward the archived packet's tasks.md §5.7 with the floor repair.
The squash SHA is deliberately NOT invented there: it is filled in at landing
by the merge-provenance comment.

Validated: tests/review_lane_pin + tests/sequenced_after +
tests/test_standards_body_registry.py = 190 passed, 1 skipped (that skip being
the freshness comparison, separately exercised green with the core present);
tests/doc-health = 1500 passed; `openspec validate --all --strict` = 86 passed
0 failed; `scripts/validate-omnigent-contracts.py` = all checks passed.

Lane: openxfactory-f2
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Dt5nEtqzRNgf3Z5fEAQZtF

* Anchor §5.7's not-yet-merged claim to its writing instant, not the present tense

TAKEN FROM COPILOT's review of `0d17d1be` ("Needs a closer look"): the §5.7
prose asserts landed state in the PRESENT TENSE — "still not merged", "`main`
does not carry this archive" — and this packet is ARCHIVED, so that wording
goes FALSE the instant the pull request merges and leaves a permanent stale
claim inside a record.

The finding is right about the shape and this commit takes it FOR THE HALF THIS
LANE AUTHORED. The claim is now ANCHORED TO AN INSTANT — "as of this note's
writing, 2026-09-03, branch head `0d17d1be`, this packet had not merged" — so
it stays TRUE after the merge instead of decaying, and it points a reader
wanting the LANDED state at the merge-provenance comment rather than at a line
that speaks only for the moment it was written. No fact changes; the tense
does.

WHAT THIS COMMIT DOES NOT TOUCH, AND WHY. Copilot also flagged lines 172 and
184-189 — the PRIOR session's §5.7 prose, not this lane's. Those are left
alone on two grounds: this lane's scope is to APPEND a dated note to §5.7, not
to rewrite another lane's record text; and the phrasing there is the
repository's deliberate doctrine, stated in its own voice ("NOT YET TRUE, AND
NAMED SO IT STAYS FALSE UNTIL IT ISN'T"), which exists to stop a packet
claiming landed state before it lands — the archive-gate rule in
`docs/release-realization-flow.md` § The Archive Gate, and the
claim-outrunning-machinery lesson family. Rewriting it as a bare "TBD" would
weaken a guard rather than fix a defect. That text also already commits to
completing the provenance at landing, which is the act that retires the
staleness.

Lane: openxfactory-f2
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Dt5nEtqzRNgf3Z5fEAQZtF

* Advance the review-lane pin onto the 63-entry floor: second lander of the two-packet collision

THE OPENXFACTORY HALF OF THE FLOOR REPAIR THIS PACKET'S OWN PROMOTION FORCED,
TAKEN A SECOND TIME AND FOR A REASON THAT IS NOT A CORRECTION OF THE FIRST.

TWO openxFactory packets each promoted a NEW capability on 2026-09-03, and
codexFactory's `repository_gate_floor` for this repository is REGENERATED BY
ENUMERATING A TREE rather than by editing a list. `add-project-repo-schema`
(PR #616, merged 20:49Z as `19d00872`) landed first and codexFactory PR #183
(`605d48ac`) regenerated for it. codexFactory PR #184 (`8cb17373`) then
regenerated for THIS packet at `c9928846` — PR #615's PRE-MERGE branch head,
which did not yet carry #616's promotion — so its block went 54 -> 54 rather
than 54 -> 55 and SILENTLY DROPPED `openspec/specs/project-repo-schema/spec.md`,
the entry #183 had just landed.

NEITHER EARLIER PULL REQUEST IS DEFECTIVE. Each regenerated at a real tree,
exactly as CSC-C7 requires. This is the failure mode a two-lander collision
HAS, and the pinned core's `docs/repository-gate-floor-repair-runbook.md`
already answers it by making the SECOND LANDER regenerate once at its OWN
POST-MAIN-MERGE head.

AND `main` WAS NEVER BROKEN IN THE INTERVAL — stated so nobody hunts an
incident that did not happen. `main`'s pin named `605d48ac`, whose 58-entry
floor covers `main`'s 54-spec tree INCLUDING `project-repo-schema`. The gap
becomes reachable only when THIS packet's fifty-fifth spec lands, which is the
moment this advance exists to serve.

CODEXFACTORY'S HALF LANDED: PR #186, MERGE COMMIT (not squash)
`8f770afbf86043ee0f5494ded0f12f51c2a9b45e`, 2026-09-03T21:55:35Z, regenerated
at openxFactory `8d893a0f` — this branch's merge of `main` `19d00872`, and the
FIRST COMMIT ANYWHERE carrying fifty-five tracked paths under
`openspec/specs` — restoring `project-repo-schema` BESIDE
`standards-body-registry`. codexFactory `main` was re-verified at that same
commit by `git ls-remote` immediately before this advance rather than assumed.

FIVE SITES MOVE, IN ONE LOGICAL CHANGE, because the tests fail if any of them
disagree:

  contracts/review-lane-pin.yaml               core_commit  605d48ac -> 8f770afb
  .github/workflows/merge-master-approval.yml  PINNED_CORE_COMMIT (same)
  .github/workflows/merge-master-approval.yml  core checkout ref: (same)
  .github/workflows/pytest-suite.yml           core checkout ref: (same)
  contracts/review-lane-floor-snapshot.yaml    re-copied at the new commit

and the snapshot's declared witnesses move with it: `entry_count` 58 -> 63,
`sha256` 6ab79400… -> b8f95136916fc58d297a8319408bebbffaf327790fd2885a677e22de193f41f8.

THIS PIN NEVER NAMED `8cb17373`, AND THAT IS RECORDED RATHER THAN TIDIED AWAY.
Commit `0d17d1be` on this branch DID advance onto it at 16:24, and the later
catch-up merge of `main` — which carried PR #616's own advance to `605d48ac` —
resolved the pin sites to `main`'s side, so the intermediate 58-entry state
`8cb17373` describes was never the state this branch shipped. A reader
comparing this file's history to codexFactory's will see #184 land and this pin
skip it; that is the collision, not a lost edit.

THE SNAPSHOT IS A WITNESS AND WAS NOT HAND-EDITED (CSC-C7). It is a byte copy
fetched from the pinned core at `8f770afb` and verified THREE independent ways:
sha256 as above over 12492 bytes; GIT'S OWN CONTENT ADDRESSING —
`git hash-object` of the vendored file equals the blob sha codexFactory's tree
carries at that path and commit, `351c47fb5bfad13697dc6c777b9bb17a147e8e45`;
and `cmp` against a REAL shallow checkout of codexFactory at that commit. The
freshness comparison in `test_floor_snapshot.py` — which SKIPS when the core is
absent — was additionally run WITH that core on disk
(`PINNED_CORE_CHECKOUT=…`): 56 passed, ZERO skipped, so the byte-for-byte
assertion CI performs actually ran and passed here.

THE FLOOR GREW BY FIVE, AND ONLY ONE OF THEM IS A SPEC. Measured on the merged
tree, not inferred from the proposal.

  * THE SPEC: `openspec/specs/standards-body-registry/spec.md`. The generated
    block goes 54 -> 55 tracked paths. Coverage over this branch's merged tree:
    all 55 tracked paths under `openspec/specs` are floored, 0 uncovered, and 0
    floored spec paths are dead. Both `project-repo-schema` and
    `standards-body-registry` are present.
  * THE OTHER FOUR ARE CHOKEPOINTS, NOT SPECS, and they arrive here for the
    first time: codexFactory PR #182 (merge `e5534552`, 20:51:52Z — AUTHORED
    BEFORE #183/#184 BUT MERGED AFTER BOTH, which is why they surface at an
    advance whose stated object is a spec) floored the sibling
    FACTORY-IDENTITY REGISTER FAMILY BY NAME —
    `governance/factory-identity/register.yaml` and the wallet, grant and
    custody attestation beside it — realizing THIS repository's own ratified
    `add-cpc-clearing-boundary` task 2.7. By name is FORCED, not preferred:
    `_parse_exact_path` refuses wildcards and trailing slashes, so the
    directory cannot be floored as a prefix. All four exist on this tree,
    verified path by path, so the advisory lane gains four reachable floor
    paths and no dead entry. The document's hand-reasoned chokepoints go
    4 -> 8, and its own self-description moves with it: 4 + 1 becomes 8 + 1.

LOCKSTEP RE-MEASURED RATHER THAN CARRIED OVER: both xFactory judging surfaces
still name `f4702f64` (read directly off xFactory `main` 2026-09-03 — the two
`ref:` literals in `merge-master-approval.yml` and
`council-convening-lane.yml`), so `lockstep.status` stays `diverged` and the
obligation to converge at a future re-point ceremony stands. THE GAP WIDENED BY
FIVE ENTRIES, NOT BY A NEW KIND OF DIVERGENCE: the cause is unchanged from
2026-09-01 and is still forced by the feature.

Also takes a FIFTH catch-up merge of `origin/main` (`9a773a31`, the
`contract-v3.2` cut) — merged, never rebased — and files the archived packet's
tasks.md §5.7 forward with the completed repair. The squash SHA is deliberately
NOT invented there: it is filled in at landing by the merge-provenance comment.

Validated: tests/review_lane_pin + tests/sequenced_after +
tests/test_standards_body_registry.py = 190 passed, 1 skipped, 18 subtests
passed (that one skip being the freshness comparison, separately exercised
green with the core present); tests/doc-health = 1500 passed;
`openspec validate --all --strict` = 86 passed, 0 failed;
`scripts/validate-omnigent-contracts.py` = all checks passed;
`import cryptography` = 41.0.7.

Lane: openxfactory-f2
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01Dt5nEtqzRNgf3Z5fEAQZtF

---------

Co-authored-by: openRepoShape CI <[email protected]>
Co-authored-by: Claude Fable 5.1 <[email protected]>
Co-authored-by: Brett Heap <[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