Amendments to the #690 case file — new head 39796ea4 (pushed 2026-12-02 21:46), after an Autobot review cycle
Scope: only what changed since the report at head 682152b (note #15). Two of its six key findings are retracted, one new finding is added, and the counts/process sections are superseded. The two headline risks that survive are restated at the end so a reviewer does not have to re-read the original.
Key findings (amendments)
- RETRACTED — "undeclared
TRITON_PTXAS_PATHprecedence reversal." The author removed theconfigured_cudacondition and restoredmain's line verbatim:if ptxas.is_file() and "TRITON_PTXAS_PATH" not in os.environ:(ignition/cli/environment.py:75atpr/690==main:67).CPATHhandling is also byte-identical tomain(environment.py:77-81vsmain:69-73). The principle-10 "explicit user values win" objection (docs/design-review.md:89-92) and the "second variable the body understates" objection both dissolve. - RETRACTED (mostly) — "
AGENTS.md/docs/cli-design.mdcontradict the new policy." Both normative statements were rewritten and now match the code and the/usr/local/cudatable row. Only two cosmetic nits remain (see §2). The principle-10 exception is now genuinely documented, not merely asserted. - NEW — the PR now locks a stale-
CUDA_HOMEregression in as a tested contract.test_inherited_cuda_home_without_local_files_does_not_fall_back_to_default(tests/cli/test_environment.py:138-148) asserts that a nonexistent inheritedCUDA_HOMEis preserved with neitherTRITON_PTXAS_PATHnorCPATHset and no fallback to_DEFAULT_LINUX_CUDA. On a host that previously worked through/usr/local/cuda, an exported-but-staleCUDA_HOMEnow silently yields no toolkit environment. Neither the PR text nor any of the three docs mentions this path. - The diff is now exactly one decision, and the PR text describes it accurately.
_DEFAULT_LINUX_CUDA = Path("/usr/local/cuda")(ignition/cli/environment.py:22) plus resolution at:54-64. The PR body's claim thatTRITON_PTXAS_PATH,CPATH, and Windows behaviour are unchanged (ignition/cli/environment.py:67-72,:73-81) is now verifiable by inspection. - Process went from "no cycle" to one complete cycle. Autobot review at 21:24 = Changes Requested (0 blockers / 2 should-fix / 2 simplify / 3 nits); author disposition at 21:46 (
pr_comments). Both should-fix items are factually resolved. Labels now exist:bug, priority:P2, triage:review. - Unchanged and still the dominant review risk: #636 has zero comments and still carries
triage:design-review(the PR, by contrast, was triaged to plaintriage:review), no human reviewer is assigned, and there is still no end-to-end evidence that preservingCUDA_HOMEactually steers flashinfer's JIT/nvcc— only the environment dict is asserted.
1. What is retracted and why (citations)
1a. TRITON_PTXAS_PATH. At 682152b the condition included configured_cuda is not None, so a non-blank ambient TRITON_PTXAS_PATH lost to [paths] cuda. At 39796ea4 the line is if ptxas.is_file() and "TRITON_PTXAS_PATH" not in os.environ: (ignition/cli/environment.py:75), identical to main:67. Ambient value wins as before; a blank value still blocks the assignment (so the earlier "blank branch is untested and undocumented" complaint is moot as a behaviour complaint — the branch is unchanged main code).
1b. Docs. Verified at pr/690:
docs/cli-design.md:46-57now reads "No environment-variable behavior switches. Flare reads environment variables only for CUDA device selection and non-Windows preparation toolkit dependency setup…", namingCUDA_VISIBLE_DEVICESand, "on non-Windows hosts, when[paths] cudais unset,ignition.cli.environmentpreserves a non-empty inheritedCUDA_HOMEbefore falling back to/usr/local/cuda(removing blankCUDA_HOMEvalues when no toolkit source exists)".docs/cli-design.md:58-62adds "Host CUDA toolkit discovery on non-Windows hosts falls back through inheritedCUDA_HOMEand/usr/local/cudaonly when[paths] cudais unset."AGENTS.md:461-474rewritten from "CUDA_VISIBLE_DEVICESis the only variable Flare interprets" to "The only environment variables Flare inspects belong to its documented CUDA device selection and preparation dependency setup policies", with theCUDA_HOME/TRITON_PTXAS_PATH/CPATHsentence and a pointer to the CLI design.docs/model-preparation.md:123-126now summarises and linksdocs/cli-design.mdinstead of restating the rules.docs/cli-design.md:1489(toolkit row of the precedence table) matches the code.
2. Residual nits that survive (not conflicts)
AGENTS.md:452-455still states the unqualified "Flare, Helios, recipes, and components never read an environment variable to choose behavior" with no cross-reference to the:461carve-out introduced by the same PR. A reader who stops at:455still sees a prohibition the PR violates; one pointer fixes it.docs/cli-design.md:53-55documents "for any resolved toolkit it keeps a pre-setTRITON_PTXAS_PATHand prepends<toolkit>/includetoCPATHwhen not already listed" as part of the policy. Both are unchangedmainbehaviour (main:65-73), so this is scope creep in the prose, not a behavioural claim.- The
[paths] cudatests (tests/cli/test_environment.py:66-93) now assert only unchangedmainbehaviour (configured toolkit wins; presetTRITON_PTXAS_PATHkept;CPATHprepended), which is defensible as regression cover but no longer evidence for the fix.
3. The new finding: a stale inherited CUDA_HOME is now a deliberate, tested no-op
tests/cli/test_environment.py:138-148:
inherited = clean_environment / "custom-cuda" # never created
monkeypatch.setattr(environment, "_DEFAULT_LINUX_CUDA", default) # exists
monkeypatch.setenv("CUDA_HOME", str(inherited))
environment.apply(_load_config(clean_environment), ())
assert os.environ["CUDA_HOME"] == str(inherited)
assert "TRITON_PTXAS_PATH" not in os.environ
assert "CPATH" not in os.environ
Code path: ignition/cli/environment.py:58-64 takes the inherited value on truthiness alone (inherited_cuda = os.environ.get("CUDA_HOME", "").strip(); if inherited_cuda: cuda = Path(inherited_cuda)), never checking is_dir(), then :73-81 skips both TRITON_PTXAS_PATH (no bin/ptxas) and CPATH (no include). Net effect versus main: a host with a working /usr/local/cuda and an unrelated/stale exported CUDA_HOME (shell profile, container leftover, another project's toolkit) loses toolkit env entirely instead of falling back. This is the only scenario where main behaves better than the PR, it is the mirror image of #636, and the fix is one clause — fall back to _DEFAULT_LINUX_CUDA when Path(inherited_cuda) is not a directory. At minimum docs/cli-design.md:50-52 should say a non-empty inherited CUDA_HOME is used as-is, without existence checking.
4. Corrected counts and current state
- PR size: +220/−22 in 5 files (was +183/−10 at
682152b) —AGENTS.md+13/−8,docs/cli-design.md+18/−9,docs/model-preparation.md+4/−3,ignition/cli/environment.py+10/−2,tests/cli/test_environment.py+175/−0 (pr_files). The entire source-code change is still 10 added lines in one function. - Tests: 8 functions, 12 parametrized cases in 176 lines (
tests/cli/test_environment.py:66, 81, 96, 109, 122, 138, plus 3 + 3 at:151and:165), matching the author's "12/12" — the 10-case figure in the original report was for682152b.clean_environmentfixture:50-63;_ENV_KEYS:20-33; POSIX gating is now a single module-levelpytestmark(:15-18). The author's addedtest_whitespace_padded_inherited_cuda_home_is_normalized(:109-119) closes the earlier "padded non-emptyCUDA_HOMEuntested" gap. - Windows: still entirely untested (module-level skip at
:15-18); the "unchanged" claim remains inspection-only (ignition/cli/environment.py:67-72). - CI:
.github/workflows/python-cpu.yml:30-33(not opened) runs.venv/bin/python -m pytest tests/ -qon ubuntu withCUDA_VISIBLE_DEVICES: "", so the new suite does execute in PR CI and the_DEFAULT_LINUX_CUDAmonkeypatch works there. Check results for39796ea4were not observable from here; the "148 passed / 12 of 12" figure is still author-reported. - Labels:
bug, priority:P2, triage:review(previously none reported). Note the mismatch with the issue: #636 istriage:design-review, the PR istriage:review— triage treated the PR as ordinary review while the design question it answers is still queued unowned on the issue. - Engagement: still one reviewer-less cycle — Autobot (21:24) and the author (21:46). No human reviewer, no approval, no inline comments, no reactions.
5. What the earlier report said that still stands
- Three-author revision chain, no owner: #71 (eugr, merged 2026-10-24, removed automatic
CUDA_HOMEto fixcannot find -lcudart) →c9935887(Luke Alonso, 2026-11-27, added the/usr/local/cudafallback that #636 blames) → #690 (jcartu). Third revision of a four-line policy in six weeks, still with no maintainer-recorded decision on #636 (zero comments,triage:design-review). - #71 recurrence is still possible if a user's own
CUDA_HOMEpoints at a pipcuda-tilebundle (lib/libcudart.so.13vs the linker'slib64/); #690 never selects a bundle itself, so this needs the user to have exported that path. Untested, undiscussed. - Blast radius unchanged:
ignition.cli.environment.applyatignition/cli/serve.py:210 (not opened), 291, 436, 545andignition/cli/bench.py:205(not opened); triggers only whenpaths.cudais empty (its default,ignition/cli/config.py:51). - Downstream consumers unverified:
ignition/preparation/kv_codec.py:21-38(not opened)_find_nvcc,tests/preparation/test_toolchain.py:31-69(not opened) (libdevice from torch'sCUDA_HOME). #231's review asks for exactly the end-to-end test this PR still lacks. - Multi-host: nothing propagates
CUDA_HOMEacrossignition join; heterogeneous toolkits across peers remain possible and unmentioned. - Commit-trailer compliance (
.githooks/commit-msg:14-63,Design-Signed-Off-By) still unverifiable from the copy available here.
Open questions (revised)
- Does a maintainer endorse #636's premise that
CUDA_HOMEoutranks/usr/local/cuda? Still nothing recorded on the issue; the PR is onlytriage:review. - Should the stale/nonexistent inherited
CUDA_HOMEcase fall back to/usr/local/cuda, or should the docs state the no-existence-check policy explicitly? Currently the test freezes the silent no-op behaviour. - Will anyone run the multi-toolkit reproduction that #636 describes (and that #231's review asks for), or is CPU-level env-dict coverage accepted as sufficient?
- Is the
[paths] cuda-only test pair (tests/cli/test_environment.py:66-93) worth keeping now that it covers only unchangedmainbehaviour?
Tooling caveat
pr_diff and search_history both fail at this head (Could not read c513e46a… / failed to traverse parents of commit 682152b), so no unified diff could be read. Every statement above was verified by reading files at pr/690 and comparing them against main (ignition/cli/environment.py:54-81 vs main:54-74) and against the cited doc lines.