Subtraction & Simplicity audit — PR #731 (pin flashinfer-python to 6aff33c4)
Verdict: the diff is lean. The subtraction debt sits immediately next to it, and this PR is the moment it becomes provably dead.
The entire change is one line (pr_diff, and head tree pyproject.toml:43-47):
-flashinfer-python = { git = ".../flashinfer.git", rev = "5a8ceed80ccc58e11a4d49ccc910f52967699c09" }
+flashinfer-python = { git = ".../flashinfer.git", rev = "6aff33c4a6500a10c32916f3c2e6987e708cec92" }
No new CLI flag, config knob, wrapper, branch, or speculative generality is introduced; there is nothing inside the diff to delete. Four concrete deletions/simplifications are available in the files this PR touches or directly invalidates, in priority order.
1. scripts/setup_preparation.py is a wrapper for an operation the pin makes impossible — delete the script (or the false claim)
scripts/setup_preparation.py:17-28, verbatim:
def main() -> int:
try:
environment = dict(os.environ, BUILD_NVEP="0", FLASHINFER_BUILD_NO_PIP="1")
subprocess.run(
["uv", "sync", "--upgrade-package", "flashinfer-python", "--extra", "prepare", "--extra", "test",
"--reinstall-package", "flashinfer-python", "--reinstall-package", "flare-heliopause"],
cwd=ROOT, env=environment, check=True,
)
--upgrade-package flashinfer-python can never move the package past an exact git rev in [tool.uv.sources] (pyproject.toml:47), which is the only place the revision is declared. The script's whole reason to exist — "Update FlashInfer" (:4) — is unreachable. What remains is a 15-line, three-binding wrapper (os, Path, subprocess, sys, ROOT) around one uv sync invocation, plus an env dict that duplicates CI verbatim:
.github/workflows/python-cpu.yml:27-28(not opened):BUILD_NVEP: "0"/FLASHINFER_BUILD_NO_PIP: "1"
That duplication is the real simplification: the two callers already diverge (the script adds --reinstall-package twice, CI does not), so the "shared helper" is neither shared nor a helper. Delete scripts/setup_preparation.py and its two references — docs/model-preparation.md:103-105 ("python scripts/setup_preparation.py updates FlashInfer to the tip of its main branch") and :153 — replacing the doc with the one correct command, uv lock --upgrade-package flashinfer-python against an explicit new rev, which is exactly what this PR does by hand.
2. uv.lock is described in six places and exists nowhere — delete the claims (5 assertions + 2 unusable commands)
No lockfile exists: list_files for *uv* and *uv.lock returns nothing at head or main, and .gitignore:1-13 does not exclude it. Yet:
docs/core-design.md:381: "[pyproject.toml](../pyproject.toml)and[uv.lock](../uv.lock)declare the preparation dependencies." — the link target does not exist.docs/core-design.md:383-385: "pyproject.tomltracks themainbranch oflocal-inference-lab/flashinfer, anduv.lockrecords the resolved commit" — doubly false: the pin is an exactrev(both before and after this PR), nevermain.docs/model-preparation.md:146-150: samemain-tracking claim, plus.github/workflows/track-flashinfer-main.yml(not opened) — that workflow does not exist; the tree has onlyhelios-lifecycle.yml(not opened),native-serving.yml(not opened),python-cpu.yml,release.yml(not opened).docs/model-preparation.md:150,:156: "uv sync --locked --extra prepare --extra test" —--lockedfails outright with no lockfile, so the documented reproduction path cannot run.THIRD_PARTY_NOTICES.md:60: "pyproject.tomlanduv.lockdescribe the separately installed preparation and test environment".docs/api.md:1099(not opened): "uv.lockpins for theapi-testextra."docs/roce-ring.md:334: "From a FlashInfer checkout at the revision pinned inuv.lock" — the revision is pinned inpyproject.toml:47.
The simplifying fix is deletion, not addition: drop every uv.lock and main-tracking sentence and point at pyproject.toml:47 as the single source of truth. A PR that re-pins the revision is the only natural place to do this without leaving the docs contradicting the pin it just wrote.
3. The same "tracks main" fiction makes --upgrade-package advice in the docs wrong in one place while right in another — collapse to one instruction
docs/model-preparation.md:151-153 says "To pull an unmerged commit ahead of the scheduled refresh, run uv lock --upgrade-package flashinfer-python or python scripts/setup_preparation.py." Two commands for one outcome, neither of which works against a fixed rev. Deleting the or-alternative (item 1) and stating the one real procedure — edit rev in pyproject.toml:47, then uv sync --extra prepare --extra test — removes a branch of documentation that can only mislead. There is no code branch to collapse here; the simplification is that a reader following the docs today gets two dead paths instead of one correct one.
4. Optional, lower value: [tool.uv.sources] pin is invisible to pip installers — worth one sentence rather than new machinery
pyproject.toml:25 requires "flashinfer-python[b12x]" inside the prepare extra, but the revision lives only in pyproject.toml:43-47 [tool.uv.sources], which only uv honours. I flag this as a place where the cheap fix is a one-line note in docs/model-preparation.md, not a duplicated pin in the dependency string — do not "simplify" by moving or copying the rev into the requirement.
Related, not a simplification (one line, for the reviewer)
pr_diff's removed line reads rev = "5a8ceed80ccc58e11a4d49ccc910f52967699c09", not the 1441ce862ffbc9d8550fdda7ad90e97ca04f4b8e the description names; and the computed diff carries ~10 unrelated files (release.yml (not opened), native-serving.yml (not opened), AGENTS.md, THIRD_PARTY_NOTICES.md, docs/api.md (not opened), docs/TODO.txt) while pr_files reports 1. That is consistent with a stale merge base on the review tool rather than real content — but it means a reviewer cannot see the true one-line change without checking the head tree, which is what I did (pyproject.toml:47 at head = 6aff33c4a6…). Nothing to subtract there; just don't merge on the strength of the displayed diff.
Things I deliberately did not propose deleting
tests/preparation/test_roce_proxy_parity.py:35-65— looks like heavy machinery (importlib.util.find_spec,PROVENANCE_LINES = 9,difflibpreview with a 4000-char truncation) but it is the only in-repo mechanism that can falsify this PR's "no re-vendoring is needed" claim. Keep it; the simplifications above are the deletions that pay.heliopause/pyproject.toml— no flashinfer reference at all (search_codeforflashinferinheliopause/returns no matches), so there is no second place to keep in sync. Nothing to collapse.