Commit 6787631
test(rules-doc): close both /code-review findings
The exactly-one-pointer guard added two commits ago claimed more
than it enforced. Its docstring said a shipped rule "cannot keep a
stale tracking pointer once its issues close", but the test reads
the doc only and cannot see code. Meanwhile
test_implemented_matches_citing_modules skipped any rule without
implemented:, so a rule that gained code and a citation while
keeping tracked: passed both. That is exactly the state the
docstring called unrepresentable.
The citations test now handles the tracked: branch, and the
docstring states its own scope instead of the pair's: neither test
alone makes a stale pointer unrepresentable, the pair does.
Mutation-tested on the finding's own scenario -- adding a P6
citation to _post_rules.py while leaving tracked: in place now
fails with the swap instruction, and the restore was verified by
diff.
The DEVIATION note on P1 wrote its example values in double quotes,
which put four extra quoted spans inside the citation block that
test_citations_are_verbatim_excerpts parses -- it passed only
because the check takes the FIRST span. Moving the note above the
citation line, a natural edit, would have made the excerpt resolve
to "de Mesnil Juan" and failed against prose that is entirely
correct. Values are unquoted now, and the note says why so the next
editor does not helpfully re-add them.
Considered and rejected: asserting exactly one quoted span per
citation block, which would be the unrepresentable-states fix.
Measured first -- 38 blocks carry one, but _group.py's M1 block
legitimately carries six, so the invariant does not hold today and
imposing it would mean rewriting an unrelated comment.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent 1f5e0b8 commit 6787631
3 files changed
Lines changed: 28 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
106 | 110 | | |
107 | 111 | | |
108 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
102 | 102 | | |
103 | 103 | | |
104 | 104 | | |
| 105 | + | |
105 | 106 | | |
106 | | - | |
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
112 | 122 | | |
113 | 123 | | |
114 | 124 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
42 | 49 | | |
43 | 50 | | |
44 | 51 | | |
| |||
0 commit comments