fix(GATE-SYMBOL-ANCHORS): cite the symbol, and gate that it is still there (#1143, #1139) - #1203
Merged
Merged
Conversation
…there (#1143, #1139) A line number is a coordinate into a moving file. `src/vllm/entrypoints/model_loader.cpp` is cited by line from 109 sites in 45 files, and one 45-line insertion near its top moved 203 of those references at once (#1143). A pin advance left three `vllm/v1/worker/**` line anchors on `KV-WARMUP-PROFILE` pointing at a `set_attn` call, a `torch.zeros` argument and a comment about `max_split_size_mb`, and two had already been copied into a header and a spec (#1139). Same defect, two scales. Of the four available answers, this takes the fourth: adopt the symbol convention, gate it, convert a verified subset, record the rest. Repairing all 109 fixes today and guarantees tomorrow, and it would launder pre-existing debt, because rewriting a citation from the current tree makes a wrong one and a broken one indistinguishable — the exact thing #1143 says nobody can do. Gating LINE anchors needs a stored expectation table, which is a file every pull request must edit and therefore the lock AGENTS.md `## Records` calls a defective gate; reading the expectation out of the cited file instead is the #911 tautology that reported 27/27 FRESH over five anchors pointing at unrelated code. What decided it is that the convention already exists here. 539 `path::Symbol` citations were already written, `.agents/model-matrix.md` uses the form for every upstream model anchor, and not one had ever been checked. So this finishes something half-adopted rather than starting a flag day, and the gate lands green over 85 in-repo anchors on the first run. The shape is what makes it not a tautology, not care. The expectation is the symbol name, written by the citing author, read from the CITING file; only the evidence comes from the cited one. Nothing is derived from the file under test and nothing is stored centrally, so a citation's expectation rides in the file that owns the claim and N pull requests never write one file. `test_verdict_depends_on_the_citing_text` pins it executably: one cited file, unchanged, cited twice with different symbols, and the two verdicts must differ. A #911-shaped checker cannot pass that, because nothing it reads varies. The measurement that settles the convention comes from the opt-in upstream mode, which resolves `vllm/...` citations against the parity pin read with `git show <pin>:<path>`: 354 upstream anchors checked, **343 fresh, 0 stale**, across the same pin advance that broke every line anchor #1139 examined. The 11 that did not resolve name a file vLLM deleted, and are #1199. Converted 26 anchors in 16 files, each verified by locating the symbol and confirming the surrounding sentence is still true of it. Most were stale: `MakeScheduler` cited at 176 lives at 812, `SelectQueueForModel` cited at 75-104 lives at 148, `async_engine` cited at 800-811 lives at 1342. Two were already correct and are converted anyway, because a correct line anchor is one edit away from a wrong one. Deliberately not converted, and why it is recorded rather than swept: 96 of the 120 touchable line citations remain on #1143, because 62 of the 102 measured citations name no symbol at all in their sentence and there is nothing to convert them to without re-deriving the claim. Three specs turned out to assert loader behaviour the loader no longer has — `shards.clear()` does not exist, `LoadDflashDraft` is no longer typed on `std::vector<SafetensorsFile>`, the GGUF refusal at `717-723` is gone — so repairing those anchors would have parked a fresh-looking citation beside a false claim; that is #1198. #1139 keeps its last cell, `.agents/engine-matrix.md:115`, which concurrent sessions hold; the verified replacement text is in the spec, and all three replacement symbols resolve at the pin. Six mutations, each applied, compiling, over 13 executed cases, all caught: symbols always present, the #911 tautology, the vacuity guard, the missing-path branch, the frozen-archive skip, and word boundaries. Every one restored byte-for-byte by sha256. The `DISABLED_CREATION_CHECKER` stub fails 12 of 13, so the creation contract is rejected rather than satisfied. FOLLOWING_AGENTS_PROTOCOL Following-Agents-Protocol: true AI-Assisted: true Assisted-by: AGENT:claude-opus-5 [claude-code]
… as broken citations The suite wrote its fixtures as `src/vllm/a.cpp`. Untracked, it was invisible to `git ls-files` and the run was green; the first commit made it tracked and the checker immediately reported twelve citations of a file that does not exist, in its own test file. `alpha/` exists in no tree, so the fixtures now fall into the skipped bucket in the real repository while still resolving inside each temporary one. Recorded in the spec, because a green run before `git add` is not a green run. FOLLOWING_AGENTS_PROTOCOL Following-Agents-Protocol: true AI-Assisted: true Assisted-by: AGENT:claude-opus-5 [claude-code]
This was referenced Aug 18, 2026
…at can be rerun The first pass reported "96 of 120" from a `grep -n | wc -l` over the working tree, which counts matching LINES rather than matches and reads untracked files. Measured over tracked files with the frozen and locked surfaces excluded, `model_loader.cpp:NNN` references fell from 106 in 46 files to 86 in 34: 20 converted, 86 owed on #1143. The "62 of 102" beside it mixed two runs with different skip sets and is 62 of 92. Correcting a count in the record that exists to stop records drifting is not optional. FOLLOWING_AGENTS_PROTOCOL Following-Agents-Protocol: true AI-Assisted: true Assisted-by: AGENT:claude-opus-5 [claude-code]
…d a floor of zero is a mute switch (#1143, #1139) Fresh review returned FAIL on the first head. The convention and its measurement survive every finding: 0 stale upstream anchors across the pin advance that shattered every line anchor #1139 examined, and a perturbation control that renames every cited symbol leaves 0 of 444 fresh anchors standing. What follows are the defects. The #911 tautology reopened for a SELF-citation. The immunity argument is "expectation from the citing file, evidence from the cited file"; when they are the same file those sides collapse, and the citation span itself supplied the evidence, because the search ran over the whole body. A symbol that existed nowhere but inside its own citation read as fresh. Zero of the tree's anchors are self-citations today, and `.agents/porting.md` now tells authors to write the full path, which makes a file documenting its own symbols the most natural next thing anyone writes. Every citation span is now stripped from the cited file before the search, which also closes the cross-file form. The vacuity guard was a floor of ZERO over a population of ninety. One added `FROZEN_PREFIXES` entry, or one narrowed `CITATION_RE`, takes the count from 91 to 1 and a zero-guard stays green the whole way down. There is now a recorded floor with headroom, and the three buckets must SUM to the citation count, so a citation that stops being counted anywhere is arithmetic rather than judgement. M11 proves why the sum needed its own fixture tree: this tree has zero missing local paths, so dropping that bucket left the arithmetic intact and the first pass did not red. The untracked blind spot this change reported about itself was closed for the fixtures and left open in the tool. Untracked files carrying citations are now counted and printed, the same discipline `frozen_files` already gets. The skip stays, because scanning the working tree would change what the gate's subject is. An ambiguous basename is checked against every candidate instead of being dropped, which recovers five live citations. A dot-leading path is a citation: it was not, so anything under `.agents/` or `.github/` matched zero times and said nothing about it. Every ABSOLUTE in the first record was wrong and every DELTA was right, which is what a number quoted from an earlier run looks like. Re-measured at this head: upstream is 364 checked / 353 fresh, not 354/343; `check-agent-record.py` reports ENGINE=162, not 161; the residue is 112 references in 47 files falling to 92 in 35, not 106/46 to 86/34. The residue instrument's population and command are now written down so somebody else gets the number. `#1139` closes here. Its last cell is a CELL inside an existing engine-matrix row, adding no row and moving no counter, so it cannot collide with a session that appends one; all three replacement anchors resolve at the pin. `.agents/specs/gguf-mtp-spec-decode.md` carries the same falsified GGUF refusal already on #1198 and is recorded there. Two conversions were weaker than what they replaced and are repaired: a symbol occurring eight times localises nothing. `tests/scripts/test_check_pr_size.py` was RED at the first head and no report said so. Registering a newly created checker in `CREATION_MUTATIONS` is required -- without it the evidence machinery refuses the checker as "absent at BASE and has no closed creation mutation" -- and that registration is asserted against an exact expected set which the registration did not join. `scripts/check-doc-checkpoint.py` reds on commit `4182facff` for changing `include/vllm/v1/core/sched/scheduler.h` without `docs/USAGE.md`, and the path rule does not care the edit is inside a comment. That obligation is paid here: `docs/USAGE.md` now documents the gate a contributor has to satisfy, so the SQUASHED commit carries both halves and the lane that matters stays green. The per-commit range verdict on the branch cannot be repaired by any further commit, because `4182facff` is immutable and only a history rewrite could move it. The exception is argued rather than hidden: the branch squashes into one commit that satisfies the rule, and no force-push was taken to make a range report agree. FOLLOWING_AGENTS_PROTOCOL Following-Agents-Protocol: true AI-Assisted: true Assisted-by: AGENT:claude-opus-5 [claude-code]
Brings the branch onto 5af6e76 so both preflight range blocks run against the current base. No conflicts. The incoming range adds vt::QuantFp8Group, the environment-agnostic campaign scope, and the leased-worker record; none of it touches the citation surface or the gate. The focused gate was rerun after the merge: 21 cases green, symbol anchors at 618 citations with 93 in-repo checked and 0 stale, and the upstream run unchanged at 364 checked and 353 fresh. FOLLOWING_AGENTS_PROTOCOL Following-Agents-Protocol: true AI-Assisted: true Assisted-by: AGENT:claude-opus-5 [claude-code]
…absolutes are re-measured at the merged head (#1143) An ambiguous basename's candidate list was built by walking a SET, so its order was the iteration order of a hash. That order decides which path a stale ambiguous citation names, and it made M12 -- the mutation that consults only the first candidate -- catch on some runs and not others. `by_base` is now built over a sorted walk, the case puts the symbol in the LAST candidate so a first-candidate-only checker reds deterministically, and M12 was re-run three times. Every absolute is re-measured after merging `origin/main`: 618 citations, 93 in-repo checked, 525 upstream, buckets summing to 618, floor 85; upstream 364 checked and 353 fresh at the pin; the perturbation control leaves 0 of 446 fresh anchors standing. The residue is 112 references in 47 files at `origin/main` and 93 in 35 here, because main added one back after this branch converted twenty. FOLLOWING_AGENTS_PROTOCOL Following-Agents-Protocol: true AI-Assisted: true Assisted-by: AGENT:claude-opus-5 [claude-code]
The base moved while the checker was under review and repair. Merging rather than rebasing: a force-push is barred, and it would destroy the merge base the reviewed head is anchored to. FOLLOWING_AGENTS_PROTOCOL Following-Agents-Protocol: true AI-Assisted: true Assisted-by: AGENT:claude-opus-5 [Claude Code]
Second base move during this row's landing. FOLLOWING_AGENTS_PROTOCOL Following-Agents-Protocol: true AI-Assisted: true Assisted-by: AGENT:claude-opus-5 [Claude Code]
Third base move during this row's landing. FOLLOWING_AGENTS_PROTOCOL Following-Agents-Protocol: true AI-Assisted: true Assisted-by: AGENT:claude-opus-5 [Claude Code]
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.
A line number is a coordinate into a moving file.
src/vllm/entrypoints/model_loader.cppis cited by line from 109 sites in 45 files, and one 45-line insertion near its top moved 203 of those references at once (#1143). A pin advance left threevllm/v1/worker/**line anchors onKV-WARMUP-PROFILEpointing at aset_attncall, atorch.zerosargument and a comment aboutmax_split_size_mb, and two had already been copied into a header and a spec (#1139). Same defect, two scales.Of the four available answers, this takes the fourth: adopt the symbol convention, gate it, convert a verified subset, record the rest.
Repairing all 109 fixes today and guarantees tomorrow, and it would launder pre-existing debt, because rewriting a citation from the current tree makes a wrong one and a broken one indistinguishable — the exact thing #1143 says nobody can do. Gating LINE anchors needs a stored expectation table, which is a file every pull request must edit and therefore the lock AGENTS.md
## Recordscalls a defective gate; reading the expectation out of the cited file instead is the #911 tautology that reported 27/27 FRESH over five anchors pointing at unrelated code.What decided it is that the convention already exists here. 539
path::Symbolcitations were already written,.agents/model-matrix.mduses the form for every upstream model anchor, and not one had ever been checked. So this finishes something half-adopted rather than starting a flag day, and the gate lands green over 93 in-repo anchors.The shape is what makes it not a tautology, not care. The expectation is the symbol name, written by the citing author, read from the CITING file; only the evidence comes from the cited one. Nothing is derived from the file under test and nothing is stored centrally, so a citation's expectation rides in the file that owns the claim and N pull requests never write one file.
That immunity had a hole, and the fresh review found it. When the citing and the cited file are the SAME file, the two sides collapse: the expectation is read from the file under test, and the citation span itself supplied the evidence, because the search ran over the whole body.
`a.cpp::GhostSymbol`written insidea.cppread as FRESH over a symbol that existed nowhere else. Zero of this tree's anchors are self-citations today and none is satisfied only by a citation span, so nothing was laundered — but.agents/porting.mdnow tells authors to write the full path, which makes a file documenting its own symbols the most natural next thing anyone writes. Every citation span is now stripped from the cited file before the search, which also closes the cross-file form wherea.cppnamesGhostonly inside its own citation ofb.cpp.test_verdict_depends_on_the_citing_textcould not see either door, because it uses two DIFFERENT files; two new cases close it from both sides.The vacuity guard was a floor of ZERO over a population of ninety. One added
FROZEN_PREFIXESentry, or one narrowedCITATION_RE, takes the count from 93 to 1 and a zero-guard stays green the whole way down — the mute-switch shape this repository has been burned by. There is now a recorded floor with headroom (85, a ratchet no change has to edit, so not a per-PR record lock), and the three buckets must SUM to the citation count.--min-checkeddrives the comparison in a fixture tree so the floor itself is executable.Three more findings, each with a mutation. An untracked file carrying a stale anchor is invisible and an untracked cited file produces a false "path does not exist"; the skip stays, because scanning the working tree would change what the gate's subject is, but untracked files carrying citations are now COUNTED and PRINTED — the same discipline
frozen_filesalready gets, and the lesson this change reported about itself now applies to the tool and not only to its fixtures. An ambiguous basename was counted and dropped, silently skipping five live citations; it is checked against every candidate and reported only when none contains the symbol. AndCITATION_REopened with`[A-Za-z0-9_], so any path beginning with.matched zero times — latent until somebody cites a spec or a workflow by symbol, which.agents/porting.mdnow invites.The measurement
The opt-in upstream mode resolves
vllm/...citations against the parity pin, read withgit show <pin>:<path>: 364 upstream anchors checked, 353 fresh, 0 stale, across the same pin advance that broke every line anchor #1139 examined. The 11 that did not resolve name a file vLLM deleted and dedupe to 10 reported lines; they are #1199."0 stale" says nothing until the corpus is shown capable of going stale. The perturbation control appends
Zqto every cited symbol and reportsin-repo checked 93 (fresh 0, stale 93)andupstream checked 364 (fresh 0, stale 353, file absent 11): not one of the 446 fresh anchors survives the rename.Every absolute was re-measured, and the first set did not reproduce
The first record was right about every DELTA and wrong about every ABSOLUTE, which is what a number quoted from an earlier run looks like. Upstream was recorded as 354/343 and reproduces as 364/353.
check-agent-record.pywas recorded as ENGINE=161 and reports ENGINE=162. The residue was recorded as 106 in 46 falling to 86 in 34 and reproduces as 112 in 47 falling to 92 in 35. The body said 85 in-repo anchors in prose and 86 in its table.The residue instrument is now written down precisely enough to rerun. Population is
git ls-tree -r --name-only <rev>minus.agents/completed/**,.agents/issue-index.md,.agents/benchmark-record.mdand.agents/parity-ledger.md; counted is every occurrence ofmodel_loader\.cpp:[0-9]:112 in 47 at the branch base and again at
origin/main; 92 in 35 on this branch; 93 in 35 at this merged head, because main independently added one back. 20 converted here.Converted, and repaired
26 anchors in 16 files, each verified by locating the symbol and confirming the surrounding sentence is still true of it. Most were stale:
MakeSchedulercited at 176 lives at 812,SelectQueueForModelcited at 75-104 lives at 148,async_enginecited at 800-811 lives at 1342.Two conversions were WEAKER than what they replaced and are repaired. A symbol occurring eight times localises nothing:
::max_num_batched_tokens_named the value being traced rather than the hop, and is now::MakeScheduler, which is the hop.::Qwen3_5MTPKindnamed the enum where the selection is a ternary on the factory flag, and is now::is_dense_model, which is the thing that decides.#1139closes here. Its last cell is a CELL inside an existing.agents/engine-matrix.mdrow: it adds no row and moves no counter, so it cannot collide with a concurrent session that appends one, andcheck-agent-record.pyreports ENGINE=162 before and after. All three replacement anchors resolve at the pin; the upstream count moved 360 to 364 checked and 349 to 353 fresh with stale still zero.Two gates were red and no report said so
tests/scripts/test_check_pr_size.pywas RED at the reviewed head. Registering a newly created checker inCREATION_MUTATIONSis required — without it the evidence machinery refuses the checker as "absent at BASE and has no closed creation mutation" — and that registration is asserted against an exact expected set the registration never joined. Closed here, which is also the semantic mutation evidence the checker demands for its own edit. The new comment block had also been inserted between an existing comment and its entries; it now sits beside its own.scripts/check-doc-checkpoint.pyreds on commit4182facfffor changinginclude/vllm/v1/core/sched/scheduler.hwithoutdocs/USAGE.md. The path rule does not care that the edit is inside a comment. That obligation is paid:docs/USAGE.mdnow documents the gate a contributor has to satisfy and the citation form it requires, so the SQUASHED commit carries both halves — verified on a probe squash of this branch,rc=0. The per-commit range verdict on the BRANCH cannot be repaired by any further commit, because4182facffis immutable and only a history rewrite would move it, and no force-push was taken to make a range report agree with a tree that is already correct. This is the argued exception, and it is visible debt rather than success: a reviewer who rejects the reasoning does not merge the change.Not done, and named
model_loader.cppline references (20 converted here)gguf-mtp-spec-decode.md) added by comment## OwedGates
scripts/check-symbol-anchors.pyscripts/check-symbol-anchors.py --self-testtests/scripts/test_check_symbol_anchors.pytests/scripts/test_check_pr_size.pyscripts/check-symbol-anchors.py --upstream-root <vllm>scripts/check-agent-record.pyscripts/check-issue-index-append-only.pyscripts/check-commit-style.py --range origin/main..HEADscripts/check-commit-trailers.py --range origin/main..HEADscripts/check-doc-checkpoint.py --base origin/main --head HEAD4182facff, argued above; the squashed shape is 0scripts/agent-preflight.shdoc-checkpoint range), 0 SKIPtests/scripts/test_cpu_x86_llamacpp_floor.pywas previously reported as "a SKIP, not a pass". It has no skip path:grep -i skipover that file returns nothing. It RAN and failed, and its failure count moved with box load, which is what makes it environmental rather than a verdict on this change. On this run, at 87% disk and lighter load, it ran to a verdict and PASSED — it is one of the 81.Thirteen mutations, each applied (moved sha256 plus a non-empty
git diff --stat), each compiling, each over 21 executed cases taken from the LASTRan N testsline, all caught, all restored byte-for-byte. Two did not report honestly on the first pass and both are recorded: M11 (a dropped bucket) was not caught at all, because this tree has zero missing local paths and the arithmetic stayed intact until the case grew a fixture tree populating all three buckets; M12's catch depended on the iteration order of a hash set, soby_baseis now built over a sorted walk and it was re-run three times. TheDISABLED_CREATION_CHECKERstub fails 20 of the 21 cases, so the creation contract is rejected rather than satisfied.No C++ was recompiled because every C++ edit is inside a
//comment.Closes #1139. #1143, #1198 and #1199 stay OPEN and own the residue named above.
FOLLOWING_AGENTS_PROTOCOL
Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:claude-opus-5 [claude-code]