Skip to content

canonical_review.py Has No Prune Path for a Retired Unit, So the Ledger Note and the Orphan Report Disagree #1387

Description

@ptr727

reports/canonical-review.json opens with a note saying it is written by scripts/canonical_review.py record and never by hand. status and report list a pass recorded against a unit the tree no longer holds as an orphan, and the engine's own comment at the orphan computation says it is reported rather than pruned, because deciding that a section is gone rather than moved is a reader's call. No subcommand acts on that call once it is made.

So a reader who knows a unit is gone, the ordinary case being a section deleted by the same change that retired it, has two options and both are wrong: edit the ledger by hand, which the note forbids, or leave the entry to be reported as an orphan on every status and report forever. #1385 met this when it retired the condensed d-guarantees catalog's five level-two sections and renamed one SKILL.md heading, and kept a hand prune of the six entries on the maintainer's call, so the note is already contradicted once in the ledger's history.

Proposal

A prune subcommand, or record --retire <key>, that removes the named entries from the ledger and refuses a key that still resolves to a unit in the tree, so a section that moved is re-keyed by a fresh pass rather than dropped. status keeps reporting orphans, and the new verb is what a reader runs on the ones the report names. The note then stays true.

Found by #1385's diff pass, which read the note against the hand prune in the same diff.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions