Skip to content

Ratify + promote apply-workbench-branch-sessions-delta: the ratified delta reaches canon - #317

Closed
brettheap wants to merge 2 commits into
mainfrom
change/apply-workbench-branch-sessions-delta
Closed

brettheap wants to merge 2 commits into
mainfrom
change/apply-workbench-branch-sessions-delta

Conversation

@brettheap

Copy link
Copy Markdown
Contributor

The catch, verbatim

The promotion-fidelity family commissioned by add-promotion-fidelity-check reported two findings on its first run, and both were against this repository's own archive. Re-measured here through the real code path — scripts/doc_health/promotion_fidelity.py via runner.build_context + families.FAMILIES["promotion-fidelity"] — at the branch point:

family: promotion-fidelity
count: 2
---
  severity: 'warning'
  path: 'openspec/changes/archive/2026-08-01-add-workbench-branch-sessions/specs/lifecycle-notebook-projection/spec.md'
  rule: "ratified ADDED requirement 'Branch-session notebooks' is absent from openspec/specs/lifecycle-notebook-projection/spec.md"
---
  severity: 'warning'
  path: 'openspec/changes/archive/2026-08-01-add-workbench-branch-sessions/specs/lifecycle-notebook-projection/spec.md'
  rule: 'requirement \'Corpus scan scope\' reached openspec/specs/lifecycle-notebook-projection/spec.md without 1 of its 4 ratified scenarios: "A canon book is offered a branch session\'s drafts"'

add-workbench-branch-sessions (archived 2026-08-01) carried two delta files. The ideation-dashboard one landed whole — the family reports nothing against it. The lifecycle-notebook-projection one did not: its ADDED requirement "Branch-session notebooks" never reached the promoted spec at all, along with all five of its scenarios, and its MODIFIED "Corpus scan scope" arrived carrying the pre-2026-08-01 body and three of its four scenarios. The absent body is where the delta wrote the load-bearing sentences: the scan is of the governed corpus at the default branch, branch-session worktrees are named among the excluded nested working copies, and branch-session notebooks are the ONLY notebook surface permitted to read a worktree — never contributing a source, a title or a repository name to a lifecycle book, and never relaxing the exclusion for one. The archive act moved the packet; it never touched canon.

Canon had meanwhile been built on the gap: add-session-notebook-reconciliation (archived 2026-08-13) governs the retirement of an xf-session- notebook family whose defining requirement canon never admitted.

The ratification act

Brett ruled the first of the two lawful exits add-promotion-fidelity-check task 5.1 named, in-session on 2026-08-24, verbatim:

fix the workbench-branch-sessions promotion gap

That is the ratification act for this packet, which adds no normative content of its own. It is the same exit, in the same shape, that codexFactory PR #85 took for its own instance of the class — a code_surface: none change that restates the ratified delta and archives on landing. No approving OpenSpec change exists to name, so the proposal carries the record-citing Ratified: spelling sanction-ratified-record-spelling sanctioned, clearing its three-way floor on approver (by Brett) and date (2026-08-24).

Upstream 1274b9bf had recorded the same ruling on the box while this branch was in flight ("Box stays open until that change lands"). The merge keeps that note verbatim and appends the discharge line after it — append discipline, both notes standing.

Drift check — performed before anything was written

Latest-writer-wins was verified directly, not taken on the family's word:

  • Only two archived changes in the corpus contain Requirement: Corpus scan scope — 2026-07-12-exclude-worktrees-from-notebook-projection (earlier) and 2026-08-01-add-workbench-branch-sessions (this one's source). 2026-08-01 is therefore the latest ratified writer.
  • Branch-session notebooks is named by that change alone.
  • The three archived changes that touch lifecycle-notebook-projection after 2026-08-01 touch neither requirement: 2026-08-05-adopt-neutral-tooling-home modifies "Projection implementation ownership"; 2026-08-10-split-ideation-book-per-repo modifies "Derived notebook membership" and adds "Projection capacity guard"; 2026-08-13-add-session-notebook-reconciliation adds "The session namespace is reconciled against live sessions".

Result: applying the ratified text clobbers no later ratified work. No STOP condition.

Byte-fidelity proof

The delta file in this packet is a byte-for-byte copy of the archived one — copied, never retyped:

f6ffd39abeab7a1548a93ed78fda9a24d8da19606fbc5f30dc85fe013b0361cd  archive/2026-08-01-add-workbench-branch-sessions/specs/lifecycle-notebook-projection/spec.md
f6ffd39abeab7a1548a93ed78fda9a24d8da19606fbc5f30dc85fe013b0361cd  archive/2026-08-25-apply-workbench-branch-sessions-delta/specs/lifecycle-notebook-projection/spec.md
diff exit: 0

After promotion, each requirement block was extracted from both the ratified delta and the promoted spec and hashed — not eyeballed:

requirement ratified delta promoted canon diff scenarios
Branch-session notebooks 107ede785f5ff13c… 107ede785f5ff13c… exit 0 5
Corpus scan scope 99fa2a84f1a59d6d… 99fa2a84f1a59d6d… exit 0 4

Re-verified identical after the origin/main merge. The capability goes from 13 requirements to 14; "Corpus scan scope" from 3 scenarios to 4.

Family figures, before and after

Measured through the same real code path both ways:

promotion-fidelity findings
branch point 54e3c418 2 (both warning, both against 2026-08-01-add-workbench-branch-sessions)
this branch, after promotion 0

This packet's own archived delta adds none of its own — the archive of this very change reads clean.

The full eighteen-family sweep over the branch point and over this branch diffs to exactly one line:

7c7
<   promotion-fidelity: 2
---
>   promotion-fidelity: 0

Every other family — document-catalog 1, ideation-routing 2, location-conformance 2, proposal-origin 33, record-immutability 4, staged-candidate-aging 11, staged-topic-template 28, status-validity 3, standard-backing 0, ratified-provenance 0, succession-integrity 0, tag-hygiene 0 — is byte-identical to the branch point. No finding anywhere names the new packet's path, so the archived proposal.md passes the four lifecycle families clean, with exactly one in-window citation line clearing the approver and date axes.

The two findings clear by application, which was the ruling — not by a health/dispositions.yaml entry, and not by editing the check.

Validator and test output

OPENSPEC_TELEMETRY=0 openspec validate apply-workbench-branch-sessions-delta --strict
EXIT=0
Change 'apply-workbench-branch-sessions-delta' is valid

OPENSPEC_TELEMETRY=0 openspec validate --all --strict        (change ACTIVE)
EXIT=0
Totals: 76 passed, 0 failed (76 items)

OPENSPEC_TELEMETRY=0 openspec validate --all --strict        (after archive, merged tree)
EXIT=0
Totals: 75 passed, 0 failed (75 items)

python3 -m pytest tests/doc-health -q                        (branch point)
EXIT=0
764 passed, 7 skipped in 15.44s

python3 -m pytest tests/doc-health -q                        (merged tree)
EXIT=0
764 passed, 7 skipped in 15.65s

python3 -m pytest tests/ideation-dashboard -k workbench -q    (merged tree)
EXIT=0
140 passed, 4010 deselected in 20.35s

75 baseline → 76 active → 75 after archive, exactly as expected. 764 passed, 7 skipped unmoved. Exit codes read directly, never through a pipe.

Archive folder date

The CLI stamped 2026-08-25-apply-workbench-branch-sessions-delta: the archive act ran at 22:06 local on 2026-08-24, which is 02:06 UTC on the 25th. That is the CLI's UTC stamp and the shape the README already records for 2026-08-24-govern-openspec-corpus-membership ("the folder date is the CLI's UTC stamp"). Left as the CLI wrote it rather than renamed, so the archive-commit ordering the family's tie-break reads stays honest.

Recorded, not fixed

The ratified body carries a book count a later change made stale. "Corpus scan scope" as ratified opens "The three LIFECYCLE BOOKS' projection SHALL scan …", and "Branch-session notebooks" says a session notebook "SHALL NOT be one of the three lifecycle books". On 2026-08-10 split-ideation-book-per-repo replaced the single shared Ideation book with one per governed repository, so the family is now the two shared books plus one per repo — not three. Restating faithfully therefore carries a stale numeral into canon that would have been equally stale had the delta been promoted on time.

It is named rather than silently corrected because correcting it is a normative edit to ratified text, which is the one thing this change exists not to do; #85 set the precedent in the same words. Nothing normative turns on the numeral: the classes are named explicitly in the same requirement ("any lifecycle book — Ideation, Working Drafts, or Canon") and the exclusion rule is written against those names, not a count. A successor change reconciling the count is the lawful fix. Recorded in the proposal's § Recorded, not fixed and in tasks 1.4.

Scope

  • code_surface: none. No module, test, workflow, schema, threshold or governed document changes. The promotion-fidelity family that reported the gap is untouched.
  • Behavior: none. The described behavior was realized by add-workbench-branch-sessions and has been built on since; this change moves text, not state.
  • Task 5.1 of add-promotion-fidelity-check is ticked under append discipline — box text unchanged, upstream's ruling note kept, one dated pointer line appended. That change stays ACTIVE; its own archive gate is merge-plus-green on its code surface and is not this change's to close.
  • README: one Archived-changes row for this packet, and the active add-promotion-fidelity-check row updated so its "deliberately left for the governance act that fixes them" sentence stays truthful.

🤖 Generated with Claude Code

brettheap and others added 2 commits August 24, 2026 22:09
…delta reaches canon

The promotion-fidelity family's first live catch was in this repository's own
archive, and this is the governance act that clears it. `add-workbench-branch-sessions`
(archived 2026-08-01) ratified a `lifecycle-notebook-projection` delta whose
ADDED requirement "Branch-session notebooks" never reached the promoted spec at
all, and whose MODIFIED "Corpus scan scope" arrived with the pre-2026-08-01 body
and three of its four scenarios. The archive act moved the packet; it never
touched canon.

Brett ruled the first of the two lawful exits, verbatim: "fix the
workbench-branch-sessions promotion gap" — apply the ratified delta via a proper
change, the same shape codexFactory PR #85 used for its own instance of the
class. `code_surface: none`, so the packet archives on landing.

Byte-fidelity, not re-derivation: the delta file is a byte-for-byte copy of the
2026-08-01 delta (SHA-256 f6ffd39abeab7a1548a93ed78fda9a24d8da19606fbc5f30dc85fe013b0361cd,
empty diff). After promotion both requirement blocks were extracted and hashed
against the ratified source — "Branch-session notebooks" 107ede78…, "Corpus scan
scope" 99fa2a84… — identical on both sides, five and four scenarios
respectively. The capability goes from 13 requirements to 14.

Drift checked before writing anything, not assumed: only two archived changes in
the corpus contain "Requirement: Corpus scan scope", the 2026-07-12 worktree
exclusion and this one's source, so 2026-08-01 is the latest ratified writer;
"Branch-session notebooks" is named by that change alone. The three later
writers of the capability touch neither requirement — adopt-neutral-tooling-home
(2026-08-05) modifies "Projection implementation ownership",
split-ideation-book-per-repo (2026-08-10) modifies "Derived notebook membership"
and adds "Projection capacity guard", add-session-notebook-reconciliation
(2026-08-13) adds "The session namespace is reconciled against live sessions".
Applying the ratified text clobbered no later ratified work.

Measured through the real code path both ways (`promotion_fidelity.py` via
`runner.build_context` + `families.FAMILIES`): 2 advisory findings before, 0
after, and this packet's own archived delta adds none of its own. Every other
family's count is identical to the branch point — the full eighteen-family sweep
diffs to exactly one line, promotion-fidelity 2 -> 0.

Task 5.1 of add-promotion-fidelity-check is ticked under append discipline: the
box text stands as written, with one dated line naming the exit taken. That
change stays ACTIVE; its own archive gate is merge-plus-green on its code
surface and is not this change's to close.

Recorded rather than fixed: the ratified body says "the three LIFECYCLE BOOKS",
a count split-ideation-book-per-repo made stale on 2026-08-10 when the shared
Ideation book became one per governed repository. Restating faithfully carries
the stale numeral into canon. Correcting it is a normative edit to ratified text
— the one thing this change exists not to do — and belongs to a successor change
with its own ratification. Nothing normative turns on it: the exclusion rule is
written against the book names, not the count.

Validated: `openspec validate apply-workbench-branch-sessions-delta --strict`
green, `--all --strict` 76 with the change active and 75 after archive (baseline
75). `pytest tests/doc-health` 764 passed / 7 skipped, unmoved.
`pytest tests/ideation-dashboard -k workbench` 140 passed.

Co-Authored-By: Claude Fable 5 <[email protected]>
…h-branch-sessions-delta

# Conflicts:
#	openspec/changes/add-promotion-fidelity-check/tasks.md
Copilot AI lite review requested due to automatic review settings August 25, 2026 02:22

@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 pull request ratifies and promotes the previously ratified add-workbench-branch-sessions delta into canonical OpenSpec by applying the archived lifecycle-notebook-projection delta text (including the missing requirement and scenario) and recording the discharge of the promotion-fidelity findings.

Changes:

  • Promotes the ratified Corpus scan scope body and adds the missing ratified scenario (“A canon book is offered a branch session's drafts”) into openspec/specs/lifecycle-notebook-projection/spec.md.
  • Promotes the ratified ADDED requirement Branch-session notebooks (with its scenarios) into canon.
  • Records the governance discharge in openspec/changes/add-promotion-fidelity-check/tasks.md and updates README.md with an archived-change entry plus the “act landed” note.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
README.md Updates the Active/Archived change listings to record the promotion-fidelity discharge and add the archived-change entry.
openspec/specs/lifecycle-notebook-projection/spec.md Applies the ratified delta into canon: updates “Corpus scan scope” and adds “Branch-session notebooks” with scenarios.
openspec/changes/archive/2026-08-25-apply-workbench-branch-sessions-delta/tasks.md Adds the archived packet’s execution checklist and recorded evidence.
openspec/changes/archive/2026-08-25-apply-workbench-branch-sessions-delta/specs/lifecycle-notebook-projection/spec.md Stores the archived delta copy for traceability/byte-fidelity.
openspec/changes/archive/2026-08-25-apply-workbench-branch-sessions-delta/proposal.md Adds the archived proposal documenting rationale, scope, and recorded-not-fixed notes.
openspec/changes/archive/2026-08-25-apply-workbench-branch-sessions-delta/.openspec.yaml Adds the archived OpenSpec metadata for the packet.
openspec/changes/add-promotion-fidelity-check/tasks.md Ticks and annotates task 5.1 to record that the governance act landed and cleared findings.

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

Comment thread README.md
Comment on lines +1016 to +1019
one. Canon had meanwhile been built on the gap:
`add-session-notebook-reconciliation` (2026-08-13) governs the retirement of
a notebook family whose defining requirement canon never admitted. `code_surface:
none`, so it archives on landing. The delta file is a **byte-for-byte copy**
@brettheap

Copy link
Copy Markdown
Contributor Author

Full-sweep addendum, beyond the house gate.

python3 -m pytest tests/ideation-dashboard (the whole directory, 4150 tests) was run on this branch as extra diligence, since this change touches no code:

1 failed, 4121 passed, 28 skipped in 555.23s (0:09:15)
FAILED tests/ideation-dashboard/test_snapshot.py::test_find_validator_locates_pinned_checkout

That failure is a pre-existing environment artifact, not this change. Measured rather than asserted: the same test, run on a clean 1274b9bf worktree carrying none of this branch's commits, fails identically —

tests/ideation-dashboard/test_snapshot.py:73: AssertionError: assert None is not None
  where None = snapshot.find_validator(conftest.REPO_ROOT)
1 failed in 5.81s

find_validator returns None because a scratch clone has no pinned aggregation checkout above it. Same class as the known client-identity doc-health failures that only fail outside a real aggregation checkout.

Every other test file spanning that region of the run — test_session_verbs.py, test_session_transaction.py, test_shared_identity.py, test_smoke_signals.py — passes in isolation on this branch, 140/140.

The house gate for this change is green as reported in the body: tests/doc-health 764 passed / 7 skipped, tests/ideation-dashboard -k workbench 140 passed, openspec validate --all --strict 75 passed / 0 failed.

@brettheap

Copy link
Copy Markdown
Contributor Author

Closed unmerged as the duplicate of apply-branch-sessions-deltas (main 042df4e), which landed mid-flight from a parallel session. Independent corroboration, for the record: both packets restate the same 2026-08-01 ratified delta byte-identically (delta file sha256 f6ffd39a…, Corpus scan scope block 99fa2a84…, Branch-session notebooks block 107ede78…), and this branch's promoted spec diffs 0 lines against main — two independent derivations produced the same canon from the same ratified source. The promotion-fidelity family reads 0 findings on main at 51a875a; the §5.1 box is ticked upstream with the ruling note kept verbatim. One ruling, one discharge: the landed packet is it. Residual still owed by neither packet (both carry ratified text faithfully): the stale 'three lifecycle books' count, made stale by split-ideation-book-per-repo on 2026-08-10 and present in canon plus five places in docs/lifecycle-notebook-projection.md — a small successor change reconciling the count is the lawful fix.

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