Repository navigation
Description
Four citations on main point at unrelated lines, and every rule passes
Verified at 5d5191e8, with check_doc_citations.py --root . exiting 0 on the same tree.
| citation | what the prose says it is | what the line actually is |
|---|---|---|
h2.rs:710 |
self.stream_table.rst_sent_contains(sid) |
let total_before = *total; |
h2.rs:2567 |
the pre-prepare rst_sent insert |
// served this pass so we can advance \Prioriser::incremental_cu…` |
h2.rs:2668 |
the post-prepare HPACK over-budget insert |
// defense-in-depth log on every re-entry. 38 bytes is… |
h2.rs:2775 |
the mid-loop completed_streams.push path |
// by design (M4), so there is no position gate here. Set on… |
Where those symbols actually live at 5d5191e8:
rst_sent_contains 2552, 2602, 6267
rst_sent.insert 717, 8310
completed_streams.push 2832
Three of the four land on comment lines, which is the tell: the prose describes an insert or a push, and the citation resolves to a sentence about something else.
Why nothing catches them
Each rule is individually satisfied, and the combination leaves a hole:
- Rule 1 asks only that the line resolve and be non-blank. A comment line is non-blank, so it passes.
- Rule 2 compares a citation's text between base and head. These numbers are byte-identical on both sides of every recent changeset, so the rule sees no change and stays silent. It detects drift within a changeset, not accumulated staleness that predates it.
- Rule 3 checks cited test names, not code citations.
- Rule 4 compares pinned
```rustblocks byte-for-byte, and none of these four is pinned.
So a citation that was already wrong when the drift rule first saw it is frozen in that state permanently: it is never re-examined, because "unchanged" is exactly the condition for being exempt.
This is the same structural gap as #1457 and #1459, from a third direction — not a partial update, not an unextractable form, but a citation that has simply always been wrong. The gate is a change detector, and a change detector cannot find a defect that predates its first observation.
Suggested direction
A change detector needs a periodic full audit to complement it. Two options:
- A
--auditmode that, for every citation, checks whether the cited line plausibly matches the prose — at minimum flagging a citation whose target is a comment line while the prose names a statement or call. Crude, but three of these four would have been caught by that one heuristic. - Convert them to symbols, which is what the repository has been doing elsewhere and what makes the question well-posed:
rst_sent_containshas three call sites and a citation can name the function rather than guess a line.
The four above should be repaired regardless; they are wrong today and mislead any reader who follows them.
Provenance
Found during the rule-3 audit of an unrelated rebase, and confirmed independently against main before filing. Not introduced or moved by any recent changeset — they are byte-identical across the whole series.
Related: #1447 (reused span number), #1457 (half-applied renumbering exempts siblings), #1459 (bare :NNN never extracted).
Activity
ci(doc): forbid a file.rs:NNN citation written in a Rust comment
FlorentinDUBOIS commentedon Sep 24, 2026
Narrowing this issue to what actually remains, because its original four citations are gone and the reason they are gone is not the reason this issue exists.
The four cited citations are resolved on
mainAll four lived in the doc surface, not in Rust comments — which is precisely why rules 1 and 2 were each "individually satisfied" by them. At
9472cd96,LIFECYCLE.mdnames all threenote_ineligiblesites by symbol and in words, with no line numbers:That conversion arrived with the write-path inversion (#1479,
deb23f16), not from any work aimed at this issue. The citations were correct-by-replacement rather than repaired.What #1493 does and does not do for this
#1493 adds a rule forbidding
file.rs:NNNin a Rust comment, and converts the live ones to symbols. That addresses #1473's half. It does not address this issue's structural ask, and is markedRefsrather thanClosesfor that reason: the new rule leavesdoc/**and**/LIFECYCLE.mdfree to carry line numbers, which is exactly where the four citations in this issue lived.What remains: the
--auditmodeThis issue's real finding stands untouched — a change detector cannot find a defect that predates its first observation. Rule 2 compares a citation's text between base and head; a citation that was already wrong the first time the rule saw it is frozen in that state permanently, because "unchanged" is the condition for being exempt.
Measured while working on #1493:
LIFECYCLE.mdstill carries five numerich2.rs:NNNtargets in one span alone. One was spot-checked —h2.rs:2494, cited as "theH2WritePhase::Resumeretirement", resolves toself.remove_dead_stream(dead_id, global_stream_id);, which reads correct. The other four are unaudited and sit in rules 1 and 2's known blind spot.So the remaining work is option 1 from the original report: a periodic full audit to complement the change detector. The crude heuristic named there — flag a citation whose target is a comment line while the prose names a statement or call — would have caught three of this issue's original four.
Option 2, convert-to-symbol, has now been taken everywhere it can be taken cheaply, and #1493 makes it enforceable for Rust comments. The doc surface is the part that still needs the audit rather than a prohibition, because a line number in
doc/**is sometimes the only way to point at a span that has no symbol.ci(doc): forbid a file.rs:NNN citation written in a Rust comment (#1493)
ci(doc): audit a citation that was already wrong when the gate first …