A temporary code is a code the status checker can see - #205
Merged
Conversation
Reference resolution handled merge-allocated codes; reference standing did not. `ref_status` loaded a scheme through `documents()`, which keys by number and skips any file it cannot get one from, and matched codes with a digits-only pattern — so a temporary document was neither loaded nor cited. Both blind spots had to hold for the finding to stay hidden, and both did: for the whole life of a pull request filing merge-allocated documents, citations among them went unchecked, and the findings appeared only after the merge that concretized the codes. `documents()` keeps its return type. `adr_index.load_scheme()` already returns numbered documents plus temporary ones and `Adr.code` already spells either, so `_load_scheme` asks it instead of re-deriving the answer. `CODE_RE` composes `TEMP_TAIL` rather than restating it, and the scan loop runs each scheme's `temp_pattern` alongside its numeric one. Fired on both real corpora. Here it found five source comments citing `ADR-tmpstat1`, a tail no document has ever answered to — corrected to ADR-085, which then surfaced the finding underneath: the decision is still Proposed and the code that implements it cites it as settled. That one is left visible. The illustrations of the temporary shape — ADR-049's prose, the README transcript, fixture tails — carry `unresolved-ok` acknowledgements now. Closes #203 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YP4P3m8rzVFb8idnTE4FfT
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.
Closes #203.
Options (1)+(2) from the issue.
luria link --fixhas always treated a merge-allocated code as a code;ref_statusnever did, and the halves disagreeing was the bug.The fix
The issue worried that (1) means widening
documents(), whosedict[int, Path]return five call sites were deliberately consolidated onto. It doesn't.adr_index.load_scheme(scheme)already returns numbered documents plus temporary ones, andAdr.codealready spells either — soref_status._load_schemeasks that function instead of re-deriving the answer, anddocuments()keeps answering "every numbered document", which is a different question and still the right one for its callers.CODE_REcomposesconfig.TEMP_TAILrather than restating the shape.temp_patternalongside its numeric one._codes()(which parses a directive's arguments) keeps temporary tails whole instead ofint()-ing them, so an acknowledgement can name one.Five tests, written first, three of which failed for the right reasons before the change.
What it found on its first run here
Five source comments cited
ADR-tmpstat1— inconfig.py,contract.py,init.py,site.pyandstatuses.py. No document has ever answered to that tail: it is not a minted one and it is in noformerly:list. It was hand-written as a placeholder for the decision that became ADR-085, and because nothing scanned temporary codes, five source files claimed a decision explained them while the claim resolved nowhere. Corrected toADR-085.That surfaced the finding underneath, which this PR leaves visible:
ADR-085 shipped; it is still
Proposed. That is exactly the drift the module exists to report, so it is not acknowledged — aninactive-ok:would go stale the moment the decision is accepted.pending-documentsnow reads "3 undecided document(s), oldest 1 days, 1 with unacknowledged references". Accepting ADR-085 (and 084, 086) clears it. Warning class, so CI is unaffected.The one-time cost
The check is unmasked by design, so an illustration of the temporary shape reads as a citation. Eleven sites here — ADR-049's prose, the README transcript, the CLI page,
CONTRIBUTING.md, fixture tails in three test files — cleared with nineunresolved-okacknowledgements.Every record that documents merge allocation pays this once.
anthology-of-the-sotahas exactly one (LIT-tmp3kf9x, in its ADR-013), and the acknowledgement has to be filed with the version bump: on the older luria the code is not scanned, so the directive excuses nothing and gets reported stale.Fired before trusting (DP-6)
ADR-tmpstat1comments.anthology-of-the-sota: filed aProposedpractice withluria new sota, cited it from SOTA-145, and gotSOTA-tmp14p3h is Proposed, cited 1× in 1 file(s)— the finding A merge-allocated document is invisible to the status checker, from both ends #203 says arrived a merge too late. Probe reverted.python -m pytest tests -q→ 937 passed.luria lint→ the ADR-085 warning above, otherwise unchanged.🤖 Generated with Claude Code
https://claude.ai/code/session_01YP4P3m8rzVFb8idnTE4FfT
Generated by Claude Code