Conventions report · NVIDIA/hyperflare-inference #574

Raw Markdown for agents: https://autobot.eidonix.com/p/d95f2e89-5a4c-4268-905b-3d5b4bdee36a.md

Review of PR #574 — Conventions and duplication lens

PR: #574 "Strip unguarded attributes from hyperflare_recipes objects in AOT guard serialization" · author fordbmorris (association NONE) · base main · head 16ffc6f · 2 files, +54/−1 · no labels, no reviews, no checks on head. Changed files: ignition/preparation/forward_metadata.py (+1/−1), tests/preparation/test_guard_code.py (+53/−0).

Key findings

Verdict: should-fix issues only. The one-token predicate change is correct and stays inside the project's hard boundary rule — core ignition must never import hyperflare_recipes (AGENTS.md:392-393; tests/preparation/test_core_boundary.py:39-47) — and the new test is genuinely discriminating: without the added prefix _GuardPickler falls through to default pickling of _RecipeKernelOwner and _UnpicklableHandle.__reduce__ raises (tests/preparation/test_guard_code.py:252-254).

Two should-fix findings, both about duplication of a policy that already has a single intended home:

  1. The "which __module__ prefixes count as project code" policy is written twice, and the PR extends only one copy. ignition/preparation/rebuild_manifest.py:365 still tests ('b12x.', 'ignition.') while the PR widened ignition/preparation/forward_metadata.py:39-45 to ('ignition.', 'b12x.', 'hyperflare_recipes.'). The tuples even order their entries differently, which shows they are independently maintained copies. On the undeclared weight_views path a hyperflare_recipes.* container is now silently dropped (neither traversed nor listed in unavailable).
  2. The literal 'hyperflare_recipes.' in core ignition departs from the repo's declarative handling of external recipe packages. It is the only occurrence of that string anywhere under ignition/; everywhere else external recipe packages arrive by registration (ignition/registry.py, ignition/preparation/source_identity.py, ignition/cli/__init__.py). Any other registered external package hits the identical PicklingError this PR fixes, and the new test hardcodes the same literal so the suite cannot notice.

Three nits on the new test (misleading name vs. sibling precedent, global un-restored __module__ mutation, third copy of the compile→serialize boilerplate).

No blocking defect in this lens. Recorded-but-not-from-this-lens: the previously recorded blocker on this PR (tests never run on the rebased head) still stands and cannot be satisfied by CI — see Open questions.

Scope read

Full diff; ignition/preparation/forward_metadata.py in full; ignition/preparation/aot.py:90-175 (_GuardPickler, _guard_object); ignition/preparation/rebuild_manifest.py (traversals, declarations, call sites); ignition/preparation/runtime_core.py callers; ignition/registry.py; ignition/preparation/source_identity.py; ignition/cli/__init__.py:360-385; tests/preparation/test_guard_code.py and test_core_boundary.py in full; tests/preparation/test_aot_guards.py, test_unavailable_resources.py, test_compile_pool.py; helios/tests/runtime_core_fixture.py; AGENTS.md; docs/design-review.md; docs/preparation-development.md.

Should fix

1. The project-module-prefix policy exists twice; the PR extends one copy and leaves them divergent

2. 'hyperflare_recipes.' hardcoded in core ignition departs from the repo's registered-source-roots mechanism for external recipe packages

Nits

Verified clean (no finding)

Open questions / what could not be settled from code here