#1 [high] Change: PR #678 propagates bound source roots into spawned processes
PR #678 "fix(ignition): propagate bound source roots to spawned rank and replica processes", base main, head e72ec0d, 4 files +233/-91.
Real semantic changes (small):
- ignition/preparation/source_identity.py:17-19 — new
current_source_roots()returning_EXTRA_ROOTS.get()(5 lines added, whole functional addition to this file). - ignition/preparation/rank_group.py:44-45 —
_peer(..., extra_source_roots=()); :53 importssource_roots; :59 the whole body is wrapped inwith source_roots(extra_source_roots):(this indentation wrap is ~85 of the 91 "removed"/re-added lines in this file — mechanical). rank_group.py:295-298prepare_groupimportscurrent_source_roots,extra_source_roots = current_source_roots(); :309-311 passes it as the last positional arg to the spawned_peer(mp.get_context("spawn"), rank_group.py:301). - ignition/preparation/tuning_replicas.py:142
_replica(..., extra_source_roots=()); :145 import; :158with source_roots(extra_source_roots), CoreStorage(world=plan.world_size) as storage:; :174-176prepare_recipecapturescurrent_source_roots(); :190-194 passes into spawned_replicaargs. - tests/preparation/test_forward_cache_sources.py +129/-3: 3 new tests (current_source_roots scoping; real spawn of rank_group.prepare_group; real spawn of tuning_replicas.prepare_recipe with cuda/CoreStorage stubs).
Not changed but load-bearing: the two consumers of _EXTRA_ROOTS are ForwardCache.init (ignition/preparation/aot.py:845-853, mixes extra-root .py bytes into the cache key -> self.root = root/'forwards'/key.hexdigest() at aot.py:855) and source_identity() (source_identity.py:33-54, combined_roots mixed at :112-113).
The "cache-root agreement check" the PR title/body refers to is not a single named function; the observable effect is that rank 0 and peers derive the same ForwardCache.root (aot.py:855) and thus share the same per-host cache directory and the same source_identity=self.root.name values passed to InductorSelections (aot.py:928, 1225, 1382) -> _execution_identity (inductor_tuning.py:100-106). Also rebuild_manifest.from_plan records source_identity() (rebuild_manifest.py:327).
#2 [high] Related work: #670 contains the same rank_group source-root fix (competing)
PR #670 (open, lukealonso, COLLABORATOR, opened 2026-12-02 00:26, head 0aeb2c1, +823/-267) bundles three things, one of which is exactly PR #678's rank_group.py fix:
- #670 "What changed" third bullet: "TP peer source-root propagation (ignition/preparation/rank_group.py): Before:
_peerexecuted prepare(...) with an empty_EXTRA_ROOTScontext. After:prepare_groupcaptures_EXTRA_ROOTS.get()and passes it to_peer, which enterssource_roots(extra_roots)before invoking prepare(...)." - #670 diff for rank_group.py: +21/-16 (vs #678's rank_group.py +91/-85, which is mostly the same edit plus re-indentation of the whole
_peerbody). - #670 problem statement names the same symptom #678 does: "rank 0 hashed external recipe package roots into its ForwardCache path while spawned peer ranks did not, causing compiled-forward cache misses and FileNotFoundError during TP exports from external recipe packages (such as local-inference-lab/hyperflare-recipes)". (#678 says the symptom is a ForwardCache root agreement failure.)
- #670's Autobot review (2026-12-02 01:03) listed as "Should Fix #2": "Add a CPU-only unit test for peer
_EXTRA_ROOTSpropagation inrank_group.py... no test file added" — i.e. #678 supplies exactly the test #670 lacks. Its Nit also suggested "Consider splitting the ignition/preparation/rank_group.py peer source-root fix into its own PR so the preparation bugfix and the Helios parser feature can be reviewed and reverted independently" — #678 looks like that split, though #678 does not reference #670 and #670 does not reference #678. - #678 adds scope beyond #670: tuning_replicas.py replica propagation and the
current_source_roots()helper; #670 does not touch tuning_replicas.py or source_identity.py. Both are open simultaneously with the same fix in rank_group.py -> merge-order conflict: whichever lands first makes the other's rank_group.py hunk duplicate/conflicting. Autobot review URL for #670: https://autobot.eidonix.com/p/a53c70a8-1c2d-4df6-9fb8-dcba9e7d776e.html
#3 [high] Claims/evidence: "cache-root agreement check in ForwardCache._prepare_ranks" does not exist on main; it is #597's addition
PR #678's description says the bug makes exports "fail the cache-root agreement check in ForwardCache._prepare_ranks". Verified on main/PR head (ignition/preparation/aot.py):
_prepare_ranks(aot.py:1023-1295) contains no cache-root comparison. The only agreement checks are "ranks prepared different forward catalogs" (aot.py:1045-1046),allocation_order's "tensor-parallel capture requires matching forward catalogs" (aot.py:714-715), and kernel-inventory/winner checks in ignition/preparation/inductor_tuning.py:236-279.- A cache-root mismatch on main manifests later and less clearly: peers resolve cache-root-relative paths under their own (empty-root)
self.rootcreated at aot.py:855 -> FileNotFoundError during_allocation_sizes/_load(aot.py:1210-1214, 1238-1242). This is exactly how #597 and #670 describe the symptom ("FileNotFoundError during TP exports", "compiled-forward cache misses"). - PR #597 (open, same author brandonmmusic-max, head 0d794b5) adds the check:
_prepare_ranksgathers(gpu_name, capability, self.root.name)and "fail fast with a clearRuntimeErrorif ranks sharing a GPU product name resolve different cache scopes" (author comment 2026-12-01 19:38 item 3; Autobot review 2026-12-01 20:03 citestest_same_gpu_sku_with_mismatched_cache_roots_is_rejected). So #678's stated error and its SM120 same-SKU/mixed-SKU end-to-end evidence most plausibly come from a stack that includes unmerged #597; on main alone the failure would be FileNotFoundError/cache miss, not a root-agreement error. #597 and #678 look complementary (diagnostic check + root-cause fix) but neither references the other.
#4 [high] Reach: multi-host ignition join peer path still has no source-roots binding
Verified by grep for source_roots|current_source_roots at PR head: the only bindings are ignition/cli/init.py:364-370 (main(..., source_roots=...)), ignition/preparation/rank_group.py:53-59/295-298, ignition/preparation/tuning_replicas.py:145/158/174-176. Nothing in ignition/preparation/host_ranks.py or ignition/cli/serve.py.
Consequence (reasoned, not run): multi-host export/serve peers run ignition join -> ignition/cli/serve.py:528-549, which computes source_identity() at serve.py:546 with an empty _EXTRA_ROOTS, and HostRendezvous._admit compares it to rank zero's identity (host_ranks.py:270-271 "source identity differs from rank zero's; every host must run the same checkout"); serve_peer/RemoteSource also uses source_identity() (host_ranks.py:629-631) and prepares at host_ranks.py:654-657 with no root binding. So an external recipe CLI that binds roots on rank zero still has unbounded peers on other hosts, both for identity agreement and for the ForwardCache key (aot.py:845-855).
This is consistent with the description, which scopes the fix to "spawned tensor-parallel peer processes" and "local tuning replicas", but the PR's headline benefit ("unblocking same-SKU multi-GPU exports launched through external recipe CLIs") should not be read as covering multi-host. PRs #668 and #675 are the open work on that peer path (b12x env / kernel_cache / rendezvous), neither propagates source roots.
Also note ignition convert/serve launched directly as ignition ... never bind roots at all; only external CLIs passing source_roots= do.
#11 [high] Research summary
Case file for PR #678 gathered; scratchpad holds 10 entries covering every angle (change, why, related work, recent activity, people, community, project fit, claims/evidence, reach, process).
Headlines a reader could not get from the description:
-
#670 by lukealonso already contains the identical rank_group.py fix. #670 ("parameterize THINK_TAGS ... and propagate peer source roots", open, +823/-267) makes exactly the
prepare_group->_peersource_roots(...)change; #678 adds the small extra pieces (#670 lacks):current_source_roots(), the tuning_replicas.py replica propagation, and the three new tests — indeed #670's own Autobot review asked for such a test and suggested splitting the rank_group fix out. Neither PR references the other; both open at once on the same lines. -
The stated failure mode ("cache-root agreement check in
ForwardCache._prepare_ranks") does not exist on main. On main a root mismatch surfaces as FileNotFoundError/cache miss; the fail-fast root check is added by the author's other open PR #597, which also matches #678's SM120 same-SKU/mixed-SKU evidence rig. #678 does not cite #597. -
The multi-host peer path is untouched:
ignition join/ host_ranks.py / serve.py never bind source roots, sosource_identity()and the ForwardCache key stay rootless on remote peers; the fix is local-spawn only. -
Small undeclared gaps:
_replicaimports the recipe module (_resolve_recipe, tuning_replicas.py:155) before enteringsource_roots(...)at :158; the new tests assert ContextVar visibility, not equalForwardCache.root/source_identity(); and peer-written rebuild metadata (rebuild_manifest.py:327) now carries rank 0's identity — none of these are mentioned in the PR body or limitations.
Charter fit is clean (no flags, no plugin, shared ignition/preparation, fixes the documented external-recipe CLI entrypoint), no docs were added, no human review or CI exists on the head commit e72ec0d, and the PR is otherwise small: one new 3-line function plus argument plumbing, with rank_group.py's +91/-85 being almost entirely re-indentation of _peer's body.
#12 [high] Why: the problem, its origin, and which issues/PRs report it
Problem: external recipe repos (local-inference-lab/hyperflare-recipes) call ignition.cli.main(..., source_roots=...), which binds _EXTRA_ROOTS (ignition/cli/init.py:364-370, ignition/preparation/source_identity.py:12-30). Two consumers hash those roots: ForwardCache.__init__ (ignition/preparation/aot.py:845-855, key -> self.root) and source_identity() (source_identity.py:33-54, :112-113). mp.get_context("spawn") children (rank_group.py:301, tuning_replicas.py:179) start with an empty ContextVar, so peers get a different root/source identity than rank 0.
Origin of the mechanism: the external-recipe split by Luke Alonso — commits da037284 / 17bb3c4a / 568aeca0 (2026-11-22, "Stage hyperflare_recipes separation...", "Remove extracted hyperflare_recipes...", "Align core Flare docs..."), later PR #545 (698ee450, compositional RecipeParameters + dynamic CLI). source_roots/_EXTRA_ROOTS first appears in the history of source_identity.py at da037284; test_forward_cache_sources.py's source-root tests came with #545/da037284. The public entrypoint contract is codified at AGENTS.md:382-387.
No issue in the repo reports this defect. The only other place it is written down is PR #670 (lukealonso) and PR #597/#668's ForwardCache discussions; #668 reports a different multi-host ForwardCache defect (missing B12X_* env in the cache key) and #651 tracks multi-host autotune divergence. So: no linked issue, no user report attached to #678 — the "why" rests entirely on the PR body plus #670's parallel description.
#15 [high] Amendments of 2026-12-02 (post-rebase) to report #14 for PR #678
PR #678 force-pushed/rebased after the 21:29 UTC comment (head 90b0d315953e453c8438f0129cc5173d01fcb731, +136/-20 in 5 files, was +233/-91 in 4). Items below supersede the corresponding parts of report #14.
-
SCALE/FILES CHANGED. Now 5 files: ignition/preparation/aot.py (+2/-2), rank_group.py (+2/-2), source_identity.py (+6/-1), tuning_replicas.py (+8/-3), tests/preparation/test_forward_cache_sources.py (+118/-12) (pr_files [1]). The rank_group.py +91/-85 re-indentation is gone; the PR's own rank_group hunk is only two lines.
-
#670 IS MERGED (2026-12-02 14:16, head 46e380a, +1132/-307; read_item 670). So report #14's "open competing duplicate, no cross-reference either way" is superseded: #670 landed, and #678 is now a follow-on that (a) replaces the private
_EXTRA_ROOTSimport with the new accessor and (b) adds the tuning-replica path. PR labels are nowarea:preparation, bug, duplicate, priority:P2, triage:review(read_item 678) — repo-side triage still marks it a duplicate. -
FULL-BODY
_peerWRAP IS GONE (my prior "conflict surface / roots stay bound through serve_rank" finding). On this head,with bind_source_roots(extra_roots):at rank_group.py:60 covers only the preparation block to :74, and_peer(..., extra_roots=())at :44-45 is merged #670 code, not part of #678's diff (search_code [6]; pr_diff [2]). #678's only rank_group change isextra_roots = current_source_roots()at rank_group.py:297 replacing_EXTRA_ROOTS.get(). -
TESTS NOW ASSERT CACHE-ROOT AGREEMENT (supersedes scratchpad #7's "asserts ContextVar only"). tests/preparation/test_forward_cache_sources.py:109 computes an unbound
baseline_root; :120-123 assert rank0/rank1 equalextra_rootsAND equalcache_rootANDcache_root != baseline_root. Same for the replica test: :216 baseline, :242-245 equality plus difference. Newtest_current_source_roots_reflects_active_scope(:151-160) checks nesting/reset. Peer test is a real spawn over loopback Gloo; replica test is a real spawn with_cpu_replica_entry(:199-207) patching torch.cuda.set_device/synchronize and core_storage.CoreStorage in the child (author-disclosed limitation, PR description "Supporting evidence and limitations"). -
DESCRIPTION REWRITE (was my highest-value finding). The PR body (read_item 678) now names the
mainfailure mode as divergentForwardCacheroots / FileNotFoundError / cache misses and explicitly conditions the same-SKU mismatch on "unmerged PR #597", and states plainly that_replicatoday callsprepare(..., compile_forwards=False)and exits atTuningCompletewithout reaching an in-tree ForwardCache or source_identity(), i.e. tuning propagation is defensive parity, not a live bug. It also statesgit grep _EXTRA_ROOTSleaves references only inside source_identity.py — verified: aot.py:845-847 and rank_group.py:295-297 usecurrent_source_roots(); remaining_EXTRA_ROOTSuses are source_identity.py:12,19,26,48 (search_code [6][14]). -
DOCSTRING NIT FIXED. source_identity.py:24 now reads "Bind external (label, path) source roots for the active CLI or spawned worker context."
-
STILL TRUE / NOT FIXED:
- Multi-host
ignition joinpath has no source-roots binding: serve.py:528-552 computesidentity = source_identity()at :546 with no bound roots and hands a config toserve_peer; host_ranks.py:597-631 recomputessource_identity()in the peer, compared at host_ranks.py:270-271. Nosource_rootsreference exists in ignition/cli/ or host_ranks.py (search_code [25][29][41][44][47][48][50][56]). Cross-host external-recipe exports therefore still diverge; the mismatch is currently caught by that identity comparison rather than by equal ForwardCache roots. _replicastill resolves the recipe module (tuning_replicas.py:155_resolve_recipe) before enteringwith source_roots(extra_source_roots)at :158 — import-time_EXTRA_ROOTSreads in a recipe module would still see(). Converselyextra_source_rootsis now a required positional (tuning_replicas.py:142, called only at :190-194), so any other caller/spawn site would break loudly rather than silently.- Peer-written rebuild metadata still carries
source_identity()computed in the child (rebuild_manifest.py:326-338,'source_identity': source_identity():329), which now includes rank 0's roots only because of this propagation.
-
NEW CONFLICT SURFACE: #695 (open, lukealonso, 2026-12-02 21:41, +526/-15) rewrites
ignition/preparation/tuning_replicas.pyandtuning.pyfor cross-rank tuning selection sharing (items_touching [58]; read_item 695). It independently reportsForwardCache._prepare_ranksBindingMismatchonscratch_layoutfor--tuning-gpusexports — a different root cause (divergent tuning selections, not cache roots) but the same failure surface #678's description cites, and it edits the same spawn/_replicaregion. Whoever merges second re-resolves the_replicaargs tuple. #695 also reportstest_source_identityfailing in its environment for unrelated venv reasons. -
VERIFICATION STATUS: no CI check run demonstrated on head 90b0d31; the 36-passed/7-suite figure is author-reported (PR description; comment 2026-12-02 21:29). The only Autobot review on the PR is the 11:19 UTC one, which predates the rebase and the test/description fixes; no re-review has been posted.
#16 [high] Research summary
Amendments recorded as scratchpad entry #15; they supersede the corresponding parts of report #14.
Amendments to report #14 (PR #678, head 90b0d31 after the 21:29 UTC rebase):
- The competing PR is no longer competing. #670 merged at 2026-12-02 14:16 (head 46e380a, +1132/−307), so report #14's "open duplicate, neither PR cites the other" is superseded. #678 is now a follow-on to merged code: it replaces #670's private
_EXTRA_ROOTSimport with the newcurrent_source_roots()and adds the tuning-replica path. Repo triage still labels the PRduplicate(P2). - Scale changed: +136/−20 in 5 files (was +233/−91 in 4).
rank_group.py's +91/−85 re-indentation and full-body_peerwrap are gone — #678's onlyrank_group.pychange isextra_roots = current_source_roots()at :297;with bind_source_roots(...)at :60 is merged #670 code. My earlier "roots stay bound throughserve_rank" and conflict-with-#670 findings are withdrawn. - Tests now prove what report #14 said they didn't. Both spawn tests assert
ForwardCache.rootequality between siblings and difference from an unbound baseline (test_forward_cache_sources.py:109,120-123for peers,:216,242-245for replicas), plus a ContextVar nesting/reset test (:151-160). Replica test stubs CUDA/CoreStoragein the child (author-disclosed). - Description and docstring rewritten. The PR body now names the
mainfailure mode correctly, conditions the_prepare_rankssame-SKU mismatch on unmerged #597, and discloses that_replicareaches no in-treeForwardCachetoday — my top finding is closed.source_identity.py:24docstring now covers spawned workers. Docs still untouched (docs/has nosource_rootsmention). - Still unfixed: the multi-host
ignition joinpath (serve.py:528-552,source_identity()at :546 with no bound roots;host_ranks.py:270-271,597-631);_replicastill imports the recipe (tuning_replicas.py:155) before binding roots at :158; peer rebuild metadata still records the child'ssource_identity()(rebuild_manifest.py:329). - New conflict: #695 (open, lukealonso, +526/−15) rewrites
tuning_replicas.py/tuning.py(not opened) and independently reports aForwardCache._prepare_ranksBindingMismatchfor--tuning-gpusexports from a different root cause (divergent tuning selections); merge order decides who re-resolves the_replicaargs tuple. - Evidence status: the 36-passed figure is still author-reported; no CI run is shown on 90b0d31, and the only Autobot review (11:19 UTC) predates all of these fixes.
#5 [medium] Change (detail): what each modified function does, line by line
Files at PR head, all under ignition/preparation/:
- source_identity.py:12-30 —
_EXTRA_ROOTSContextVar with default();current_source_roots()(new, :17-19) just returns it;source_roots(roots=())(:22-30) normalizes to(str(label), Path(path))and sets/resets a token. Docstrings still say "for the duration of a CLI invocation" though the new consumers use it around spawned-process preparation. - Consumers: aot.py:845-853 (ForwardCache key: for each
(label, root)in_EXTRA_ROOTS.get()resolve, raiseValueError(f"bound source root {label!r} does not exist: {extra_root}")if not a dir, then mixlabel/relpath+ sha256 of every *.py); source_identity.py:33-54source_identity()mixescombined_roots = (*_EXTRA_ROOTS.get(), *extra_roots)into the digest (:48, :112-113). - rank_group.py:44-45
_peer(..., extra_source_roots=()); rank_group.py:59with source_roots(extra_source_roots):wraps preparation AND export AND serve/benchmark/direct handoff anddist.destroy_process_group()(the whole body, aot-indent shift); rank_group.py:295-311prepare_groupcaptures roots and passes positionally to the spawn Process. Note the ContextVar capture happens beforecontext.Process(...)(rank_group.py:301-311), so pickling-safe. - tuning_replicas.py:142,158
_replicaenterssource_roots(extra_source_roots)only aroundCoreStorage(...)+prepare(...)call, not around_resolve_recipe(tuning_replicas.py:155, which imports recipe modules by name) — the recipe module import happens before the roots are bound. - Only caller of
ignition.cli.main(..., source_roots=)in-tree is tests/cli/test_recipe_injection.py:78-98 (test_main_binds_source_roots_for_source_identity). External callers per AGENTS.md:382-387 are external recipe repos.
#6 [medium] Gap: _replica imports the recipe before binding the roots
- Nothing in the PR records or comments on this:
_replicacalls_resolve_recipe(prepare, recipe_name)at ignition/preparation/tuning_replicas.py:155 (imports the recipe module, and falls back to scanning the module'svars()forRecipevalues) beforewith source_roots(extra_source_roots), CoreStorage(...)at :158. So for an external recipe package that is only importable because its directory was passed viasource_roots, the replica child still resolves the recipe with an empty_EXTRA_ROOTSbinding. Rank 0'sprepare_reciperesolves nothing itself; the parent path passesplan/recipe through. - Compared with #670's rank_group-only version of the same fix, #678 also covers tuning_replicas — an undeclared-in-#670 extension.
- Mechanical size: rank_group.py's diff is +91/-85 but the only semantic lines are the signature default (:44-45), the import (:53), the
withat :59 and the 3 args at :309-311; the rest is re-indentation of_peer's ~80-line body.
#7 [medium] Claims/evidence: the new tests assert ContextVar visibility, not equal cache roots
Tests at PR head, tests/preparation/test_forward_cache_sources.py:
- :71-80
test_current_source_roots_reflects_active_scope— nesting/reset of the ContextVar. - :93-110
test_prepare_group_propagates_source_roots_to_spawned_peer— realmp spawn, loopback Gloo over the TemporaryDirectory rendezvous, asserts rank 0 and rank 1 memory reports both carry(("external_recipes", str(external)),); skipped off Linux ("local rank supervision requires Linux pidfds") andpytest.importorskip("flare_heliopause"). Stubs the prepare callable so no CUDA/torch.distributed model work happens. - :157-188
test_prepare_recipe_propagates_source_roots_to_spawned_tuning_replica— real spawn; patchestuning_replicas._replicawith_cpu_replica_entry(:146-154) which inside the child patchestorch.cuda.set_device,torch.cuda.synchronize,core_storage.CoreStorage(declared limitation in the PR body). Writesreplica-N.txtand asserts both replicas saw the root with label+path. - What the tests do NOT assert: that
ForwardCache.root/source_identity()are equal between parent and child (the actual bug mechanism) — only that the ContextVar value is visible. Also not covered: multi-hostignition join(host_ranks.py), and_resolve_recipeordering (see the replica gap note). - CI: .github/workflows/python-cpu.yml:30-33 runs
.venv/bin/python -m pytest tests/ -qwithCUDA_VISIBLE_DEVICES=""on ubuntu-24.04, so these spawn tests would run in CI; but the orientation packet reports "CI on the head commit: no checks" for e72ec0d.
#8 [medium] People: author is the #597 mixed-SKU ForwardCache author; no human engagement yet
- Author: brandonmmusic-max (CONTRIBUTOR, Discord "Brandonmusic"), same author as open #597 ("Key compiled forward sharing and Inductor validation by GPU name"), #475, #458, #457; merged: #162, #154; closed: #480, #468, #215, #163.
- #597 is the closest predecessor: same subsystem (ForwardCache/
_prepare_ranks/_share_artifacts/Inductor selections), same hardware story (SM120 Max-Q + Workstation mixed-SKU, 2-GPU same-SKU and 4-GPU mixed-SKU), and it went through 6 Autobot rounds (Changes Requested -> Ready To Merge on head 0d794b5, 2026-12-01 20:03). #678's own end-to-end evidence ("2-GPU same-SKU Workstation and 4-GPU mixed-SKU Max-Q + Workstation") matches #597's test rig exactly. - Neither #678 nor #597 mentions the other; #678 does not cite #670 (lukealonso's PR containing the identical rank_group fix).
- Area owners by commits (last 180 days, per orientation packet): ignition/preparation — Luke Alonso 161, Martin Vit 52, Eugene Rakhmatulin 36; tests/preparation — Luke Alonso 207, Martin Vit 34, jasonc 23. Luke Alonso is a priority contributor per the charter and owner of the external-recipe split (#545, #568aeca0, #17bb3c4a, AGENTS.md:382-387) that created
_EXTRA_ROOTS. - No human reviews/comments on #678 yet (pr_comments => "No comments"); Autobot case file/CI status unknown (PR not in local copy; orientation packet: no checks on e72ec0d).
#9 [medium] Project fit: aligns with the external-recipe rule; no docs added
Charter (read_charter) and repo docs, as facts:
- Charter line 12 "Keep the runtime small and model-agnostic... Ignition writes the recipes"; AGENTS.md:382-387 — "Official model recipes live in local-inference-lab/hyperflare-recipes ... and external recipe repositories can pass their own
Recipetuples directly toignition.cli.main(...). ... Coreignitionmust never importhyperflare_recipesor introduce a plugin discovery framework." #678 works entirely inside sharedignition/preparationand adds no plugin/import, no CLI flag, no env var -> lines up with the "solve the right problem in the right place" and recipe-externalisation rules; it makes the documented external-CLI entrypoint work under TP. - Charter line 21 goal: "Prepare supported model recipes with Ignition and serve captured CUDA graphs from Rust on SM103, SM120, and SM121" — the PR's evidence is SM120 TP2/TP4, inside the supported matrix.
- Charter review standards: "Bug fixes need to address the root cause; don't just swallow, skip, or retry an unexplained error (#397)". #678 propagates the actual binding instead of relaxing the hash -> matches; the only silenced thing is nothing.
- Charter "PR descriptions: Expect four parts" — #678 has why/what/benefit/evidence with an explicit limitations paragraph, so it meets the form. Its evidence is CPU-only plus a claimed un-logged SM120 end-to-end run.
- Related constraint: AGENTS.md:376-381 requires owner approval for new captured-graph op families — not applicable here.
- Docs: grep for
source_roots|_EXTRA_ROOTSin docs/ returns nothing;docs/preparation-development.md/docs/model-preparation.md/docs/cli-design.mddocument cache roots and multi-host but say nothing about external-source-root propagation. #678 adds no documentation. #597 did add docs (docs/cli-design.md, docs/model-preparation.md, docs/preparation-development.md) for its cache-scope rules. - Design-review reference: docs/design-review.md:42-45 external recipes live in hyperflare-recipes; PR description claims here are consistent.
#10 [medium] Reach: only external ignition.cli.main(source_roots=...) launches change; core CLI untouched
Verified on PR head by grep:
source_rootsis only bound in ignition/cli/init.py:364-370 from themain(..., source_roots=...)kwarg; noignition convert/serve/exportsubcommand sets it, andignition/preparation/host_ranks.py/ignition/cli/serve.pynever touch it.- So
ignition exportfrom core (without an external recipe CLI) currently hashes NO external roots on any rank;extra_source_roots=()keeps that byte-identical -> default path unchanged (supports the PR's "backward compatibility" claim). - Anyone who previously called
_peer/_replicadirectly with positional args is unaffected (new arg is last, defaulted); in-tree callers: tests/preparation/test_native_processes.py:228-229 (_peer(parent, None, config, 1, "unused", connection, Control(), prepare, True, True)— 10 positional args, still valid), tests/preparation/test_model_core.py:92-101/126 (patched_peer,*args), and rank_group.py:309-311 itself. No caller passes the new arg. - Cache-reuse impact: for external-recipe launches the cache key now includes the same extra roots on peers as on rank 0, so peers reuse rank 0's per-host compiled forwards instead of missing them. For core launches, nothing changes. No core-format, Helios ABI, or on-disk artifact naming change (compare #597, which altered ForwardCache keying/lending semantics).
- Rebuild/publication:
rebuild_manifest.from_planrecordssource_identity()(ignition/preparation/rebuild_manifest.py:327); with roots now bound on peers, peer-written core rebuild metadata carries the same identity string as rank 0 — previously peers in spawned groups would record a rootless identity. Not mentioned in the PR body.
#13 [medium] Related work: #668 and #675 touch the same ForwardCache/peer-path surface but not source roots
- #668 (open, lukealonso, head d4d7b2d, +423/-44, opened 2026-12-01 22:26, labelled area:preparation, priority:P2) edits ignition/preparation/aot.py (+79/-10) and tests/preparation/test_forward_cache_sources.py (+78/-0) — the same two files #678 touches. It changes
ForwardCache.__init__'s key (adds sortedB12X_*env via_b12x_forward_env(), aot.py:47-100/870-877 per review), atomic.binsaves and corrupt-.binrecovery; it does NOT touch_EXTRA_ROOTSor rank_group.py. Its Autobot review (2026-12-01 22:47) noted overlap with #667/#597 in the same helpers. Direct textual conflict risk with #678 is low (different hunks of aot.py) but both edit test_forward_cache_sources.py, so the test files will conflict. - #675 (open, Reederey87, FIRST_TIME_CONTRIBUTOR, opened 2026-12-02 10:50) forwards recipe
b12x_environmentto multi-host peer ranks in host_ranks.py/serve.py; Autobot stopped its review on 2026-12-02 10:54 with "Another open pull request already covers this change" (i.e. #668). It is the multi-host analogue of #678's local-peer problem, and shows two contributors independently working the same "spawned/remote peer loses parent state" class of bug in the same week. - #664 (open, kbenkhaled) also edits ignition/preparation/rank_group.py; #504 (merged) and #433 (merged) are the last merged changes to rank_group.py/tuning_replicas.py respectively, neither near
_peer's prologue where #678 edits. - #667 (merged, 1fbcc3c9) and #647 (merged, f2ca2c41) are the most recent merged work in ignition/preparation (multi-host peer exports, externalized core signing, tuning); #678 builds on them without reversing anything (orientation packet: no default-branch commits since the branch point touch its files).
#17 [medium] Residue of 2026-12-02 re-review: exact test gating, CLI binding site, remaining private-var uses
Always quotes IDs for tool calls.
Additions/corrections to entry #15, from the same re-review pass (head 90b0d315953e453c8438f0129cc5173d01fcb731).
A) TEST GATING CORRECTION. Report #14 said both real-spawn tests are "Linux-only". Only the replica test is: test_prepare_recipe_propagates_source_roots_to_spawned_tuning_replica carries @pytest.mark.skipif(sys.platform != "linux", ...) (tests/preparation/test_forward_cache_sources.py:210) plus pytest.importorskip("flare_heliopause") (:212). test_prepare_group_propagates_source_roots_to_spawned_peers (:100) has no skipif and no importorskip, and drives rank_group.prepare_group with SimpleNamespace(devices=("cuda:0", "cuda:1")) over loopback Gloo (:111-123). The file total is 246 lines; the diff is +118/−12.
B) TEST FIXTURES worth citing. _stub_forward_cache_root() (:35-42) monkeypatches aot.torch.cuda.get_device_properties to an SM120/96-SM namespace and returns str(ForwardCache(...).root) — this is the whole mechanism by which the tests "assert real cache roots" on CPU. _record_replica_source_roots (:163-172) writes replica-{index}.json with extra_roots + cache_root and raises tuning_replicas.TuningComplete() for index > 0 (matching the in-tree contract that a replica must not continue past kernel preparation). _cpu_replica_entry (:199-207) patches torch.cuda.set_device, torch.cuda.synchronize, and core_storage.CoreStorage in the child, then calls tuning_replicas._replica(*args) — so the real spawn/serialization path is exercised, not the CUDA work. _REPLICA_TEST_RECIPE (:175-196) is a synthetic 1-rank recipe whose prepare is the recorder; it needs RankCosts, Checkpoint, MappingProxyType, SamplingDefaults imports added at the top of the file (:7-19). test_frontend_contract_validates_tool_delimiters (:126-148) is merged #670's test, untouched by #678.
C) THE BINDING SITE (unchanged by this PR, but it is the root of the external-recipe contract): ignition/cli/__init__.py:364 def main(argv=None, *, recipes=(), prog="ignition", source_roots=()), importing source_roots as bind_source_roots at :365 and entering with active_recipes(recipes), active_prog(prog), bind_source_roots(source_roots): at :370. Identical on main (search_code at ref main gave the same lines), confirming the PR does not alter the public entrypoint.
D) REMAINING PRIVATE-VAR USES after the change, all inside source_identity.py and therefore legitimate: definition _EXTRA_ROOTS :12-14, accessor body :19, source_roots set/reset :26 and :30, and source_identity()'s own combined_roots = (*_EXTRA_ROOTS.get(), *extra_roots) at :48 (note the separate extra_roots= keyword there is unrelated to the ContextVar). Nothing outside the module reads it any more, which is what the PR description's git grep claim asserts.
E) FORWARD-REFERENCE the report should keep straight: ForwardCache._prepare_ranks exists on main (aot.py:1023) but the same-SKU cache-root comparison the description originally cited is #597's addition; on main the rank-agreement failure mode is BindingMismatch from guard/binding checks (aot.py:94, :439, :573, :1319). #695 (open) reports exactly that BindingMismatch on decoder.layers[*].attention.scratch_layout from divergent tuning selections — so two open PRs now cite the same exception with different causes, which is the sharpest thing a reviewer should not conflate.