feat(decision-records): warn when a living doc cites a superseded record - #14
Merged
Merged
Conversation
Supersession retires a record, but nothing re-read the docs that cite it: a rulebook resting on 0007 kept resting on it after 0019 replaced it, silently. check (and build) now print a WARN naming the successor for every cite of a superseded record found in a living doc — body refs, bare or linked, plus front-matter relates_to. A warning and never a failure, because a mention can be deliberately historical. Two exemptions keep it quiet where citing is right: archived records are frozen history and cite what they like, and the record that supersedes an old one may of course name it. Also documents sign-off in references/promotion.md: every name in a promoted record's deciders approves the promotion PR (enforced socially or via CODEOWNERS + required approvals — the tool cannot see PR state), and a ratification-grade promotion can add one signed tag per decider, making "who signed exactly this text" verifiable long after the PR page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
S3, the last of the convention refresh: the one integrity check nothing off the shelf provides — Doorstop-style suspect links, adapted to this convention.
The warning
Supersession retires a record, but nothing used to re-read the docs citing it: a rulebook resting on
0007kept resting on it after0019replaced it.check(andbuild) now print aWARNnaming the successor for every cite of a superseded record in a living doc — body refs bare or linked, plus front-matterrelates_to.It warns and never fails: a mention can be deliberately historical, and only a human can tell. Two exemptions keep it quiet exactly where citing a retired record is correct: archived records (frozen history) are not swept, and the record that supersedes an old one may of course name it.
Sign-off notes
references/promotion.mdgains a Sign-off section: every name in a promoted record'sdecidersapproves the promotion PR before merge (socially enforced, or mechanically via CODEOWNERS ondocs/decisions/+ required approvals — the tool cannot see PR state). For ratification-grade promotions, an optional signed tag per decider (git tag -s) makes "who signed exactly which text" cryptographically verifiable long after the PR page.Verification
109 tests pass (4 new: warn with successor named,
relates_towarns, superseding record exempt, archived records not swept — with the living record that cites both retired records shown warning in the same run).validate_skills.pyandpre-commit run --all-filesclean.