Repository navigation
docs(mux): repoint three citations at the code they name - #1504
Merged
Merged
Conversation
FlorentinDUBOIS
requested review from
Wonshtrum and
llenotre
as code owners
September 24, 2026 12:47
FlorentinDUBOIS
force-pushed
the
docs/mux-claim-corrections
branch
from
September 24, 2026 13:40
30c6f06 to
dbe0059
Compare
…e code lib/src/protocol/mux/LIFECYCLE.md carried three `path:NNN` citations that resolved to real, non-blank, unrelated lines, which is all any rule in check_doc_citations.py asks of them: - §4.2 put the `Context.streams` push at `mod.rs:713-714`. Those are `listener.get_sticky_name().to_string()` and `listener.get_sozu_id_header().to_string()`, arguments of the `HttpContext::new(...)` call that opens `Context::create_stream`. The push is `self.streams.push(stream)` at `mod.rs:773`. - §3.1's `Unlinked` bullet read `h1.rs:995-1052`. `995` is a format string in `ConnectionH1::end_stream`'s wrong-stream `error!` guard and `1052` is a `debug_assert!` argument; the four `StreamState::Unlinked` assignments the range is meant to bracket are `h1.rs:1042-1099`. It was exact at fbc83ed (`h1.rs:737-772` against assignments at 737, 745, 767 and 772) and successive renumberings walked it off them. - §7.5's arm-site list read `h2.rs:5387`, which is `log_context!(self)` inside an `error!` for an out-of-bounds header block fragment. The HEADERS liveness refresh is `self.stream_table.touch_activity(stream_id, self.now)` at `h2.rs:5421`. The two commits directly below this one each renumbered that citation and neither noticed: #1501 moved it from `h2.rs:5376` to `h2.rs:5384`, and #1497 from `h2.rs:5384` to `h2.rs:5387`. Both moves were faithful and both landed on `log_context!(self)`: a re-anchor preserves the pointer, not the claim. §7.2 described all three per-stream reap caches as `ConnectionH2` fields holding a `HashMap`. Both halves are wrong and have been since #1415's stream-slot-bookkeeping extraction: `stream_last_activity_at`, `stream_fc_stalled_since` and `stream_fc_stalled_progress` are private `BTreeMap` fields of `H2StreamTable`, built by `BTreeMap::new()` in `H2StreamTable::new`, and `ConnectionH2` declares no field of any of those names. #1415 converted them for the determinism reason its own CHANGELOG entry records and updated §4.1's wire-map bullet, but left §7.2 on the pre-extraction shape, so the section now inverts the ordering guarantee the code provides. Cited by symbol rather than line: that module is being edited under #1338. CHANGELOG.md's #1484 entry said `shared::drain_tls_close_notify`'s two uncovered lines were uncovered "because nothing calls that function at all". It has two production callers, the `Position::Server` arms of `ConnectionH1::close` and `ConnectionH2::close`. What #1484 measured is that its own six-test fixture never reaches them. Only that causal clause changed; every count and probe tally in that historical entry was true as measured and is left as written. The three citations sat in the drift rule's exemption: it keys on the citation tuple as it stood in the base revision of the citing document, so a renumbered span is counted exempt and never compared. Measured at 42ed6ba over the window they were renumbered in, --base f2082b6 --show reported 133 exempt cited ends across 91 doc sites; 11 are fenced blocks the pinned-quote rule already compares verbatim, and reading the remaining 80 against the code they name found 77 correct and these three wrong. --base 42ed6ba --show on this tree exempts 109 more, the spans #1501's and #1497's renumberings re-anchored: 15 pinned fences, the 4 repaired here, and 90 that anchor on byte-identical text before and after them. --audit reports 7 findings on this tree, all 7 the heuristic pairing a prose symbol with a line eight or more away from it. The three §7.2 declarations were in no rule's surface at all: every rule resolves a `path:NNN` or a fenced quote, and a sentence naming a type and a container carries neither. Sweeping LIFECYCLE.md for the same shape leaves only the three `ConnectionH2.streams` references that Documentation only: no production code, no test, no dependency and no Cargo.lock entry changes. Signed-off-by: Florentin Dubois <[email protected]>
FlorentinDUBOIS
force-pushed
the
docs/mux-claim-corrections
branch
from
September 24, 2026 14:37
dbe0059 to
f60bb4c
Compare
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.
Three citations in
lib/src/protocol/mux/LIFECYCLE.mdresolved to real, non-blank, unrelated lines; three field declarations named the wrong container and the wrong owner; and oneCHANGELOG.mdsentence named the wrong reason for a coverage gap. Documentation only.1. §4.2 —
Context.streamspush:mod.rs:648-649→mod.rs:773648-649 are
listener.get_sticky_name().to_string()andlistener.get_sozu_id_header().to_string(), arguments of theHttpContext::new(...)call that opensContext::create_stream. The push the bullet describes isself.streams.push(stream)atmod.rs:773, past theRecycle-reuse early return the bullet names as its own precondition.2. §3.1 —
Unlinkedtransitions in H1:h1.rs:995-1052→h1.rs:1042-1099995is a format string insideConnectionH1::end_stream's wrong-streamerror!guard;1052is adebug_assert!argument. The fourStreamState::Unlinkedassignments the range is meant to bracket are at 1042, 1061, 1091 and 1099. It was exact when written —fbc83edfcarriedh1.rs:737-772against assignments at 737, 745, 767 and 772 — and successive renumberings walked it off them while keeping it plausible.3. §7.5 — HEADERS liveness refresh:
h2.rs:5387→h2.rs:54215387islog_context!(self)insideerror!("… header_block_fragment out of bounds of zero.storage"). The refresh isself.stream_table.touch_activity(stream_id, self.now)ath2.rs:5421, under the comment that names it. Two commits have now renumbered this citation faithfully and still onto the wrong statement: #1501 took it5376→5384, then #1497 took it5384→5387. Each move preserved the pointer and neither preserved the claim. A re-anchor preserves the pointer, not the claim.4.
CHANGELOG.md— #1484's coverage noteThe entry said
shared::drain_tls_close_notify's two uncovered lines were uncovered "because nothing calls that function at all". It has two production callers: thePosition::Serverarms ofConnectionH1::close(h1.rs:953) andConnectionH2::close(h2.rs:6358), each importing it fromshared.rs. What #1484 measured is that its own six-test fixture never reaches them.Only that causal clause changed. Every count, probe tally and mutation result in that historical entry was true as measured and is left exactly as written — a CHANGELOG is a log, not a live dashboard. The replacement cites by symbol rather than line, so it cannot rot.
5. §7.2 — the three per-stream reap caches: wrong container and wrong owner
ConnectionH2.stream_last_activity_at: HashMap<StreamId, Instant>,ConnectionH2.stream_fc_stalled_since: HashMap<StreamId, Instant>andConnectionH2.stream_fc_stalled_progress: HashMap<StreamId, usize>→H2StreamTable.<name>: BTreeMap<…>for all three.Both halves are wrong, and have been since #1415's stream-slot-bookkeeping extraction. The three are private
BTreeMapfields ofH2StreamTable(h2_stream_table.rs:139,:143,:147, built byBTreeMap::new()at:177-179); enumeratingConnectionH2's 34 struct fields finds none of those names.#1415 converted them for the determinism reason its own CHANGELOG entry records —
collect_timed_out's union decided which of several simultaneously-timed-out streams wasRST_STREAM'd first, and aHashMapmade that order vary across restarts — and it updated §4.1's wire-map bullet, but left §7.2 on the pre-extraction shape. Reading §7.2's container name as a determinism claim currently inverts the guarantee the code provides.No rule could have caught these. Every rule in
check_doc_citations.pyresolves apath:NNNor a fenced quote, and a sentence naming a type and a container carries neither — these sat in no rule's surface at all. So the class was swept directly instead: everyConnectionH2.<field>reference inLIFECYCLE.mdchecked against the real struct. The only stale ones left are threeConnectionH2.streamsreferences (:55,:396,:428) which belong to thestreams→BTreeMapchangeset, not here.The new CHANGELOG paragraph cites
H2StreamTableandH2StreamTable::newby symbol, not by line: that module is being edited concurrently,CHANGELOG.mdis outside the gate's surface (doc/**and**/LIFECYCLE.mdonly), so a pinned line number there would rot silently — exactly the disease this branch treats.Why the gate passed all three
check_doc_citations.py's drift rule keys its exemption on the citation tuple as it stood in the base revision of the citing document. A span the changeset re-anchored is counted exempt and never compared — and a renumbering is a re-anchor. All three sat in that blind spot, each landing on a line that is real and non-blank, which is all the resolver rules ask.The sweep, and its ratio
Note that
--base <the same SHA the tree is at>compares HEAD to itself and yields an exempt set of 0 by construction — a no-op dressed as a clean bill. The base has to be calibrated to the window the errors were born in:42ed6bac,--base f2082b6e --show(the ~28-commit window these were renumbered in): 133 exempt cited ends across 91 doc sites. 11 sites are fenced blocks the pinned-quote rule already compares verbatim; reading the remaining 80 against the code they name found 77 correct and these 3 wrong.--base 8248c782(parent of refactor(mux-h2): put the H2 core's buffers and HPACK state under a BufferSource #1496, which wrote the badmod.rs:648-649) yields exactly 54 exempt spans, reproducing an earlier narrower sweep whose single finding is item 1 here. The wider window subsumes it.--base 42ed6bac --showon this branch: 67 more exempt, the spans refactor(mux-h2): render the peer address where Debug named the socket #1501's renumbering re-anchored — 15 pinned fences, the 4 repaired here, and 48 anchoring on byte-identical text before and after. refactor(mux-h2): render the peer address where Debug named the socket #1501 moved every pointer it touched faithfully, including the one that was already wrong.--audit --root .: 7 findings, all 7 the heuristic pairing a prose symbol with a line ≥8 away; every target checked and correct. 0 real.Deliberately not changed
LIFECYCLE.md:2023(h2.rs:6330-6428) and:2040(h2.rs:6367-6427) have exact range starts, and ends that stop ~6 lines short of the closing brace (6433 / 6435), landing on anerror!argument inside the very block they describe. Imprecise, not misdirecting — a different class, and the clipping predates this window.Validation
Documentation-only; no Rust file touched, so the Rust battery establishes nothing about it and was not run.