Skip to content

No doc names a retired control: stale xf-ideation references swept - #161

Merged
brettheap merged 3 commits into
mainfrom
fix/retired-alias-references
Aug 10, 2026
Merged

brettheap merged 3 commits into
mainfrom
fix/retired-alias-references

Conversation

@brettheap

Copy link
Copy Markdown
Contributor

What

The reviewer's three finds after the split-ideation-book-per-repo migration, plus two more of the same class from a full sweep:

  • docs/lifecycle-notebook-projection.md declared xf-ideation retired at line 45 and then used it in its own worked example at line 160 (nlm mindmap create xf-ideation --confirm — now fails). The example names xf-ideation-openxfactory.
  • Four comments stop describing the retired family: authoring.py, the sweep docstring in sync-notebooklm-books.py, and two test-file comments. (Test fixture titles using the old alias as fake notebook titles are left alone — fake-world data, no coverage change.)

Also folded in

  • The archived split change's task 4.3 ("Archive on realization evidence") is checked with a dated citation — discharged by archive commit e9a4be6, left unchecked in that commit by oversight; corrected with a note per the document-lifecycle citation rule, never silently.
  • The session-teardown gap found during the sweep is captured as ideation/brainstorm/session-teardown-notebook-coupling.md: a torn-down session cannot retire its notebook through the governed path (liveness refusal), and no sweep covers the xf-session- namespace. Two verified-dead orphans were hand-deleted as a recorded manual act (this PR's brainstorm is that record's home).

Deliberately not touched

Historical brainstorm/staged captures and the promoted spec's own retirement clauses — they describe the past or prescribe the retirement; they are not operational controls.

Tests: 25 green in the touched suites.

🤖 Generated with Claude Code

The projection doc declared the xf-ideation alias retired at line 45 and
then used it in its own worked example at line 160 — a command that now
just fails, the same failure mode as tonight's runbook incident. The
example now names a per-repo book. Four comments (authoring.py, the sweep
docstring, two test-file comments) stop describing the retired family.

Also: the archived split change's 4.3 box is checked with a dated citation
(discharged by archive commit e9a4be6; left unchecked by oversight —
corrected with a note, never silently), and the session-teardown gap found
during the sweep is captured as a brainstorm (dead sessions cannot retire
their notebooks through the governed path, and no sweep covers the
xf-session namespace).

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Copilot AI lite review requested due to automatic review settings August 10, 2026 13:27

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

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.

Pull request overview

This PR removes stale operational references to the retired xf-ideation alias by updating docs/comments to the per-repo ideation alias family, and records a newly observed operational gap around orphaned xf-session-* notebooks after session teardown.

Changes:

  • Update worked examples and inline commentary to reference xf-ideation-<repo…> / xf-ideation-<repo-slug> instead of the retired xf-ideation alias.
  • Correct an archived OpenSpec task checkbox with an explicit citation note (no silent changes).
  • Add a brainstorm record documenting the “session teardown can orphan its notebook” gap and possible remediation directions.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
tests/notebooklm/test_workbench_sweep_wiring.py Updates module docstring to reflect per-repo ideation alias naming in sweep wiring narrative.
tests/ideation-dashboard/test_authoring_agent.py Updates test docstring commentary describing lifecycle projection notebook semantics to new alias family.
scripts/sync-notebooklm-books.py Updates sweep docstring safety note to reference per-repo ideation alias naming.
scripts/ideation_dashboard/authoring.py Updates authoring module docstring to reference per-repo ideation alias naming.
openspec/changes/archive/2026-08-10-split-ideation-book-per-repo/tasks.md Checks off the archive-on-evidence task with an explicit note/citation trail.
ideation/brainstorm/session-teardown-notebook-coupling.md Adds a brainstorm capturing the session notebook orphaning gap and potential solutions.
docs/lifecycle-notebook-projection.md Fixes the operator runbook example to use the correct per-repo ideation alias.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

* --apply removes `xf-wb-*` notebooks no live manifest binds and keeps
bound ones;
* the lifecycle books (xf-ideation / xf-drafts / xf-canon) and every other
* the lifecycle books (xf-ideation-<repo> / xf-drafts / xf-canon) and every other
* "notebook set-removal semantics" — the LIFECYCLE PROJECTION case
(distinct from the workbench `xf-wb-*` case T029 already covers): a
source manually removed from a projection notebook (`xf-ideation`/
source manually removed from a projection notebook (`xf-ideation-<repo>`/
`NotebookAdapter.list_scratch_result()`, which filters titles on the `xf-wb-`
prefix — the lifecycle books (xf-ideation/xf-drafts/xf-canon) and every
other notebook are not candidates and can never be swept. Degrades
prefix — the lifecycle books (xf-ideation-<repo>/xf-drafts/xf-canon) and
manifest is `workbench.Workbench.remove_member` (T026/T029); removing a
source from a LIFECYCLE PROJECTION notebook (`xf-ideation`/`xf-drafts`/
`xf-canon`) is restored on the next `scripts/sync-notebooklm-books.py` run
source from a LIFECYCLE PROJECTION notebook (`xf-ideation-<repo>`/
CLAUDE.md NotebookLM note updated to the alias family and
title-resolution rule.
- [ ] 4.3 Archive on realization evidence per `release-realization`.
- [x] 4.3 Archive on realization evidence per `release-realization`. — Discharged by the archive commit itself (e9a4be6, 2026-08-10); the box was left unchecked in that commit by oversight and corrected here with this note rather than silently (document-lifecycle: contested findings resolve by citation).
Copilot AI review requested due to automatic review settings August 10, 2026 13:31

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.

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.

Suppressed comments (6)

tests/notebooklm/test_workbench_sweep_wiring.py:8

  • The docstring says lifecycle books are xf-ideation-<repo>, but this test’s fixtures below still use the legacy xf-ideation title (e.g., LIFECYCLE_BOOKS). That mismatch makes it harder to understand what the test is modeling after the split; consider clarifying that the fixture title is intentionally legacy and use the established <repo-slug> placeholder for the new alias family.
  * the lifecycle books (xf-ideation-<repo> / xf-drafts / xf-canon) and every other
    non-`xf-wb-*` notebook are NOT sweep candidates — immune by construction;

scripts/sync-notebooklm-books.py:980

  • The alias placeholder here uses <repo>, but the established convention in the lifecycle-notebook-projection spec/docs is <repo-slug> (see openspec/specs/lifecycle-notebook-projection/spec.md:14 and docs/lifecycle-notebook-projection.md:42). Using the same placeholder improves consistency and avoids implying the raw repo name is always valid in aliases.
    prefix — the lifecycle books (xf-ideation-<repo>/xf-drafts/xf-canon) and
    every other notebook are not candidates and can never be swept. Degrades

tests/ideation-dashboard/test_authoring_agent.py:25

  • For consistency with the spec/docs, use <repo-slug> (not <repo>) in the lifecycle ideation alias placeholder (see openspec/specs/lifecycle-notebook-projection/spec.md:14).
    source manually removed from a projection notebook (`xf-ideation-<repo>`/

scripts/ideation_dashboard/authoring.py:40

  • This docstring paragraph wraps mid-token and drops the leading space on the continuation line, which breaks the indentation/formatting of the surrounding prose. While touching it, consider also using the established <repo-slug> placeholder for the ideation alias family (per openspec/specs/lifecycle-notebook-projection/spec.md:14).
source from a LIFECYCLE PROJECTION notebook (`xf-ideation-<repo>`/
`xf-drafts`/`xf-canon`) is restored on the next `scripts/sync-notebooklm-books.py` run

docs/lifecycle-notebook-projection.md:160

  • This command block mixes two different repo-specific ideation aliases (xf-ideation-opsxfactory on the source-list line vs xf-ideation-openxfactory here). That makes the worked example harder to follow; consider using the same repo slug throughout the example block.
nlm mindmap create xf-ideation-openxfactory --confirm

examples/lifecycle-notebook-workspaces.yaml:12

  • There’s a dangling sentence fragment in this comment block: the line ends with “The” and continues on the next line. This reads like a copy/paste artifact; it would be clearer as a complete sentence.
  # per-repo)" and the xf-ideation alias deleted — never repointed; the
  # renamed notebook was then permanently deleted 2026-08-10 (its content
  # is fully derived from the repo; the migration evidence record in the
  # archived change is the audit trail). The
  # per-repo records follow below.

The archive carried no .openspec.yaml, so doc-health's proposal-origin
family flagged it (error class, auto-fixable — but the declaration is the
author's to make, so: ad_hoc, authored same-day from the 2026-08-10 cap
incident under the doc's own prescribed direction, ratified in-session).
Family verified clean against this tree: 0 errors.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings August 10, 2026 13:40

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.

Pull request overview

Copilot reviewed 9 out of 9 changed files in this pull request and generated no new comments.

Suppressed comments (4)

scripts/sync-notebooklm-books.py:980

  • This docstring mixes placeholder formats for the ideation alias: the module-level docstring uses xf-ideation-<repo-slug>, but this comment uses xf-ideation-<repo>. Using the same placeholder here avoids ambiguity about the required lowercased repo slug.
    prefix — the lifecycle books (xf-ideation-<repo>/xf-drafts/xf-canon) and
    every other notebook are not candidates and can never be swept. Degrades

scripts/ideation_dashboard/authoring.py:40

  • The module docstring wraps the backticked lifecycle notebook list onto a new line, but the continuation line is missing indentation, which breaks the visual structure of the docstring.
source from a LIFECYCLE PROJECTION notebook (`xf-ideation-<repo>`/
`xf-drafts`/`xf-canon`) is restored on the next `scripts/sync-notebooklm-books.py` run

docs/lifecycle-notebook-projection.md:160

  • The command examples use two different repo slugs for the ideation alias (xf-ideation-opsxfactory vs xf-ideation-openxfactory). In this repo’s walkthrough these should be consistent, otherwise the snippet looks copy/pasted and may fail when run.
nlm notebook query xf-canon "What owns gate structure?"
nlm cross query "Where do drafts contradict canon?" --tags "xfactory"

# 4. Artifacts (async on Google's side).
nlm mindmap create xf-ideation-openxfactory --confirm

ideation/brainstorm/session-teardown-notebook-coupling.md:9

  • This new brainstorm doc doesn’t follow the established ideation header format (H1 … — Brainstorm suffix and the full governance header block including Summary: and Topics:). Keeping it consistent with the rest of ideation/brainstorm/ helps doc-health/completeness tooling and makes the corpus uniformly scannable.
# Brainstorm: Session Teardown Must Not Orphan Its Notebook

Status: brainstorm
Kind: architecture
Captured: 2026-08-10

@brettheap
brettheap merged commit 4d26ff8 into main Aug 10, 2026
1 check passed
@brettheap
brettheap deleted the fix/retired-alias-references branch August 10, 2026 13:48
brettheap added a commit that referenced this pull request Aug 10, 2026
#163)

* A session notebook never outlives its session: reconcile the namespace

Brett, 2026-08-10: "fix the session teardown notebook gap" — the gap PR #161's
brainstorm captured after two orphans had to be deleted by hand.

Through the protocol rather than straight into the code, because this is
GOVERNED DELETION on an account shared across the family: brainstorm ->
`ideation/staging/session-notebook-reconciliation/` (+ INDEX row) ->
`add-session-notebook-reconciliation` (deltas to `lifecycle-notebook-projection`
and `ideation-dashboard`) -> realization here.

THE GAP. Both governed endings retire the session notebook. Sessions also end a
third way — a probe clears up, crash residue is swept, someone runs
`git worktree remove` — and that way retires nothing. `--session-ref
--session-retire` cannot clean it up BY DESIGN: it resolves liveness first and
refuses a dead branch, which is exactly what stops it inventing a session and
retiring a LIVE one's notebook. So the dead case gets its own door, and it
establishes death differently: from no live session anywhere claiming the
notebook.

`--session-sweep`, report-only by default:

  * FORWARD-DERIVED. `notebook_alias` is injective but not invertible (the
    readable half strips `draft/` and lowercases; the key half is a digest), so
    a title can never be resolved back to a (repository, branch). The mode
    computes every live session's alias and treats an `xf-session-` notebook
    matching none as dead.
  * FAIL CLOSED. A repository it cannot enumerate looks exactly like one whose
    sessions have ended, and the difference is unrecoverable after a delete. Any
    such repository refuses the whole run and retires nothing.
  * WORKSPACE-SCOPED, by PREFIX not by parsing: repository names and flattened
    branches both contain hyphens, so any title parse is ambiguous exactly where
    being wrong deletes someone else's notebook.
  * `retire`, never a scratch `delete` — the same operation both governed
    endings take, with its own session-prefix guard. An adapter without it
    refuses loudly.

THE LIVE DRY RUN EARNED ITS PLACE IN THE TASK LIST. Its first run reported BOTH
of Brett's live sessions as dead:

  DEAD xf-session-openxfactory-subject-document-estate-…  (discards 10 sources)
  DEAD xf-session-openxfactory-company-provisioning-…     (discards 11 sources)

With --apply that retires two live sessions' notebooks over unmerged work. The
cause: a session's container is keyed on the checkout it was OPENED FROM
(`<checkout>-worktrees/sessions/`), and both were opened from a FEATURE
WORKTREE — not the canonical checkout the enumeration asked. Fail-closed could
not fire and never could: "no sessions in this checkout" is a legitimate answer,
indistinguishable from "the sessions are in another worktree". No unit test
could see it either, because they all stub the enumeration.

The enumeration is now COMPLETE — every worktree git lists for the repository,
which is readable precisely because linked worktrees share one git dir — and a
failure to read that list is an error, not an answer. Second run:

  KEEP xf-session-openxfactory-subject-document-estate-…  (a live session claims it)
  KEEP xf-session-openxfactory-company-provisioning-…     (a live session claims it)
  2 live session(s); no orphans

Pinned by `test_a_session_opened_from_a_feature_worktree_is_seen_as_live`
against a real repository with a real linked worktree, and stated as a
requirement in the delta.

A second fail-safe fell out of writing the tests and is pinned too: a workspace
resolving NO session repositories retires nothing — pointing this mode at the
wrong root is inert rather than destructive.

`live_session_branches_of` lands in `branch_session.py`, beside
`live_session_worktree`, so the projection tooling still cannot invent a second
liveness rule (PR #49 finding 12). It returns `(branches, errors)` because every
failure mode yields FEWER branches, and a bare list would make a broken checkout
look like a clean one.

Runbook §4a: which mode cleans up after a hand teardown, why the targeted route
still refuses a dead branch, and the run-from-the-workspace-root rule.

Suites: tests/ideation-dashboard + tests/ideation_dashboard + tests/notebooklm —
2945 passed, 19 skipped (exit 0). openspec validate --all --strict 57/0.
doc-health exit 0, errors unchanged at 5 pre-existing.

* List add-session-notebook-reconciliation in the README's OpenSpec Records

The convention every active change follows (CLAUDE.md working rules): a new
active change is listed in openxFactory's README so the record is discoverable
without walking `openspec/changes/`.

Carries the finding worth reading before running the mode: the owed live dry run
called two LIVE sessions dead, because a session's container is keyed on the
checkout it was opened FROM and both were opened from a feature worktree the
enumeration never asked.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>

---------

Co-authored-by: brettheap <[email protected]>
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
brettheap pushed a commit that referenced this pull request Aug 25, 2026
#321 retired the fixed "three lifecycle books" count from canon and the
Status: standard workflow doc, and recorded in its §6.1 that the phrase still
survived in code prose it could not touch — that packet declares
code_surface: none and would not quietly acquire one. Brett ruled the
stragglers fixed. This is that sweep: eight instances, all prose, aligned to
the vocabulary #321 ratified.

No new OpenSpec packet, which is the shape PR #161 set for exactly this class
when it swept stale xf-ideation references after split-ideation-book-per-repo:
realization alignment to already-ratified vocabulary ratifies nothing of its
own, so there is nothing here for an approver to decide.

Every instance was verified prose before it was touched, because in this
script books RESOLVE BY TITLE and a title or alias string is functional:

  scripts/sync-notebooklm-books.py
    :46   module docstring  "the three lifecycle books above" -> "the lifecycle
          books above"
    :53   module docstring  "the three books stay MAIN-ONLY" -> "the lifecycle
          books stay MAIN-ONLY"
    :1057 block comment     "beside the three lifecycle books" -> "beside the
          lifecycle books"
  scripts/ideation_dashboard/branch_session.py
    :2774 docstring         "the three lifecycle books" -> "the lifecycle books"
    :2785 OPERATOR NOTICE   "its quota is spent on the three lifecycle books"
          -> "… on the lifecycle books"
  tests/ideation-dashboard/test_session_harness.py
    :282  test docstring    "any of the three books" -> "any of the lifecycle
          books"
  tests/notebooklm/test_sync_notebooklm_books.py
    :820  comment           "the three lifecycle books are untouched" -> "the
          lifecycle books are untouched"
    :1019 comment           "three books already exist" -> "the fixture's
          lifecycle books already exist"

Not one is a book title or an alias. The one user-visible string is
notebook_degradation_notice's FR-042/D19 text, whose docstring warns that the
phrasing IS the requirement — the requirement being that the notice names the
shared quota's competing populations without blaming the reader, which the new
wording keeps exactly. No test asserts on that string and no spec pins it,
both checked before the edit.

No assertion changed, because none carried the phrase. Two counts that are NOT
this defect were deliberately left standing: "a fourth notebook family" and
"three competing populations" count FAMILIES and POPULATIONS, not books, and
both remain true.

Reported, not touched: tests/notebooklm/test_sync_notebooklm_books.py's
LIFECYCLE_BOOKS fixture still lists the retired legacy alias xf-ideation
alongside xf-drafts and xf-canon. That is functional fixture data whose
correction changes test semantics, so it is a deliberate change of its own,
not a line in a prose sweep. The comment at :1019 now says "the fixture's"
so it describes that local three rather than implying a topology.

§6.1 is ticked in the archived packet with an inline dated pointer naming this
fix and the ruling behind it — openly rather than silently, the way
document-lifecycle resolves a contested finding by citation, and the same
shape PR #161 used to tick §4.3 of the archived split packet.

Gates: pytest tests/notebooklm 115 passed 13 subtests passed; tests/ideation-
dashboard/test_session_harness.py 19 passed 1 skipped; tests/ideation-dashboard
-k workbench 140 passed 4015 deselected; tests/doc-health 796 passed 7 skipped,
at main's baseline. Single-repo doc-health 4 critical, 8 error, 73 warning,
4 info, with every finding line BYTE-IDENTICAL to main's — the archived-tasks
tick raises nothing, from record-immutability or any other family. Grep proves
zero remaining in-scope instances and nothing outside the five files.

Co-Authored-By: Claude Fable 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants