You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A canonical review pass orphaned by a heading rename can never be retired #1648
A pass recorded against a canonical unit whose section is later renamed or deleted becomes an entry naming a unit the tree no longer holds. canonical_review.py status reports those under orphanedPasses, and report renders them under "Passes with no unit". Nothing retires one.
The gap
Two statements close every route:
reports/canonical-review.json's own note says the ledger is "Written by scripts/canonical_review.py record, never by hand, and git keeps the history."
cmd_status says orphans are "Reported rather than pruned here, since deciding that a section is gone rather than moved is a reader's call."
So the reader is given the call and no instrument to make it. record refuses an unknown unit, which is correct and also means it cannot remove one. The result is that an orphan is permanent, and the count only grows.
Current state
python3 scripts/canonical_review.py status | jq '.orphanedPasses' reports six on develop, five from an earlier heading rename in workflow-ci-contract and one from the The Carried-Content Pass to The Carried-Content Sweep rename.
Why it is worth closing
A renamed section is the ordinary case, not an exotic one: any change that retitles a level-two heading in a carried canonical produces one, and the fleet retitles headings routinely. The entry is inert, so this is not urgent, but "a reader's call with no way to make it" is the shape that leaves a ledger nobody trusts.
Candidate shapes, not a decision
A prune subcommand that removes an orphan by key, refusing a key that is not orphaned, so the write stays inside the engine and the note's "never by hand" holds.
Treating a rename as a re-key, which needs the engine to recognise a moved section and is a larger question about whether a renamed heading is the same unit at all.
Found by
The third local review pass on the branch that replaces the per-push canonical gate with a weekly sweep. That branch reports orphans in the sweep and warns on them in the workflow, which surfaces the state and does not close it.
Question: How should scripts/canonical_review.py retire a pass in reports/canonical-review.json that a heading rename or deletion left orphaned: a new prune subcommand, or treating a rename as a re-key?
Options, recommended first:
Add a prune subcommand, orphan keys only (recommended): The write stays inside the engine so the ledger's "never by hand" holds, it refuses any non-orphaned key, and it gives the reader judgment cmd_status defers to an instrument. A renamed unit is already read again under its new key, so pruning loses no coverage. No work in flight.
Treat a rename as a re-key: Carries a pass onto text no reviewer read under that heading, and the engine must decide a moved section is the same unit, which its own comment calls a reader's call. Larger and riskier. No work in flight.
Leave orphans reported only: Costs nothing, but the "pass(es) with no unit" list only grows. No work in flight.
Evidence: canonical_review.py:506-508 (cmd_status): "Reported rather than pruned here, since deciding that a section is gone rather than moved is a reader's call." :678-680: "A renamed one is read again under its new key". cmd_record refuses unknown units (~:740-744). Subcommands are list, status, sweep, record, report (:890-923).
Maintainer answer (decision triage, 2026-11-01): Option 1: add a canonical_review.py prune subcommand that retires orphaned keys only, refusing any key that still resolves to a unit. This is now work for the next burndown round.
Released (2026-11-24): PR #4424 merged to develop at 4846538; branch and worktree cleaned up, so this claim holds no files (scripts/README.md is free again). The issue closes on promotion.
Backlog burndown claim (away run 2026-11-24, round 4, refill group E): branch burndown/canonical-review-prune, issue #1648.
Per the maintainer's answer of 2026-11-01 (option 1): add a canonical_review.py prune subcommand that retires orphaned keys only, refusing any key that still resolves to a unit.
Predicted files:
scripts/canonical_review.py, the new prune subcommand and its parser entry, plus the cmd_status comment and the "pass(es) with no unit" text in sweep and report where they say nothing retires an orphan.
tests/test_canonical_review.py, constructed cases: an orphaned key pruned, a live key refused, an unknown key refused, and a second run writing nothing.
.github/workflows/canonical-review-sweep.yml, the orphan-warning comment and ::warning:: text near lines 92-101, which say no pass closes an orphan.
Not in this claim: reports/canonical-review.json. This change adds the instrument, and pruning the orphans the ledger holds today stays a reader's call per key.
scripts/README.md line ~7, the intro sentence naming which canonical_review.py subcommands write (granted 2026-11-24).
Any other group needing one of these files waits for this branch to merge.
Activity
Sweep the Carried-Content Read Weekly Instead of Gating Every Push (#…
Promote the Weekly Carried-Content Sweep to Main (#1654)
ptr727 commentedon Nov 1, 2026
Decision needed (decision triage, 2026-11-01)
Question: How should scripts/canonical_review.py retire a pass in reports/canonical-review.json that a heading rename or deletion left orphaned: a new
prunesubcommand, or treating a rename as a re-key?Options, recommended first:
prunesubcommand, orphan keys only (recommended): The write stays inside the engine so the ledger's "never by hand" holds, it refuses any non-orphaned key, and it gives the reader judgmentcmd_statusdefers to an instrument. A renamed unit is already read again under its new key, so pruning loses no coverage. No work in flight.Evidence: canonical_review.py:506-508 (
cmd_status): "Reported rather than pruned here, since deciding that a section is gone rather than moved is a reader's call." :678-680: "A renamed one is read again under its new key".cmd_recordrefuses unknown units (~:740-744). Subcommands are list, status, sweep, record, report (:890-923).Blocks: none
ptr727 commentedon Nov 1, 2026
Maintainer answer (decision triage, 2026-11-01): Option 1: add a canonical_review.py prune subcommand that retires orphaned keys only, refusing any key that still resolves to a unit. This is now work for the next burndown round.
ptr727 commentedon Nov 24, 2026
Released (2026-11-24): PR #4424 merged to develop at 4846538; branch and worktree cleaned up, so this claim holds no files (scripts/README.md is free again). The issue closes on promotion.
Backlog burndown claim (away run 2026-11-24, round 4, refill group E): branch
burndown/canonical-review-prune, issue #1648.Per the maintainer's answer of 2026-11-01 (option 1): add a
canonical_review.py prunesubcommand that retires orphaned keys only, refusing any key that still resolves to a unit.Predicted files:
scripts/canonical_review.py, the newprunesubcommand and its parser entry, plus thecmd_statuscomment and the "pass(es) with no unit" text insweepandreportwhere they say nothing retires an orphan.tests/test_canonical_review.py, constructed cases: an orphaned key pruned, a live key refused, an unknown key refused, and a second run writing nothing.scripts/README.md, thecanonical_review.pysection's subcommand list and exit-code account (passed from the parked validate-task.yml Lint Steps Fail a Release on a Transient Docker Hub Error #1727 group, whose branch holds no commits ahead oforigin/develop)..github/workflows/canonical-review-sweep.yml, the orphan-warning comment and::warning::text near lines 92-101, which say no pass closes an orphan.Not in this claim:
reports/canonical-review.json. This change adds the instrument, and pruning the orphans the ledger holds today stays a reader's call per key.scripts/README.mdline ~7, the intro sentence naming whichcanonical_review.pysubcommands write (granted 2026-11-24).Any other group needing one of these files waits for this branch to merge.
Add a prune Subcommand to Retire Orphaned Canonical Review Passes (#4424