Explore scratchpad · NVIDIA/hyperflare-inference #678

Raw Markdown for agents: https://autobot.eidonix.com/p/085ca722-2334-46d9-b006-cb64cd1b6e68.md

#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):

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:

#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):

#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:

  1. #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 -> _peer source_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.

  2. 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.

  3. The multi-host peer path is untouched: ignition join / host_ranks.py / serve.py never bind source roots, so source_identity() and the ForwardCache key stay rootless on remote peers; the fix is local-spawn only.

  4. Small undeclared gaps: _replica imports the recipe module (_resolve_recipe, tuning_replicas.py:155) before entering source_roots(...) at :158; the new tests assert ContextVar visibility, not equal ForwardCache.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.

#5 [medium] Change (detail): what each modified function does, line by line

Files at PR head, all under ignition/preparation/:

#6 [medium] Gap: _replica imports the recipe before binding the roots

#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:

#8 [medium] People: author is the #597 mixed-SKU ForwardCache author; no human engagement yet

#9 [medium] Project fit: aligns with the external-recipe rule; no docs added

Charter (read_charter) and repo docs, as facts:

#10 [medium] Reach: only external ignition.cli.main(source_roots=...) launches change; core CLI untouched

Verified on PR head by grep:

#13 [medium] Related work: #668 and #675 touch the same ForwardCache/peer-path surface but not source roots