Repository navigation
Skeleton leftovers: quote cited bullets, Except-fence review lesson, retired-ID guard (#761 follow-up) - #788
Merged
Merged
Conversation
Fourteen comments named a rule's Except or Accepted bullet by description and quoted nothing, so test_doc_citations could not check them. Each now quotes the bullet (an Except bullet by its whole bold lead, which bullet_lead_findings holds it to) beside its rule ID, says which clause the code implements or pins, and points at the decisions entry. Two named the wrong bullet: test_parser.py's 'M2 Accepted row' is M2's Except bullet on post-comma text, and test_pieces.py's 'no-comma peel's Accepted limit' is S7's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-up) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PR #786 replaced the tombstone with 'A retired rule's decisions entry records the retirement', which left 'never reused' unenforced. A retired rule's decisions file now carries a line opening 'Retired:', and test_no_rule_reuses_a_retired_id refuses a rule file with that ID. The reader lives in tests/v2/design_docs.py. A misspelled Retired line and one in a file keyed by no rule ID are findings too, since either would switch the refusal off silently. No rule is retired yet, so the real-tree test refuses nothing; test_a_rule_file_reusing_a_retired_id_is_refused builds a synthetic decisions file and a rule file reusing its ID and is the negative control (it fails with the ID check disabled, measured). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- test_properties: drop the two maiden-clause pairs said to differ; measured, both spellings of each read alike since #601, and M2's bullet the new citation quoted accepts no such split. - _extract: the M3 contrast is a suffix word ('née PhD'), not V, which M2 also reads as the maiden name. - Retired: a numbered '1. Retired:' line is a misspelling too (the new row failed against the old pattern first). - docs/design/AGENTS.md axis 3: two incidents on the record (H1 in #779, S3's Msc.Ed. row in #783), not three; a row Then decides may belong under Accepted. The skip list names the new guard. - cases.py: shape 7's U+00B7 half is what the W4 Except decides. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #788 +/- ##
=======================================
Coverage 99.05% 99.05%
=======================================
Files 47 47
Lines 4642 4642
=======================================
Hits 4598 4598
Misses 44 44 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Follow-up to #761. This lands three loose ends the skeleton migration left behind. No rule text, example or parse result changes, and the corpus and snapshot do not move.
1. Citation comments quote the bullet they name
Fourteen comments named a rule's bullet by description and quoted nothing ("C14's Except", "R3's Accepted clause", "W4's interpunct Except", …), so
tests/v2/test_doc_citations.pycould not check them. These include the four found after the migration plus ten more that a grep for's Except|Accepted|Precedenceand "Then bullet" turned up. Each comment now has three parts:bullet_lead_findingsholds it to);decisions/pointer.The citation test now reads all of them.
bullet_lead_findingscounts 7 citations that name a bullet, up from 2.Two comments had named the wrong bullet:
Review found two comments next to new citations that were false about how names parse, measured on this tree:
_extract.pyillustrated the M3/M2 contrast withnée V. M2 reads that as the maiden name too, so the example is nownée PhD.Not touched: the
notes=strings in tests/v2/cases.py, and twoen.tomlnotes that say "P6's Accepted clause". They are data strings rather than comments, and the citation sweep reads neither.2. Design review, axis 3: check Except fence rows against their bullet
docs/design/AGENTS.md axis 3 is amended in place. A row in an Except fence must be one where Then does not hold. Read each row against its bullet's bold lead. A row Then still decides moves out of the fence: to the main fence, or to the Accepted bullet that records it as a cost. Nothing checks which fence a row stands in.
Two cases are on record, both caught in review:
Msc.Ed.row, PR Migrate the S rules (S1–S9) to the skeleton format (#761, part 8) #783.A third case, a T1 row in PR #782, was in my brief, but neither that PR's body nor its commits record it, so I left it out.
3. Retired rule IDs are guarded
#786 changed the tombstone wording to "A retired rule's decisions entry records the retirement", which left "never reused" unenforced. As decided:
Retired:.test_no_rule_reuses_a_retired_idrefuses a rule file whose ID a decisions file records that way. The readers (rule_file_ids,retired_ids,reused_id_findings) are intests/v2/design_docs.py.Retired:line in a file keyed by no rule ID, and a line that misspellsRetired:(bold, a list marker or number, lowercase, an indent).docs/design/rules/README.mdanddocs/design/decisions/README.md.No rule is retired today, so the real-tree test refuses nothing. Its own assertions check only that both readers reach the folders.
The negative control is
test_a_rule_file_reusing_a_retired_id_is_refused. It builds a synthetic decisions folder recording X9 as retired and a rules folder withX9-reused.md, then runs them through the same readers:Folded:in place ofRetired:, passes.The
1. Retired:misspelling row failed against the first version of the pattern before the fix.Verification
uv run pytest: 22197 passed, 123 skipped, 3 xfailed.uv run mypy: clean.uv run ruff check: clean.🤖 Generated with Claude Code