Repository navigation
Conversation
The export's `citations` table conflated five situations in `excused` (1 when a directive acknowledges it): an in-force site and a loud one both exported 0, and so did a site a lint.inactive_ok rule sanctions. - `standing`: in-force | acknowledged | sanctioned | unacknowledged | dangling, read from Citation.standing in ref_status (DP-004), so the export copies the lint's reading rather than re-deriving it. A mention-ok site stands where its target puts it: in-force over a document in force, acknowledged over a retired or dangling one. - `excused_by`: the directive (`inactive-ok @ path:line`) or the rule (`lint.inactive_ok[N]`), NULL when nothing clears the site. - `excused` widens to 1 for a directive OR a rule. Citation now carries `resolves` and `in_force`, which _acknowledge already knew and dropped. Record: ADR-tmptj3j3, changelog, devlog. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KC8NN4NtUf8sd5unC6dpFV
This branch has not been deployed
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.
This is stacked on #378. Merge that first; this PR's base will then move to
main.Why
The export's
citationstable had one binary column,excused, set to 1 when a directive acknowledges the citation. It could not tell apart five situations the lint already distinguishes:lint.inactive_okrule (Add lint.inactive_ok: pattern rules for citations of retired documents that need no acknowledgement #378) sanctions it;In-force sites and unacknowledged ones both exported as
excused = 0, and a sanctioned site looked unacknowledged.What
standing TEXT NOT NULL: one ofin-force,acknowledged,sanctioned,unacknowledgedordangling. A dangling site underunresolved-okisacknowledged.excused_by TEXT: what clears the site. It isinactive-ok @ path:linefor a directive (orinactive-ok-file, orunresolved-ok),lint.inactive_ok[N]for a rule, and NULL when nothing clears it.excusedgeneralized: it is now 1 when a directive or a rule excuses the site.ref_status(Citation.standing,Citation.cleared_by), from the same scan the lint reads.export.pyonly copies the values out (DP-004).Citationnow keeps two facts the scan already had and was dropping: whether the code resolves, and whether the cited document is in force.mention-ok sites
mention-okover a document in force leaves the sitein-force, withexcused = 1andexcused_bynaming the mention, since a mention claims nothing about status.acknowledged.standingandexcused_by.Record
ADR-tmptj3j3records the change of meaning forexcusedand the rejected alternatives: keepingexcusedas it was and adding onlystanding; droppingexcused; deriving the standing inexport.py.docs/cli.mddescribes the new columns.Tests
excused_byfor a directive and for a rule,excused= 1 for both acknowledged and sanctioned sites, themention-okcases, andCitation.standingitself.luria lintgives the same findings as before.Generated by Claude Code