Pre test report scratchpad · NVIDIA/hyperflare-inference #574

Raw Markdown for agents: https://autobot.eidonix.com/p/56c67879-9577-40f0-9d5c-8b9e134d5f5c.md

#1 [high] PR #574 diff facts (verified)

PR #574 "Strip unguarded attributes from hyperflare_recipes objects in AOT guard serialization", author fordbmorris / Discord woooflet, head 16ffc6f, open, no reviews, no CI checks, only an autobot case-file comment. +54/-1, 2 files.

Production diff is exactly one line: ignition/preparation/forward_metadata.py:42

Exactly two consumers (grep verified): _GuardPickler.reducer_override aot.py:155-166 and _ForwardPickler.reducer_override forward_metadata.py:277 (additionally gated on hasattr(type(value),'getattr')).

KEY: hyperflare_recipes does not exist in this repository (tests/preparation/test_core_boundary.py:40 asserts it is absent). Only string/doc mentions. So inside this repo nothing can match the new prefix => the diff is a no-op for every class defined in this repository; ignition./b12x. reduce byte-identically. Consequence: no test on our hardware that does not involve the external local-inference-lab/hyperflare-recipes package can distinguish pre- vs post-change behaviour.

Sibling, unmodified allowlist of the same shape: ignition/preparation/rebuild_manifest.py:365 elif type(value).__module__.startswith(('b12x.', 'ignition.')) and hasattr(value, '__dict__') inside weight_views (338-374); non-matching objects hit else: return at 368. Gates rebuild_weights_metadata (441-459) fed from runtime_core.py:130 and :368. PR body itself admits it was left out.

New test tests/preparation/test_guard_code.py:252-302: _UnpicklableHandle (reduce raises TypeError, 252-254), _RecipeKernelOwner with class-level module="hyperflare_recipes.components.synthetic" (257-265), _RecipeForward (268-274), test at 277-302. Test reassigns _RecipeKernelOwner.module = "hyperflare_recipes.components._synthetic_guard_test" at :283 (plain assignment, not monkeypatch => leaks past test), injects synthetic module in sys.modules at :285, then does torch.compile/aot_compile/serialize/deserialize (288-296), asserts output parity (:297) and guard_check True/False/True (298-302). It never asserts isinstance(restored.compiled_handle, _Missing) — the only assertion that would prove the "strip" in its own name (contrast existing test :124). Existing analogue tests: _roundtrip_guard helper :91-100; test_guard_pickler_preserves_guarded_tensor_user_attributes_only :104-127 (asserts _Missing at :124); pipeline test_guard_serialization_roundtrips_tensor_user_attributes :232-249 (same compile/serialize/parity/guard-invalidation sequence). Test file top imports (1-16) are io/pickle/subprocess/sys/pytest/torch/torch._dynamo — no CUDA needed; the file is CPU-runnable. Existing precedent at :50-51 asserts guard_check(...) is valid (i.e. is True/False), so the correctness-lens nit about bool identity in the new test is WRONG.

#2 [high] CI reality: no pytest workflow in repo

.github/workflows at main contains only: helios-lifecycle.yml, native-serving.yml, release.yml. Grep for pytest under .github/ returns no matches. So the PR's caveat "please run CI on tests/preparation/test_guard_code.py and tests/preparation/test_core_boundary.py" cannot be fulfilled by repository CI; it requires a manual pytest invocation (CPU-only, minutes). The architecture lens made the missing rebased-tip run its only blocking item; that block is real in substance (changed predicate moved into forward_metadata.py in #509) but is a reviewer-side 2-minute CPU action, not a hardware test. PR body claims tests were verified "on ARM64 GB10 and end-to-end 4-Spark TP4 Inkling 2 Small exports"; head 16ffc6f has no checks. End-to-end claim depends on the external hyperflare_recipes repo + Inkling 2 Small checkpoint, neither of which is on cn5 or cn7 model lists => not reproducible on our hardware as staged.

#3 [high] Decisive facts: change unobservable in-repo

Verified independent facts for the pre-test decision:

  1. No hyperflare_recipes package in this repo: tests/preparation/test_core_boundary.py:40 assert not (ROOT / "hyperflare_recipes").exists(). pyproject.toml has no dependency on it (deps: torch, transformers, flashinfer[b12x], cuda-tile, ...). So every class defined inside this repository is ignition.*, b12x.*, torch.*, or test-module tests.*/__main__ — none matches the newly added prefix. => The one-line change is provably a no-op for all in-repo code; a hardware test using in-repo recipes/models cannot distinguish pre- vs post-change at all.

  2. No CI runs pytest: .github/workflows has only helios-lifecycle.yml, native-serving.yml, release.yml; grep 'pytest' under .github/ = no matches. Author's request "please run CI on ..." therefore needs a manual CPU pytest run (pyproject [project.optional-dependencies] test = pytest>=9,<10).

  3. Author caveat cites commit 167f22c8 as "#509's extraction of _uses_custom_object_state". Verified FALSE: 167f22c8 = "ci: upgrade setup-java to v5 and Java 21 in helios-lifecycle (#570)" (search_history, main). The #509 work landed as b0d35934 "Fix Ignition storage lowering, guard pickling, and compiler worker startup (#509)" on 2026-11-24, and it is the commit that last touched ignition/preparation/forward_metadata.py before this PR. Minor prose inaccuracy.

  4. New test does NOT assert the stripping it is named for (simplicity lens is right): body at test_guard_code.py:288-302 asserts only output parity (:297) and guard_check True/False/True (:298-302). It never does isinstance(restored.compiled_handle, _Missing) nor inspects the restored guard state; the sibling test at :124 does exactly that. So the test proves "pickling no longer raises", not "the unguarded attribute became _Missing", and it duplicates the compile/serialize/parity/invalidation shape of :232-249. However it DOES fail against main (default reduction of vars(owner) hits _UnpicklableHandle.reduce -> raises), so it is discriminating for the fix.

  5. Correctness-lens nit "guard_check(...) is True/False is stricter than the file's style" is WRONG: test_guard_code.py:50-51 uses assert loaded.guard_check(forward) is valid (identity), same pattern. Discard that nit.

  6. _ForwardPickler second-effect check: forward_metadata.py:277 gates on hasattr(type(value), '__getattr__'), so a plain recipe class without a class-level getattr does not change path. The widened prefix affects the worker-IPC pickler only for recipe classes that define getattr.

  7. rebuild_manifest.py:365 (unchanged) still startswith(('b12x.', 'ignition.')) inside weight_views (338-374), else: return at 368-369 silently drops tensors. PR body admits leaving it out. Declared path (WeightDeclaration) bypasses it at :445-446.

#4 [high] Hardware feasibility: nothing on cn5/cn7 can trigger the change

Available hardware checked against what this PR could exercise:

Conclusion for the report: no hardware test can validate this change. Only CPU pytest can (seconds, no GPU), and it is the reviewer's/merge-gate job (docs/design-review.md:247-251). Optional conditional hardware value: a single export A/B on cn7 (arm64 GB10, matching author env) ONLY IF maintainers pin a hyperflare_recipes revision + recipe + checkpoint that actually raises PicklingError: Can't pickle triton.compiler.compiler.CompiledKernel on main — then pre-change fails / post-change passes is a real signal, 1 job, no sweep. Otherwise zero expected value.

#5 [high] Final decision: no hardware test; CPU-only gate

FINAL VERDICT: NOT referred to hardware testing. Return to author for changes + CPU pytest run.

Grounds (all verified myself, not taken from the summaries): A. In-repo unobservability: hyperflare_recipes does not exist in this repo (tests/preparation/test_core_boundary.py:40 asserts absence; pyproject.toml has no such dependency). No class defined in this repo can match the new prefix, so the one-line change is provably a no-op for every ignition./b12x. object. No hardware test using in-repo recipes can distinguish main from the PR head. B. Substantive design defect that must be fixed first: third hardcoded package literal in core Ignition (forward_metadata.py:42) versus the repo's declarative external-recipe mechanism (ignition/cli/init.py:367-375 active_recipes+bind_source_roots, ignition/registry.py:24-41, ignition/preparation/source_identity.py:12-45) and AGENTS.md:379-393 / 188-193. Any other external recipe repo still hits the same PicklingError. Fixable in the same one line by keying on guard_tree_values membership (already the ground truth used at aot.py:127,148,158) — so the code shape will likely change => testing now is wasted. C. Test does not assert the behaviour in its name: test_guard_code.py:288-302 asserts only output parity + guard_check True/False/True; no isinstance(restored.compiled_handle, _Missing) (cf. :124). A corrected ~12-line version using _roundtrip_guard (:91-100) is both smaller and stronger. D. Missing reproduction inputs for any end-to-end test: no recipes revision, no core, no command, no expected pre-change failure; Inkling 2 Small not staged on cn5/cn7; claim needs 4 Sparks, we have 1×GB10 (cn7) and 4×RTX PRO 6000 single-host (cn5).

Required validation instead (CPU, minutes, no GPU): uv sync --locked --extra prepare --extra test then pytest tests/preparation/test_guard_code.py tests/preparation/test_core_boundary.py, plus a negative control with 'hyperflare_recipes.' removed from forward_metadata.py:42 showing the new test fails. Repo has no pytest CI (.github/workflows = helios-lifecycle, native-serving, release only), so this must be run by hand; docs/design-review.md:247-251 makes it a merge gate.

Conditional hardware plan if maintainers accept the literal allowlist AND supply a reproduction: ONE job on cn7 (arm64 GB10, matches author env): export on main (expect PicklingError: Can't pickle triton.compiler.compiler.CompiledKernel) vs PR head (expect success), same command/checkpoint/revision; no sweep, no cn5, no perf A/B (no perf claim in the PR).

Corrections to the review summaries: (i) correctness-lens nit that guard_check(...) is True is stricter than file style is WRONG — :50-51 uses is valid; (ii) the PR's own citation of 167f22c8 as the #509 extraction is wrong — that commit is "ci: upgrade setup-java to v5 and Java 21 in helios-lifecycle (#570)"; #509 landed as b0d35934; (iii) the architecture lens's single blocking item (missing rebased-tip CI run) is a mergeready-process gap, not a code defect and not a hardware matter — it cannot be satisfied by repo CI at all; (iv) the _ForwardPickler "second effect" is real but narrow (forward_metadata.py:277 also requires hasattr(type(value),'getattr')), so a plain recipe class is unaffected; (v) no prompt injection found by me either; the body's "please run CI" is an ordinary caveat, not an agent instruction.