Repository navigation
Merge the nlm profile instead of nulling the account address the sync enforces, and match both NotebookLM hosts (#543; #537 harness half) - #601
Conversation
… enforces, and match both NotebookLM hosts (#543; #537 harness half) `write_native_profile()` built its metadata dict literally with `"email": None, "build_label": None` and overwrote `metadata.json` on every successful extraction — `refresh` as well as `bootstrap` — never reading the file it replaced. That erased the identity the sync's hosting enforcement depends on: `profile_account()` reads a null as UNKNOWN, so `enforce_hosting_profile()`'s address refusal was skipped and the run was permitted on the profile NAME alone, which cannot tell one Google account from another. A re-auth into `company` therefore disarmed the check that exists to stop a governed projection being written into the wrong estate. It now MERGES: `email` and `build_label` are carried forward whenever the extraction has no value for them, every other key the store holds survives, and this extraction owns only `csrf_token`/`session_id`/`last_validated`. It also CAPTURES the signed-in address, from the same page HTML already fetched for csrf/session, via `notebooklm_tools.utils.cdp.extract_email` — the function `nlm login` itself uses to fill this very field. A captured address that contradicts the stored one REFUSES the write and exits non-zero naming both, mirroring `nlm login --force`'s guard semantics (a new `--force` overrides). The merge runs before anything is written, so a wrong-account capture leaves cookies.json untouched too. Comparison is case-insensitive and keeps the stored spelling, so the vault-set `[email protected]` does not read as a different account from a lower-cased scrape. Fix (b) of #543 — the sync refusing a null-address hosting profile outright — is deliberately NOT taken here: it hard-blocks every operator whose store has no recorded address, so it is a ruling rather than a cleanup. #537 harness half: the `--cdp-url` page predicate matched only `notebooklm.google.com`, so after the rebrand it matched nothing, fell through to `ctx.pages[0]` and navigated an arbitrary tab. It now accepts BOTH hosts, on the parsed hostname rather than a substring, reuses the NotebookLM tab it finds and opens a NEW tab when there is none — never hijacking one the operator is using — and says which happened. Both operator-facing messages name both hosts. NB_URL STAYS on the old host. The docstring claim it carried ("a wrong host such as notebook.google.com makes extraction time out") entered with the 2026-08-19 docstring rewrite (`fa5ee9f3`, the only commit in this file's history mentioning the new host) with no run behind it, and describes `nlm login`'s allow-list timeout rather than this harness, which never inspects the host. The 2026-08-24 migration in fact extracted successfully from a page the redirect had landed on `notebook.google.com`. What is unevidenced is navigating DIRECTLY to the new host, which cannot be tested without a live signed-in browser — so the redirect dependency is recorded in a comment beside the constant instead of traded for a speculative flip. Docs: the open item's mandatory post-refresh hand-repair becomes a verification step (the read-back stays, since it still proves the estate), and its host paragraphs are corrected. The upstream allow-list (0.5.26 still rejects `notebook.google.com`) and the unattended re-auth property stay open. Lane: openxfactory-smalls Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_012WEcJUPMqpciTRSbJZzkh2
There was a problem hiding this comment.
Hi @brettheap! 👋
Your private repo does not have access to Sourcery.
Please upgrade to continue using Sourcery ✨
|
@codex review |
There was a problem hiding this comment.
🟡 Changes recommended
There are a few concrete correctness/robustness issues in the new metadata merge + test-module stubbing that should be addressed before approval.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR hardens the NotebookLM auth harness (scripts/nlm_auth.py) so it preserves and/or captures the signed-in account identity during refresh, preventing downstream sync hosting enforcement from being silently disarmed, and updates CDP tab selection to support both NotebookLM hostnames post-rebrand.
Changes:
- Merge existing
metadata.jsoninstead of overwriting it, preserving stored identity fields and refusing to write on captured-account mismatch unless--forceis provided. - Update
--cdp-urltab selection to match bothnotebook.google.comandnotebooklm.google.com, preferring an existing NotebookLM tab and otherwise opening a new one. - Add a comprehensive hermetic unit test suite for the harness and update the operator runbook doc to remove the prior hand-repair step and reflect the new host/account behavior.
File summaries
| File | Description |
|---|---|
| scripts/nlm_auth.py | Implements metadata merge + account mismatch refusal and host-correct CDP page selection logic. |
| tests/notebooklm/test_nlm_auth.py | Adds hermetic unit tests covering merge/refusal semantics and the updated host selection predicate. |
| docs/notebooklm-sync-open-item.md | Updates the runbook to reflect the fixed harness behavior and the two-host reality. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 4
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Codex Review: Didn't find any major issues. Hooray! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…s.modules exactly (review round 1)
Four findings from the automated review, all real:
- `read_profile_metadata()` promised to degrade to `{}` on an unreadable store
but caught only OSError/JSONDecodeError, so non-UTF-8 bytes raised
UnicodeDecodeError and crashed the extraction. It now catches ValueError,
which covers both decode failures.
- The no-stored/no-captured `email` branch wrote `metadata.get("email")` back,
preserving a blank or wrongly-typed leftover as if it meant something. It
normalises to null now — which is what the sync reads such a value as anyway.
- `build_label` had the same round-tripping, and did not treat a
whitespace-only value as absent. Both fields now go through one `_clean()`
helper: a non-blank string, or null.
- The test loader popped `playwright` / `playwright.sync_api` out of
`sys.modules` unconditionally, which would have clobbered another module's
stub in the shared interpreter. It saves and restores whatever it found.
Tests: the junk-normalisation matrix (blank, whitespace, int, list, dict), a
new build_label overriding a stored one, and the unreadable-store case widened
to malformed JSON, non-UTF-8 bytes and a valid-but-non-object document.
Also drops a line-number reference in the open item that this change moved.
python3 -m pytest tests/notebooklm -q
204 passed, 37 subtests passed
Lane: openxfactory-smalls
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_012WEcJUPMqpciTRSbJZzkh2
|
Round 1 addressed at @codex review Lane: openxfactory-smalls |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
There was a problem hiding this comment.
🟢 Approval recommended
The changes address the described enforcement-disarming defect with clear refusal semantics and are backed by focused, hermetic tests covering the new behaviors.
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 0 new
- Review effort level: Lite
|
RULING for lane openxfactory-smalls PR #601 (head Lane: openxfactory-smalls |
…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
… 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
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
…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]>
Lane: openxfactory-smalls
One file of code (
scripts/nlm_auth.py), one new test file, and the doc that carried the interim hand-repair.Part 1 — #543 fix (a): the harness stops erasing the identity the sync enforces
What was wrong.
write_native_profile()built its metadata dict literally with"email": None, "build_label": Noneand overwroteprofiles/<name>/metadata.jsonon every successful extraction — therefreshpath as well asbootstrap— never reading the file it replaced. That erased what the sync's hosting enforcement reads:profile_account()treats a null as UNKNOWN, soenforce_hosting_profile()'s address refusal is guarded byif signed_in and …and is SKIPPED, leaving only the profile-NAME check, which a re-auth intocompanypasses no matter which Google account actually signed in. A refresh therefore disarmed the check that exists to stop a governed projection being written into the wrong estate.What it does now.
merge_profile_metadata()starts from the existing metadata:emailandbuild_labelare carried forward whenever the extraction has no value for them, every other key the store already holds survives untouched, and this extraction owns onlycsrf_token/session_id/last_validated. A populatedemailis never replaced with null.notebooklm_tools.utils.cdp.extract_email— the functionnlm loginitself uses to fill this very field, so no new mechanism is invented and the cost is one call on a page we hold. Absence of the extractor is not fatal: the address is then carried forward unverified (the merge floor above), with a note on stderr.--forceoverrides, mirroringnlm login --force("Force overwrite even if profile has credentials for a different account") — the guard this harness bypasses by writing the store directly.[email protected]must not read as a different account from a lower-cased scrape. Upstream compares exactly; this is a deliberate, documented relaxation in the safe direction (the sync compares case-insensitively too).[nlm-auth] account: ….Fix (b) is NOT implemented, and that is a ruling to take. Making
enforce_hosting_profile()refuse a null-address hosting profile outright is strictly stronger, but it hard-blocks every operator whose store legitimately has no recorded address until they populate one — so it wants a decision, not a follow-up commit. With (a) landed, (b) no longer makes every harness re-auth a manual repair step, which was the argument against taking it alone.Part 2 — #537 harness half: both hosts
The
--cdp-urlpage-selection predicate matched onlynotebooklm.google.com, so after the rebrand it matched nothing, fell through toctx.pages[0]and navigated whatever tab the operator happened to have first. It now:notebook.google.comandnotebooklm.google.com, matched on the parsed hostname rather than as a substring (a URL that merely mentions the host in a query string does not qualify);--cdp-urlpath is theirs, not the harness's (the launch path keepspages[0], with a comment: that browser is one we just launched into a dedicated profile dir);NB_URL decision: KEPT on the old host, with the evidence recorded in a comment
The docstring claimed "a wrong host such as notebook.google.com makes extraction time out". Investigated:
git log -S"notebook.google.com" -- scripts/nlm_auth.pyreturns exactly one commit —fa5ee9f3(2026-08-19), the commit that rewrote this docstring wholesale. The claim entered with that prose. No run, test or record stands behind it.nlm login's 300 s "Login timeout", which comes from the CLI's_is_notebooklm_url()allow-list (F1 indocs/notebook-projection-migration-evidence-2026-08-24.md). It says nothing about this harness, which never inspects the host at all.NB_URL, the provider redirected it tonotebook.google.com, and extraction succeeded on that page. So extraction demonstrably works on the new host once the redirect lands.What is NOT evidenced is navigating directly to
https://notebook.google.com/, which no recorded run has done and which cannot be tested here without a live signed-in browser. SoNB_URLis left alone and the redirect dependency plus this evidence is recorded in a comment beside the constant, with the condition for flipping it (a recorded bootstrap+refresh run). A test pins the constant so a future flip is a deliberate act.Docs
docs/notebooklm-sync-open-item.md: step 5's mandatory post-refresh hand-repair becomes a verification step — the harness preserves the address now — while thenlm login profile listread-back stays, since it still proves the check is armed, and step 4'snlm notebook list --profile companyremains the proof of estate. The by-hand re-assertion survives only as the fallback for a store that never had an address. The two host paragraphs are corrected, and the paragraph in the three-grounds list now distinguishes the landed harness half from the still-open upstream half.docs/lifecycle-notebook-projection.mdneeded no host correction — its operator runbook names no host, and its § 12 removal note already saysnotebook.google.com. No new doc, so the README doc index is untouched.Test evidence
New
tests/notebooklm/test_nlm_auth.py, 23 tests, loaded by importlib from path (the suite's pattern) with a refusingplaywright.sync_apistub insys.moduleswhen the real package is absent — playwright is not a dependency of this suite, and a silently-working stub would hide a test that tried to drive a browser. Every context/page is a plain fake; the store root is injected (store=), never~/.notebooklm-mcp-cli;verify()(which shells out to the realnlm, refused bytests/hermeticity.py) is patched out. No browser, no network.Covered:
emailandbuild_labelcarried forward when the new values are None; a populated email never nulled (None /""/ whitespace); a fresh profile writes exactly the five expected keys; other existing keys survive; a captured address populates an empty store; a case-only difference keeps the stored spelling; a differing address raises and--forceoverwrites; on disk — the hand-set address survives a refresh, permissions are 0700/0600, unreadable metadata does not abort the write, and a wrong-account capture leaves both files exactly as they were;extract_and_savewiring end to end (confirm / carry-forward / refuse non-zero / force); the predicate selects anotebook.google.comtab, an old-host tab, opens a new tab when neither exists (and does not touch the tab it declined), handles an empty browser, and matches on host not substring.Closes #543
Refs #537 (harness half only; the upstream notebooklm_tools allow-list — installed 0.5.26 still rejects notebook.google.com — is external, and the unattended re-auth property stays open)
🤖 Generated with Claude Code
https://claude.ai/code/session_012WEcJUPMqpciTRSbJZzkh2