Repository navigation
docs(protocol): retarget name.rs upstream citations at the 3.5.0 pin - #7318
Merged
Merged
Conversation
The citation gate is pinned at 3.5.0 (`xtask/src/commands/citations.rs` MANIFEST_PATH / PINNED_SOURCE_DIR), and `tools/ci/upstream-3.4.4-lines.tsv` does not exist. Every `flist.c:` citation in this file still named a 3.4.4 line, so all twelve were stale; the drift gate could only see one of them. The whole cited region shifts by a constant +83 between the two releases (731 -> 814, 757 -> 840, 768 -> 851), and the constructs are otherwise byte-identical, so this is a pure retarget with no semantic change: recv_file_entry() name reading 760-800 -> 843-883 XMIT_LONG_NAME / read_varint30 731-734 -> 814-817 iconv block 757-764 -> 840-847 io_error |= IOERR_GENERAL 758 -> 841 FERROR_UTF8 message 759-762 -> 842-845 pathname safety check 768-772 -> 851-855 !relative_paths absolute reject 769 -> 852 One correction beyond the retarget: three sites cited `flist.c:768 exit_cleanup(RERR_UNSUPPORTED)`, but 768 (now 851) is the block-opening `if`, not the `exit_cleanup`. They now name 854, which is the call itself. Only the `io_error |= IOERR_GENERA` anchor was visible to the drift gate; the other eleven have no tracked anchor and would have survived a one-line patch to the flagged citation. That invisible class is task 652. MEASURED: tools/ci/citation_drift_audit.py before protocol: string-anchored=56 suspected-drift=1 (2%) after protocol: string-anchored=56 suspected-drift=0 (0%) Each new target verified against the pinned 3.5.0 source, not inferred from the offset: 814 `if (xflags & XMIT_LONG_NAME)`, 841 `io_error |= IOERR_GENERAL;`, 842 `rprintf(FERROR_UTF8,`, 852 the clean_fname/relative_paths test, 854 `exit_cleanup(RERR_UNSUPPORTED);`. Comments only; no code changes.
oferchen
enabled auto-merge (squash)
August 14, 2026 04:56
oferchen
added a commit
that referenced
this pull request
Aug 14, 2026
… 3.5.0 #7305 moved the pinned upstream source from 3.4.4 to 3.5.0. Ten PRs authored before that flip merged after it, so their citations name 3.4.4 line numbers in a tree the gate resolves against 3.5.0. This clears the `core` ratchet, which five open PRs currently inherit: FAIL: core suspected-drift rose 3 -> 4 (before) core: suspected-drift=0 (after) Every target was verified against BOTH tarballs. Only the first is a mechanical retarget; the rest needed the enclosing construct because the anchor the audit extracts is not unique in its file. 1. flags.rs generator.c:298 -> :304 `io_error & IOERR_GENERAL` is unique; surrounding context is byte-identical. 2. daemon_transfer/connection/mod.rs clientserver.c:382 -> :425 `rprintf(FERROR, "` occurs many times. The site is the `@ERROR` handler, located by `strncmp(line, "@error", 6)` (3.4.4:381 -> 3.5.0:424) and confirmed by byte-identical context. 3. flags.rs options.c:2852-2857 -> :3018-3023 4. invocation/tests.rs options.c:2850-2851 -> :3016-3017 (two sites) Both were already correct 3.4.4 RANGES; the audit flagged them only because it anchors on the range's prose (`if (am_sender)`), which occurs three times in options.c and is not on the cited line. The blocks are byte-identical at a constant +166. The comments are re-anchored on `args[ac++] = "--super"` and `args[ac++] = "--only-write-batch=X"`, each unique in options.c, so the audit can resolve them instead of guessing. 5. invocation/tests.rs main.c:1839 -> :1919, sender.c:217 -> :501 ⚠ Neither was reported by the ratchet - it only inspects lines containing the word `upstream`, and these sit mid-sentence in a doc comment. Both were stale. `sender.c` moved by +284 where options.c moved by +166, so an offset applied in bulk would have been wrong; each was located by its construct (`if (write_batch < 0) dry_run = 1` and `f_xfer = write_batch < 0 ? batch_fd : f_out`). `core` drops 4 -> 0, so its baseline goes 3 -> 0 in the same commit, as the baseline file requires - leaving it at 3 would keep accepting drift that no longer exists and hide the next regression under that headroom. Deliberately out of scope: - `protocol` (`flist.c:758`) - the identical fix is already in #7318. - `daemon` (`clientserver.c:1559`) - same cohort, fixed on #7314. Measured on ce8c63d: `tools/ci/citation_drift_audit.py --ratchet` reports core=0; `cargo xtask citations` passes (7826 citations); `cargo fmt --all -- --check` clean.
oferchen
added a commit
that referenced
this pull request
Aug 14, 2026
… 3.5.0 (#7321) #7305 moved the pinned upstream source from 3.4.4 to 3.5.0. Ten PRs authored before that flip merged after it, so their citations name 3.4.4 line numbers in a tree the gate resolves against 3.5.0. This clears the `core` ratchet, which five open PRs currently inherit: FAIL: core suspected-drift rose 3 -> 4 (before) core: suspected-drift=0 (after) Every target was verified against BOTH tarballs. Only the first is a mechanical retarget; the rest needed the enclosing construct because the anchor the audit extracts is not unique in its file. 1. flags.rs generator.c:298 -> :304 `io_error & IOERR_GENERAL` is unique; surrounding context is byte-identical. 2. daemon_transfer/connection/mod.rs clientserver.c:382 -> :425 `rprintf(FERROR, "` occurs many times. The site is the `@ERROR` handler, located by `strncmp(line, "@error", 6)` (3.4.4:381 -> 3.5.0:424) and confirmed by byte-identical context. 3. flags.rs options.c:2852-2857 -> :3018-3023 4. invocation/tests.rs options.c:2850-2851 -> :3016-3017 (two sites) Both were already correct 3.4.4 RANGES; the audit flagged them only because it anchors on the range's prose (`if (am_sender)`), which occurs three times in options.c and is not on the cited line. The blocks are byte-identical at a constant +166. The comments are re-anchored on `args[ac++] = "--super"` and `args[ac++] = "--only-write-batch=X"`, each unique in options.c, so the audit can resolve them instead of guessing. 5. invocation/tests.rs main.c:1839 -> :1919, sender.c:217 -> :501 ⚠ Neither was reported by the ratchet - it only inspects lines containing the word `upstream`, and these sit mid-sentence in a doc comment. Both were stale. `sender.c` moved by +284 where options.c moved by +166, so an offset applied in bulk would have been wrong; each was located by its construct (`if (write_batch < 0) dry_run = 1` and `f_xfer = write_batch < 0 ? batch_fd : f_out`). `core` drops 4 -> 0, so its baseline goes 3 -> 0 in the same commit, as the baseline file requires - leaving it at 3 would keep accepting drift that no longer exists and hide the next regression under that headroom. Deliberately out of scope: - `protocol` (`flist.c:758`) - the identical fix is already in #7318. - `daemon` (`clientserver.c:1559`) - same cohort, fixed on #7314. Measured on ce8c63d: `tools/ci/citation_drift_audit.py --ratchet` reports core=0; `cargo xtask citations` passes (7826 citations); `cargo fmt --all -- --check` clean.
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
…7318) The citation gate is pinned at 3.5.0 (`xtask/src/commands/citations.rs` MANIFEST_PATH / PINNED_SOURCE_DIR), and `tools/ci/upstream-3.4.4-lines.tsv` does not exist. Every `flist.c:` citation in this file still named a 3.4.4 line, so all twelve were stale; the drift gate could only see one of them. The whole cited region shifts by a constant +83 between the two releases (731 -> 814, 757 -> 840, 768 -> 851), and the constructs are otherwise byte-identical, so this is a pure retarget with no semantic change: recv_file_entry() name reading 760-800 -> 843-883 XMIT_LONG_NAME / read_varint30 731-734 -> 814-817 iconv block 757-764 -> 840-847 io_error |= IOERR_GENERAL 758 -> 841 FERROR_UTF8 message 759-762 -> 842-845 pathname safety check 768-772 -> 851-855 !relative_paths absolute reject 769 -> 852 One correction beyond the retarget: three sites cited `flist.c:768 exit_cleanup(RERR_UNSUPPORTED)`, but 768 (now 851) is the block-opening `if`, not the `exit_cleanup`. They now name 854, which is the call itself. Only the `io_error |= IOERR_GENERA` anchor was visible to the drift gate; the other eleven have no tracked anchor and would have survived a one-line patch to the flagged citation. That invisible class is task 652. MEASURED: tools/ci/citation_drift_audit.py before protocol: string-anchored=56 suspected-drift=1 (2%) after protocol: string-anchored=56 suspected-drift=0 (0%) Each new target verified against the pinned 3.5.0 source, not inferred from the offset: 814 `if (xflags & XMIT_LONG_NAME)`, 841 `io_error |= IOERR_GENERAL;`, 842 `rprintf(FERROR_UTF8,`, 852 the clean_fname/relative_paths test, 854 `exit_cleanup(RERR_UNSUPPORTED);`. Comments only; no code changes.
oferchen
added a commit
that referenced
this pull request
Aug 24, 2026
… 3.5.0 (#7321) #7305 moved the pinned upstream source from 3.4.4 to 3.5.0. Ten PRs authored before that flip merged after it, so their citations name 3.4.4 line numbers in a tree the gate resolves against 3.5.0. This clears the `core` ratchet, which five open PRs currently inherit: FAIL: core suspected-drift rose 3 -> 4 (before) core: suspected-drift=0 (after) Every target was verified against BOTH tarballs. Only the first is a mechanical retarget; the rest needed the enclosing construct because the anchor the audit extracts is not unique in its file. 1. flags.rs generator.c:298 -> :304 `io_error & IOERR_GENERAL` is unique; surrounding context is byte-identical. 2. daemon_transfer/connection/mod.rs clientserver.c:382 -> :425 `rprintf(FERROR, "` occurs many times. The site is the `@ERROR` handler, located by `strncmp(line, "@error", 6)` (3.4.4:381 -> 3.5.0:424) and confirmed by byte-identical context. 3. flags.rs options.c:2852-2857 -> :3018-3023 4. invocation/tests.rs options.c:2850-2851 -> :3016-3017 (two sites) Both were already correct 3.4.4 RANGES; the audit flagged them only because it anchors on the range's prose (`if (am_sender)`), which occurs three times in options.c and is not on the cited line. The blocks are byte-identical at a constant +166. The comments are re-anchored on `args[ac++] = "--super"` and `args[ac++] = "--only-write-batch=X"`, each unique in options.c, so the audit can resolve them instead of guessing. 5. invocation/tests.rs main.c:1839 -> :1919, sender.c:217 -> :501 ⚠ Neither was reported by the ratchet - it only inspects lines containing the word `upstream`, and these sit mid-sentence in a doc comment. Both were stale. `sender.c` moved by +284 where options.c moved by +166, so an offset applied in bulk would have been wrong; each was located by its construct (`if (write_batch < 0) dry_run = 1` and `f_xfer = write_batch < 0 ? batch_fd : f_out`). `core` drops 4 -> 0, so its baseline goes 3 -> 0 in the same commit, as the baseline file requires - leaving it at 3 would keep accepting drift that no longer exists and hide the next regression under that headroom. Deliberately out of scope: - `protocol` (`flist.c:758`) - the identical fix is already in #7318. - `daemon` (`clientserver.c:1559`) - same cohort, fixed on #7314. Measured on 30b95b7: `tools/ci/citation_drift_audit.py --ratchet` reports core=0; `cargo xtask citations` passes (7826 citations); `cargo fmt --all -- --check` clean.
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.
crates/protocol/src/flist/read/name.rscarried twelveflist.c:citations, all still naming 3.4.4 line numbers. The gate is pinned at 3.5.0, so all twelve were stale — but only one was visible.Why the pin is 3.5.0
⚠
.github/workflows/citations.yml:27says the gate readstools/ci/upstream-3.4.4-lines.tsv. That file does not exist — the comment is false and is what made this citation look correct. Worth fixing separately; it is not touched here.The retarget
The cited region shifts by a constant +83 between releases and the constructs are otherwise byte-identical, so this is a pure retarget with no semantic change.
recv_file_entry()name readingXMIT_LONG_NAME/read_varint30io_error |= IOERR_GENERALFERROR_UTF8message!relative_pathsabsolute reject841, not 1316. Both are
iconvbufs(ic_recv, ...) < 0insiderecv_file_entryunder the same#ifdef ICONV_OPTION, so a line number alone cannot separate them. Therprintfbelow each does: 841 isFERROR_UTF8/ "cannot convert filename"; 1316 isFERROR_XFER/ "cannot convert symlink data for", gated onsender_symlink_iconv. This site callscannot_convert_filename_message, so it is the filename converter.One correction beyond the retarget: three sites cited
flist.c:768 exit_cleanup(RERR_UNSUPPORTED), but 768 (now 851) is the block-openingif, not theexit_cleanup. They now name 854, the call itself.Why a sweep and not a one-liner
Only the
io_error |= IOERR_GENERAanchor is tracked by the drift gate. The other eleven have no anchor string, so patching just the flagged line would have left eleven known-wrong citations behind and reported success. That invisible class is task 652.Verification
Each new target was read from the pinned 3.5.0 source rather than inferred from the offset:
unresolved=24is unchanged and out of scope — those are anchors that resolve at no line in 3.5.0, task 652's third class.Comments only; no code changes, so nothing to test beyond the gate.