Final review report · NVIDIA/hyperflare-inference #690

Raw Markdown for agents: https://autobot.eidonix.com/p/fc68b393-0064-45c9-9dc8-00af47ce9f0e.md

Recommendation: Changes Requested

The core fix in ignition/cli/environment.py is small, clean, well-placed before library imports, and directly addresses the regression reported in #636 without re-introducing #71's pip-bundle selection bug. Requesting changes before merge for two concrete items: (1) the PR leaves normative policy statements in AGENTS.md:461 and docs/cli-design.md:46-53 directly contradicting the new text it adds at AGENTS.md:468-471 and docs/cli-design.md:1480, and (2) it bundles an unrequested TRITON_PTXAS_PATH behavior change beyond #636 whose blank-value branch is untested and understated in docs/model-preparation.md:128-130 (on an issue still awaiting maintainer triage:design-review and with no CI run recorded on head 682152b).

Merge Risk

Level: Low

Walkthrough

Pre-merge Checks

Blockers

None.

Should Fix

  1. Reconcile the self-contradictory environment-variable policy statements (AGENTS.md:461, docs/cli-design.md:46-53).
    • AGENTS.md:461 still states `CUDA_VISIBLE_DEVICES` is the only variable Flare interprets in the exact same bullet where this PR adds preserves a non-empty inherited `CUDA_HOME` (AGENTS.md:468-471).
    • docs/cli-design.md:46-53 still states "Flare reads none, with one exception: CUDA_VISIBLE_DEVICES" and "Two levels of precedence. Flags override the configuration file, which overrides the recipe. Nothing else exists", directly contradicting the updated CUDA toolkit row at docs/cli-design.md:1480 and ignition/cli/environment.py:61, 79.
    • Because Principle 10 (docs/design-review.md:91-92) makes the env-var exemption conditional on "the documented CUDA device selection and dependency setup policies", update AGENTS.md:461 and docs/cli-design.md:46-53 (2–3 sentences) so the normative policy matches the decision table and implementation. Also obtain maintainer sign-off on #636 (triage:design-review) and ensure Python CPU tests CI runs green on the updated head.
  2. Align scope, test coverage, and docs for the TRITON_PTXAS_PATH change (ignition/cli/environment.py:58-59, 78-81, docs/model-preparation.md:128-130).
    • Issue #636 asks only to preserve CUDA_HOME ahead of /usr/local/cuda. Beyond that, ignition/cli/environment.py:78-81 changes main's "TRITON_PTXAS_PATH" not in os.environ so that (a) explicit [paths] cuda now overwrites a non-blank ambient TRITON_PTXAS_PATH (aligning POSIX with Windows TRITON_PTXAS.EXE_PATH at :72), and (b) blank/whitespace TRITON_PTXAS_PATH values are now populated.
    • If keeping this change: add a unit test covering blank/whitespace TRITON_PTXAS_PATH (currently untested — every test in tests/cli/test_environment.py sets a non-blank value or leaves it absent) and update docs/model-preparation.md:129-130 from "populating it when unset" to "populating it when unset or blank". If scoping strictly to #636, see Subtract / Simplify #1 below.

Subtract / Simplify

  1. Optional strict-scope deletion (ignition/cli/environment.py:58-59, 78-81): If maintainers prefer not to change TRITON_PTXAS_PATH precedence beyond #636, delete configured_cuda and collapse lines 78–81 back to if ptxas.is_file() and not os.environ.get("TRITON_PTXAS_PATH", "").strip(): (or main's "TRITON_PTXAS_PATH" not in os.environ), removing the extra branch and keeping the PR strictly focused on CUDA_HOME.
  2. Deduplicate the 4-step toolkit precedence prose (docs/model-preparation.md:123-132): The same toolkit precedence order is now spelled out in three places (docs/cli-design.md:1480, docs/model-preparation.md:123-132, AGENTS.md:466-473) plus a fourth time in ignition/cli/environment.py:55-57. Given how frequently this policy has changed, keep the canonical specification in docs/cli-design.md and shorten docs/model-preparation.md:123-132 to a brief summary pointing to [the CLI design](cli-design.md).

Nits

Dropped on verification