Repository navigation
Description
What happens
CITATION requires a path (.github/scripts/check_doc_citations.py):
CITATION = re.compile(
rf"(?P<path>{PATH}):(?P<spans>{SPAN}(?:[,/][ \t]*(?:\n[ \t]*)?{SPAN})*)"
)So the very natural idiom of naming the file once and then continuing with bare line numbers produces citations that no rule in the script can see — not rule 1 (resolves/non-blank), not rule 2 (drift), not rule 3, not rule 4. They are not reported as unresolvable; they are never extracted in the first place.
Three of them exist today, all inside the guarded surface (doc/** and **/LIFECYCLE.md):
doc/rate-limit-design.md:151 `lib/src/tcp.rs:183` and `:305`
doc/testing.md:599 `h2_correctness_tests.rs:3604` and `:3708`
lib/src/protocol/mux/LIFECYCLE.md:311 `router.rs:394` and `:574`
In each, the first half is checked on every CI run and the second half has never been checked at all.
Why it matters
The two halves name sibling sites in the same function, so they rot together — but only one of them can ever be caught. The result is worse than an unchecked citation: a reader sees the guarded half land correctly and reasonably infers the unguarded half is equally maintained.
This is confirmed, not hypothetical. While rebasing #1442, LIFECYCLE.md:311's guarded half was correctly re-anchored router.rs:394 → :442, and the bare `:574` was left untouched. At the rebased tree :574 reads socket_ref, inside a register_socket call; the real second context.link_stream(stream_id, token); site is at :622. The gate was green throughout. It was found by hand, and only because someone was already auditing that hunk.
Relationship to the other two gaps
Three distinct ways a citation escapes, all in the same identity/extraction path:
- check_doc_citations.py keys drift on the whole span tuple, so a half-applied renumbering exempts every sibling number #1457 — a half-applied renumbering exempts its siblings, because drift identity is the whole span tuple. A false negative on a citation the script did extract.
- The drift rule keys on span numbers, so a reused line number is a false positive with no correct fix #1447 — a reused line number is a false positive with no correct fix.
- This — a citation the script never extracts, so no rule applies. The half-applied renumbering in http: a stale keep-alive upstream connection is answered with 502 instead of being retried on another backend #1442 hit this gap, not check_doc_citations.py keys drift on the whole span tuple, so a half-applied renumbering exempts every sibling number #1457's:
router.rs:394/574written as two separate backtick spans rather than one/-group.
Fixing #1457 does not help here, and vice versa.
Suggested direction
Two options, and the second is probably better:
-
Extract bare spans with an inherited path. Track the most recent resolved path within a paragraph and attach it to a following bare
`:NNN`. This matches how a reader parses the prose, but it is a heuristic — paragraph scope is not well defined, and a bare:NNNthat means something else (a port, a status code,:status) would be mis-extracted. Notedoc/testing.md:599already contains the token`:status`one sentence later, so the false-positive surface is real. -
Reject the form. Add a rule that fails on a bare
`:NNN`inside the guarded surface and requires the path to be repeated. Three sites exist, so the migration is small and one-time. This trades a little prose repetition for a citation that is checkable at all — and the repository has consistently preferred that trade, most recently in check_doc_citations.py ignores .md:NNN targets, and all six in the tree are wrong #1444, which replaced a line range with an anchor precisely to leave the brittle form behind.
Whichever is chosen, the three existing sites should be repaired in the same changeset; LIFECYCLE.md:311 is already handled on fix/http-retry-stale-upstream.
Activity
fix(ci): bind and check a citation's bare `:NNN` continuation
fix(ci): bind and check a citation's bare `:NNN` continuation
fix(ci): bind and check a citation's bare `:NNN` continuation (sozu-p…