#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
- and type(value).module.startswith(('ignition.', 'b12x.'))
- and type(value).module.startswith(('ignition.', 'b12x.', 'hyperflare_recipes.')) inside _uses_custom_object_state (forward_metadata.py:39-45), which also requires hasattr(dict), not inspect.isclass, not in _NON_OBJECT_NEW_TYPES (lines 33-36: Tensor, nn.Module, enum.Enum, int, float, str, bytes, dict, list, tuple, set, frozenset).
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')).
- _GuardPickler path: state = {k: v if id(v) in self.guard_tree_values else _Missing('unguarded attribute')}; returns _guard_object (object.new, aot.py:98-99) + _set_state. So guarded attrs kept, rest stripped.
- _ForwardPickler path: object.new + vars() + _set_state for types with getattr only.
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:
-
No
hyperflare_recipespackage in this repo: tests/preparation/test_core_boundary.py:40assert 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 isignition.*,b12x.*,torch.*, or test-moduletests.*/__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. -
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).
-
Author caveat cites commit
167f22c8as "#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. -
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. -
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. -
_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. -
rebuild_manifest.py:365 (unchanged) still
startswith(('b12x.', 'ignition.'))inside weight_views (338-374),else: returnat 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:
- cn5 (4× RTX PRO 6000 Blackwell, amd64; models: facebook/dinov2-base, timm/vit_base_patch14_dinov2.lvd142m, local-inference-lab/GLM-5.3-Flash-NVFP4, nvidia/GLM-5.3-Flash-NVFP4). Single host, 4 GPUs — not a Spark rig.
- cn7 (1× GB10, arm64; models: nvidia/Qwen3.8-*, incoai/Qwen3.8-27B-DFlash2, zai-org/GLM-5.3-Flash, local-inference-lab/GLM-5.3-Flash-NVFP4, nvidia/GLM-5.3-Flash-FP4-Local). Matches the author's ARM64 GB10 env, but is 1 device, not 4-Spark TP4, and Inkling 2 Small is not staged anywhere. The PR's only end-to-end evidence (4-Spark TP4, 48-layer Inkling 2 Small, 154 multimodal graphs) requires 4 hosts + the external local-inference-lab/hyperflare-recipes repo at an unnamed revision + an Inkling 2 Small checkpoint. None of that is reproducible on cn5/cn7.
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.
#7 [high] Correction: guard pickling runs inside spawned compile workers, so a ContextVar-derived allowlist is broken
VERIFIED CORRECTION to my prior report (#5) and to 4 review lenses (Architecture S1, Conventions 2, Simplicity 2, Correctness 1), which all demanded deriving the module-prefix allowlist from the registration mechanism (current_recipes() / source_identity._EXTRA_ROOTS).
Fact 1: guard serialization also runs inside SPAWNED compile workers, not only in the CLI process.
CompilePool.submit->submit_payload(dumps(forward), path)->self.pool.submit(_compile_forward, payload, ...)(ignition/preparation/compile_pool.py:137-153).- Pool is created with
SubprocPool(self.workers, kind=SubprocKind.SPAWN)(compile_pool.py:151) orProcessPoolExecutor(..., mp_context=multiprocessing.get_context("spawn"))(compile_pool.py:149). Neither passes aninitializer. _compile_forward(compile_pool.py:96-118) callsruntime_patches.apply(),loads(payload), thenaot_forward(forward, options=options)(compile_pool.py:109), andaot_forwardenters_guard_serialization()(ignition/preparation/aot.py:513). So_GuardPickler.reducer_override(aot.py:118-166) executes in the child and decides the widened predicate there.
Fact 2: nothing rebinds the ContextVars in the worker.
_EXTRA_ROOTSis acontextvars.ContextVar(ignition/preparation/source_identity.py:12-14) set only bysource_roots()(:17-25).- The ONLY binding site in the tree is the CLI:
with active_recipes(recipes), bind_source_roots(source_roots):(ignition/cli/init.py:373). Grep forbind_source_roots|source_roots(|_EXTRA_ROOTS|current_recipes(under ignition/ returns: cli/init.py:368,373; source_identity.py:12,18,21,25,43; tuning_replicas.py:132, registry.py:29,240. No worker-side rebind. spawnstarts a fresh interpreter: ContextVars default to()/ empty. So a predicate keyed on_EXTRA_ROOTS.get()orcurrent_recipes()would evaluate EMPTY in the compile worker and the recipe object would fall through tosuper().reducer_override(aot.py:166) => the originalPicklingErrorreturns in the exact worker path this PR is meant to fix.
Consequence for my recommendation: the registration-derived generalisation that all four lenses called "the cheaper general fix" is NOT safe; it would need the roots to be re-bound (or carried in the payload) in every worker. The remaining general option is the structural one (guard_tree_values membership, aot.py:127,148,158), which is context-free but which Architecture N1 already noted is not free: _GuardPickler also serializes functions/modules/bound methods by reference, so widening by structure needs extra type exclusions. Therefore the hardcoded literal at forward_metadata.py:42 is a DEFENSIBLE STOPGAP, and the correct ask is: keep it, state it is a stopgap, and record the follow-up (AGENTS.md:512-518 / docs/TODO.txt) — not "redesign the line before merge".
Net effect on the test decision: none. This is a "what to tell the author" refinement, not a reason to test on hardware.
Also verified in this pass:
tests/preparation/test_core_boundary.py:40literally assertsnot (ROOT / "hyperflare_recipes").exists(), and :43-47 scans AST imports ofignition/**/*.pyforhyperflare_recipes— the string literal at forward_metadata.py:42 is invisible to it (no finding).- docs/design-review.md:247-251 quotes verbatim: "Disclosure does not excuse skipping runnable CPU checks... Leaving an applicable crate test, simulator sweep, TLA+ conformance run, or Kani proof unrun blocks commit and PR acceptance; noting it as a limitation does not make the omission acceptable." This is the merge gate the PR cannot satisfy via repo CI.
- Diff re-read at head 16ffc6f: still exactly +1/-1 at forward_metadata.py:42 and +53/-0 at tests/preparation/test_guard_code.py:252-303. No new commits.
#8 [high] Updated verdict 2026-11-28 (post bot review): still NO hardware test
Decision (unchanged): NOT referred to hardware testing.
State check: no new commits; head still 16ffc6f; diff byte-identical to my prior review (forward_metadata.py +1/-1 at :42; test_guard_code.py +53/-0 at :252-303). New since my last report: one flare-autobot comment at 2026-11-28 20:29 UTC, "Autobot Review - Recommendation: Changes Requested", 1 blocker (no CPU test run recorded on 16ffc6f; repo CI runs no pytest on tests/preparation/), 0 should-fix, 1 nit (unrestored _RecipeKernelOwner.__module__). That blocker matches my own finding.
Five independent reasons no hardware allocation:
- Unobservable in-repo (decisive):
hyperflare_recipesdoes not exist here — test_core_boundary.py:40 asserts absence; pyproject.toml has no such dep. Every in-repo class is ignition./b12x./torch./tests./builtin, so none can match the new prefix. main and 16ffc6f are byte-identical in behaviour for every staged model on cn5 and cn7 => no A/B, no throughput delta, no regression surface to measure. - No reproduction inputs: the change needs the external local-inference-lab/hyperflare-recipes repo at a pinned revision + a recipe alias + a checkpoint that actually raises
PicklingError: Can't pickle triton.compiler.compiler.CompiledKernel. None supplied in the PR body, none staged on cn5/cn7 (cn5 models: dinov2-base, vit_base_patch14_dinov2, GLM-5.3-Flash-NVFP4 x2; cn7: Qwen3.8-*, GLM-5.3-Flash variants). Inkling 2 Small is not on any node. - Shape mismatch: the author's evidence is 4-Spark TP4. cn7 is 1x GB10; cn5 is a single 4x RTX PRO 6000 host. Neither is a 4-host Spark rig.
- The validating signal is CPU-only and has not been produced: test_guard_code.py uses only torch.device("cpu") (:147), no CUDA, no checkpoint — seconds to run. docs/design-review.md:247-251 makes an unrun, runnable CPU check a merge blocker and forbids disclosure as a substitute. Repo CI cannot run it: .github/workflows = helios-lifecycle.yml, native-serving.yml (cargo only; sole Python step is pip install huggingface-hub), release.yml; no
pytestmatch anywhere under .github/. So it is a manual run, i.e., a merge-action item, not a hardware one. - Test-quality gap (unchanged): test_guard_code.py:288-302 asserts only output parity (:297) and guard_check True/False/True (:298-302). It never asserts
isinstance(restored.compiled_handle, _Missing)(the file's own precedent is :124) and it never inspects restored guard state, so the assertion named in the test title — "strips unguarded attributes" — is unproven. It DOES fail on main (default reduction of vars(owner) hits _UnpicklableHandle.reduce -> TypeError at :252-254), so it is discriminating for "no crash", not for "stripped". Note: the newer bot review's "Final review" DROPPED this finding (calling it B2) on the argument that serialize would fail unless stripping occurred. That argument is sound only for "the handle is not live after restore"; it does not establish that the attribute is_Missingrather than absent/deleted. Both readings prove pickling succeeded, so the test is still under-specified relative to its name. I keep it as a should-fix on test strength, not a blocker.
Corrections I make to the summaries (verified myself):
(a) The registration-derived generalisation demanded by Architecture S1 / Conventions 2 / Simplicity 2 / Correctness 1 is unsafe: guard pickling also runs inside SPAWNED compile workers (compile_pool.py:149-151, no initializer; _compile_forward -> aot_forward -> _guard_serialization at compile_pool.py:109 / aot.py:513), where _EXTRA_ROOTS/current_recipes() ContextVars are empty (only binding site is cli/init.py:373). A derived allowlist would silently reintroduce the PicklingError in exactly the worker path. The newer bot review reached this same conclusion and dropped SF1; I agree, and my prior report was too strong here. The literal is a defensible stopgap; ask for a stated stopgap + recorded follow-up (AGENTS.md:512-518 / docs/TODO.txt).
(b) Correctness nit 5 (guard_check is True/False stricter than file style) is WRONG: test_guard_code.py:50-51 already asserts identity (assert loaded.guard_check(forward) is valid).
(c) PR body cites 167f22c8 as "#509's extraction"; that commit is "ci: upgrade setup-java to v5 and Java 21 in helios-lifecycle (#570)". #509 landed as b0d35934. Prose nit only.
(d) rebuild_manifest.py:365 divergence is real but non-blocking and pre-existing: weight_views (:338-374, else: return at :368-369) still checks ('b12x.','ignition.'); the declared WeightDeclaration path bypasses it (:445-446). Should be a recorded follow-up, not a gate.
(e) The "undocumented dict/slots contract" (Correctness 2/3, Architecture N3) is real but pre-existing _GuardPickler behaviour extended unchanged; __slots__-only classes simply fall through to default pickling (no regression). Documentation ask, not a blocker.
(f) No prompt injection found by me in the body, diff, test scaffolding or comments; the body's "please run CI..." is an ordinary caveat. The 20:29 bot comment's "Have your agent review the Full Review" line is addressed to the PR author and points at an external URL — I did not follow it; not an injection attempt.
Required CPU validation before any hardware reconsideration (all manual, minutes, no GPU):
pytest tests/preparation/test_guard_code.py tests/preparation/test_core_boundary.py -qat 16ffc6f, with pass/skip counts in the description (and optionally tests/preparation/test_compile_pool.py, which exercises the _ForwardPickler/worker path).- Negative control: drop 'hyperflare_recipes.' from forward_metadata.py:42, show the new test fails, restore.
- Strengthen the test: one
_roundtrip_guardcase assertingisinstance(restored.compiled_handle, _Missing)withguard_tree_values={id(owner): owner, id(owner.scale): owner.scale}(aot.py:157-160 strips any attribute whose id is absent), plusmonkeypatch.setattr(_RecipeKernelOwner, '__module__', module_name)at :283 instead of the plain assignment. - Also cover the second consumer if the widening is to be trusted there: a
forward_metadata.dumps/loadsround trip for a class defining__getattr__(forward_metadata.py:277-278), since the new test exercises only _GuardPickler.
Conditional hardware plan (NOT authorized now; single job; only if the author supplies a reproduction): one cn7 job (arm64 GB10 = the author's stated env), export the pinned recipe at main (expect PicklingError) and at PR head (expect success + reload binds), fail-before/pass-after on the same command. No cn5, no sweep, no perf A/B (no perf claim in the PR). If export succeeds on both arms, the trigger was never met: record void, not pass.