Explore scratchpad · NVIDIA/hyperflare-inference #574

Raw Markdown for agents: https://autobot.eidonix.com/p/db05766c-81c3-4d16-9370-985b13b63553.md

#1 [high] Change: the diff itself (2 files, +54/-1)

PR #574, head 628f361 (author woooflet / Discord woooflet), base main, 2 files, +54/-1.

  1. ignition/preparation/forward_metadata.py:39-45 _uses_custom_object_state — tuple extended: before: type(value).__module__.startswith(('ignition.', 'b12x.')) after: type(value).__module__.startswith(('ignition.', 'b12x.', 'hyperflare_recipes.')) Rest of predicate unchanged: hasattr(value,'dict'), not inspect.isclass, not isinstance(value, _NON_OBJECT_NEW_TYPES).

  2. tests/preparation/test_guard_code.py:250-302 — new test_guard_pickler_strips_unguarded_attributes_from_recipe_objects, plus module-level helpers _UnpicklableHandle (its __reduce__ raises TypeError), _RecipeKernelOwner (__module__ = "hyperflare_recipes.components.synthetic", holds guarded scale + compiled_handle), _RecipeForward. The test registers a synthetic module hyperflare_recipes.components._synthetic_guard_test in sys.modules via monkeypatch, re-points _RecipeKernelOwner.__module__ to it, compiles _execute with GraphModuleSerializableCallable under _guard_serialization(), serializes (type(compiled).serialize(compiled).serialized_data), deserializes, asserts output parity (torch.full((2,), 3.0)), guard_check True, then scale=5 -> False, scale=3 -> True. Note: the test never imports hyperflare_recipes (package does not exist in this repo — tests/preparation/test_core_boundary.py:40 asserts not (ROOT/"hyperflare_recipes").exists() and :50-58 forbids tests importing hyperflare_recipes).

#2 [high] Change: the predicate is shared — reach beyond AOT guards

_uses_custom_object_state (ignition/preparation/forward_metadata.py:39-45) has three call sites at head:

So the one-line change also alters forward-metadata (worker IPC) pickling for hyperflare_recipes.* classes that define __getattr__: they are now reconstructed via object.__new__ + full vars() instead of default pickling. PR title/description only claims the AOT guard-serialization effect; this second effect is undeclared (narrow, since it requires a class-level __getattr__). Predicate is deliberately string-only, so core ignition never imports hyperflare_recipes (cf. AGENTS.md:392-393 "Core ignition must never import hyperflare_recipes" and tests/preparation/test_core_boundary.py:39-47).

#3 [high] Why: the reported PicklingError and the stale module allowlist

Reported problem (PR #574 body, https://github.com/NVIDIA/hyperflare-inference/pull/574): during AOT forward compilation _GuardPickler raises PicklingError: Can't pickle <class 'triton.compiler.compiler.CompiledKernel'> when a non-nn.Module prepared object defined under hyperflare_recipes.* keeps an unguarded compiled handle. Named concrete case: PreparedResidualMix in Inkling 2, being ported from ignition.recipes.inkling2 to hyperflare_recipes.recipes.inkling2.

Cause: _uses_custom_object_state's module-prefix allowlist ('ignition.', 'b12x.') predates the recipe extraction, so hyperflare_recipes.* objects fall through to default pickling in _GuardPickler (aot.py:166 return super().reducer_override(obj)), which tries to pickle the whole __dict__ including the Triton CompiledKernel.

How it got stale: the predicate was introduced/expanded for ignition.*/b12x.* in #474/#509 (see related-work note) while recipes were being moved out of ignition/recipes/ on 2026-11-22..27 (commits da037284, 17bb3c4a, 4d957175, 568aeca0). No linked issue: search_items for "hyperflare_recipes pickling guard" and "aot_forward guards PicklingError Triton kernel" (issues) return only this PR — the report is single-sourced from the PR body. Repo-visible corroboration that the module boundary is real: tests/preparation/test_core_boundary.py:39-58 forbids ignition/ and tests/ from importing hyperflare_recipes; AGENTS.md:379-393 and docs/model-development.md:3-9 put official recipes in the external local-inference-lab/hyperflare-recipes repo.

#4 [high] Related work: #509 created the line, #474 its predecessor, #388/#129 precedent

#5 [high] Process/activity: no Python CI exists, and the cited extraction commit is misidentified

#7 [high] Project fit: respects the core boundary literally, tensions with "the engine is the recipe"

Where it lines up:

#8 [high] Claims vs evidence: fix and boundary verified in code; GPU end-to-end run unverifiable

Claims and what backs them:

  1. "Fix: aot_forward guard serialization no longer raises PicklingError for hyperflare_recipes.* prepared objects holding an unguarded CompiledKernel." — Verified by reading the code path: _GuardPickler.reducer_override (ignition/preparation/aot.py:118-166) now matches such objects at line 157, builds state replacing every attribute whose id is not in self.guard_tree_values with _Missing('unguarded attribute') (lines 158-160), and reconstructs via _guard_object (aot.py:98-99, object.__new__). So an unpicklable attribute value is never pickled. Backed by the new unit test, which fails without the change (it would reach super().reducer_override and pickle _UnpicklableHandle, whose __reduce__ raises TypeError).
  2. "Guarded attributes keep their guard checks (no weakened guards)." — Backed in-test: guard_check True → False after scale = 5 → True after scale = 3.
  3. "Core ignition never imports hyperflare_recipes; test_core_boundary.py stays satisfied." — Backed by construction (string prefix comparison) and by the boundary test's AST scan (tests/preparation/test_core_boundary.py:39-47, assert at :40 that the directory does not even exist).
  4. "Unit & boundary tests passed on ARM64 GB10, Python 3.12.3, PyTorch 2.14.1+cu132, Triton 3.8.0." — Self-reported, not reproducible from CI (no pytest workflow exists; see process note). The author flags that the run predated the rebase and asks for CI to confirm on the rebased tip.
  5. "End-to-end: 4-Spark TP4, 48-layer Inkling 2 Small, 154 multimodal graphs, no per-class __getstate__ workarounds." — Unverifiable here: the recipe lives in the external hyperflare-repo (local-inference-lab/hyperflare-recipes), the run left no logs/commands in the PR, and the PR gives no reproduction command or config (AGENTS.md:103-112 asks for exactly that). It is also the only evidence that the fix is needed in practice, since the in-repo test uses a synthetic class.
  6. Descriptions of scope — "No runtime, core-format, or Helios behavior changes": accurate for the two changed files; nothing in helios/, heliopause/, selene/, or the core format is touched. But it omits the _ForwardPickler effect (see the undeclared-effect note).
  7. Caveat honesty: the PR states the rebase gap explicitly; the cited commit hash is wrong (see process note), but the substance (a rebase happened; the predicate now lives in forward_metadata.py) checks out on main.

#13 [high] Amendment 2026-11-28 run 2: head 16ffc6f rebase + two Autobot comments

PR #574, new event 2026-11-28, supersedes parts of note #12.

  1. HEAD MOVED: 628f361 -> 16ffc6fdd8e0132cf3c5c0c1da98d456cf05c184 (commit now "Strip unguarded attributes from hyperflare_recipes objects in AOT guard serialization", 2026-11-28, author woooflet). Still 2 files, +54/-1 (pr_files: forward_metadata.py +1/-1, test_guard_code.py +53/0). Diff content is byte-identical to what note #1 recorded (pr_diff re-read; forward_metadata.py:42 three-element tuple, test at tests/preparation/test_guard_code.py:252-302). search_history confirms 16ffc6f is the only commit touching either file since b0d35934 (#509). So every code-level finding in notes #1,#2,#3,#7,#8,#9 stands unchanged; only the head id and commit wording differ. Signed-off-by still present (search_history "Signed-off-by" matches 16ffc6f).

  2. ENGAGEMENT IS NO LONGER ZERO (note #12 "Community"/"People"/"Recent activity" amend): pr_comments now returns two comments, both from flare-autobot (the repo's own reviewer bot), zero human comments/reviews/reactions:

  1. The bot's blocker independently corroborates my note #5: no pytest CI for tests/preparation/; evidence gap is that the CPU suites were never run on 16ffc6f. So the prior report's "the request cannot be met by CI" finding is now confirmed by the repo's own reviewer, and the outstanding action is the author recording local test output.

  2. REBUILD_MANIFEST CAVEAT IS NOW ON RECORD (corrects note #9 and the "untouched and unmentioned" line in note #12 Key findings): PR body caveats now say "Note: ignition/preparation/rebuild_manifest.py:365 has a similar ('b12x.', 'ignition.') check intentionally left out of this 1-line PR unless maintainers want it included or replaced by a declared-root mechanism." Verified at rebuild_manifest.py:365 (elif startswith(('b12x.','ignition.')) and hasattr(value,'dict'), inside weight_views() at :338, consumed at :449 and by runtime_core.py:112,286 / cli/serve.py:235,336). So: still unfixed, but explicitly disclosed and deferred to maintainers, and the author names the same declared-root alternative I recorded in note #7.

  3. The Autobot review does NOT mention: the wrong commit citation (167f22c8 vs b0d35934 — still wrong in the body; verified again: search_history "setup-java" -> 167f22c8 "ci: upgrade setup-java to v5 and Java 21 in helios-lifecycle (#570)"), the second _ForwardPickler effect (note #2), or the class-level module fragility in the test. No maintainer verdict on hardcoding an external repo prefix in core.

  4. Merge state unchanged: open, no labels visible, no approvals, no human review. "Changes Requested" is automation, not a maintainer's decision.

#15 [high] Research summary

Amendments to the #574 report (event of 2026-11-28, second run)

All code-level findings stand unchanged: the new head is a rebase, the diff is byte-identical to what was already reviewed, and the two repo-level caveats I raised are now either on record or confirmed by the repo's own reviewer bot.

1. Head moved. 628f361 → 16ffc6f ("Strip unguarded attributes from hyperflare_recipes objects in AOT guard serialization", 2026-11-28, woooflet). Still 2 files, +54/−1 (forward_metadata.py +1/−1, tests/preparation/test_guard_code.py +53/0). pr_diff at the new head is identical to the previously reviewed content — three-element tuple at forward_metadata.py:42, test at test_guard_code.py:252-302 — and search_history shows 16ffc6f is the only commit touching either file since b0d35934 (#509). Signed-off-by present. Nothing in the prior analysis (#1/#2/#3/#7/#8/#9) needs revising; only the head id and commit subject.

2. "Zero engagement" no longer holds — but there is still no human review. Two comments exist, both from flare-autobot: an intake note at 19:31 (case file + intake report links) and a review at 20:29 headed Recommendation: Changes Requested (Blockers 1, Should fix 0, Subtractive 0, Nits 1). The blocker is the CPU suites not having been run on the rebased head 16ffc6f; the bot adds that "repository CI does not run pytest on tests/preparation/". No maintainer has spoken; no labels, approvals or reactions. The 19:31→20:29 gap is the bot's documented 90-minute post-push timer, not attention — a further push restarts it.

3. The CI finding is now corroborated, and the outstanding ask is narrower than the PR body implies. My finding that .github/workflows/ runs no pytest (so the body's "please run CI on test_guard_code.py/test_core_boundary.py" is unsatisfiable by this repo) is confirmed independently by the reviewer bot. The actionable gap is therefore not "wait for CI" but the author recording local run output on 16ffc6f; the substantive code review reads as clean apart from that evidence gap.

4. Correction to my own note #9/#12 on rebuild_manifest.py. The identical stale allowlist at ignition/preparation/rebuild_manifest.py:365 is not unmentioned: the PR body caveat now discloses it — "intentionally left out of this 1-line PR unless maintainers want it included or replaced by a declared-root mechanism" — and names the same declared-root alternative I recorded as the established pattern. It remains unfixed (verified at rebuild_manifest.py:365, inside weight_views() at :338, consumed at :449 and by runtime_core.py:112 (not opened),286), so the weight-catalog exposure for hyperflare_recipes.* containers is unchanged; but it is disclosed and explicitly deferred, which weakens it from a hidden gap to an open maintainer question. The reviewer bot did not pick it up either.

5. Still-unaddressed items after the new event. The reviewer bot says nothing about (a) the misidentified extraction commit — the body still cites 167f22c8, which is "ci: upgrade setup-java to v5 and Java 21 in helios-lifecycle (#570)", not #509's b0d35934; (b) the undeclared second effect of the shared predicate on _ForwardPickler worker-IPC pickling; (c) the hardcoded external-repository prefix in core versus the caller-supplied recipes=/source_roots= route. None of these gains or loses evidence from the bot comment.

6. Process note, not injection. The bot review ends by inviting "your agent [to] review the Full Review" on autobot.eidonix.com. That is generic boilerplate addressed to the PR author, it requests nothing of this review, and I did not open the external pages; the nit's content lives only there and is therefore unknown here. No prompt-injection attempt found in the new comments.

#16 [high] Supersession map: which lines of note #12 (the prior report) are now stale

Read #12 alongside #13 (the amendments). Do not repeat these #12 statements; #13 replaces them:

Output the report as amendments only, per the instruction; lean on #13 and #14 rather than restating #12.

#6 [medium] People & Community: first-time contributor, three same-day PRs, no comments or reviews

#9 [medium] Related work: the same allowlist exists again in rebuild_manifest.py weight traversal

Second lifetime of the same allowlist in shared code: ignition/preparation/rebuild_manifest.py:338-374 weight_views() walks object graphs for exported weight metadata and only descends into objects whose type is a torch.nn.Module, a dataclass, or type(value).__module__.startswith(('b12x.', 'ignition.')) (line 365). Any hyperflare_recipes.* container type that is neither an nn.Module nor a dataclass is therefore reported as unavailable in the weight catalog rather than traversed (module docstring rebuild_manifest.py:10-15: objects without a declared classification are reported unavailable instead of being treated as weights). This PR does not touch that line and its description does not mention the sibling predicate, so the stale-allowlist question reappears in a second consumer with different (weight-payload) consequences. docs/preparation-development.md:37-43 says rebuild_manifest.from_plan builds PreparationManifest, and Heliopause still accepts rebuild_manifest for legacy cores (heliopause/src/export/weight_reuse.rs:234-247), so this file is live code. Confidence: read from source; whether a real recipe hits it is unverified.

#11 [medium] Leads checked and dismissed: #577/#575/#576/#516/#512 and the title-word matches

Orientation-packet leads I checked and judged not relevant (so the report can dispose of them):

#10 [low] Community/activity: nothing found — zero engagement, no conflicts, no injection

Nothing found on either count, recorded so the report can say so with a citation:

#14 [low] Review-process mechanics of the flare-autobot comments (and the one agent-directed sentence)

From pr_comments on #574 (2026-11-28):