Amendments to the #606 case file — head 8c1a28a (2026-11-29 17:13 UTC)
Scope: this supersedes the earlier case file (which described head 2535841, +101/−5 / 4 files). Only the delta is reported: what must be retracted, what is still open, four new findings, and the narrowed recommendation. PR #606 is now +191/−8 in 5 files, still open, still zero human reviews, labels now area:preparation, bug, triage:review (previously none), and the only comment since the last case file is the author's own "addressed all review items" reply (PR #606 comment thread, 2026-11-29 17:13).
Key findings
- Production code is materially unchanged in the new commit. The only production additions are
self._warmup_pool = NoneinCoreStorage.__init__(ignition/preparation/core_storage.py:74, confirmed bypr_filesandcore_storage.py:301-310) and one comment atignition/preparation/capture.py:123. The delta is the rewritten GPU test (+134 lines), docs (+4/−1) and a rewritten description. The earlier blockers about undeclared attributes and docstring contradictions are withdrawn. - NEW BLOCKER (narrowed): the new test still cannot reach the two export validations the fix exists to satisfy. It exports through
RuntimeCore.write(tests/preparation/test_capture_cublas_workspace_cuda.py:244-249), whose request dict never setsdiscover_allocations(ignition/preparation/runtime_core.py:108-133; the sole setter in the repo isexport_modelatruntime_core.py:360), and the test constructsRuntimeCorewithoutdevice_address_floor, so it stays at the constructor default0(runtime_core.py:97-98) whereas the real path passesstorage.EXTERNAL_FLOOR if storage.integrated else 0(runtime_core.py:364). Therefore neither the discovery/containment rejection nor the below-floor rejection runs. The test's Python-level assertions are real and useful (module pool never created:187, pool id registered:189, block active in the warmup pool:190, every segment insidestorage.mappings:197-204, workspace bound instorage.graph_pool:205), but they are not the native check that produced the quoted error. - Coverage was lost in the test rewrite: the direct
_seed_warmup_workspaces(fresh_stream, 0, export_warmup)call on a fresh stream is gone (the third-argument branch is now only reached indirectly throughcapture_forwards,capture.py:119-124), and the previous export-path transient-cleanliness assertion (not _active_pool_blocks(transient.id)) survives only for the non-export test (:94-96). The test module docstring is now stale: it still says the file "needs no package-export resources" (:4-13) although it now importsModuleImages,CoreStorageandRuntimeCore(:148-154) — the same drift class the commit set out to fix. - STILL OPEN, undeclared in the description: the
_preparation_poolsregistration changes exported content.CoreStorage.unused_ranges()sweeps snapshot segments whosesegment_pool_idis in_preparation_poolsand reports padding/inactive bytes (core_storage.py:320-335);export_modelfeeds those into bothinactiveandzero_ranges(runtime_core.py:298-301), which drivelive_piecessplitting andwithout_zero_rangesin the native exporter (heliopause/src/export/capture.rs:1259-1303,:1305). The new test never callsunused_ranges()and passes nozero_ranges, so this effect is untested. Note also that the warmup block is active in the pool (core_storage.py:309, asserted at:190) and is not marked content-free the way graph-pool segments are (runtime_core.py:298-299); whether its bytes are actually transferred depends on reachability fromroots/execution(capture.rs:3167-3182), andexport_modelpasses noroots(runtime_core.py:354-370), so it is probably skipped — incidental and unasserted. Cheap in-repo fix: extend thezero_rangeslist atruntime_core.py:298-299with the warmup-pool segments. Correcting the prior review comment ("avoids 32 MiB/rank of bloat"): that cost saving is not established by the code. - Still no re-export note, still no issue link, #332 unmentioned. The description now quotes the native error and cites #331/#266 (PR #606 body), and #331's "outside any caller-owned pool, and the exported graph pool" invariant is now acknowledged — but the body still frames the change as preserving all of #331's invariants when it reverses exactly that one (
capture.py:59-64), and it still does not say whether cores exported before this change need a new export — the sentenceyatesdrrequired on #331 and which #331's final description carries. #266 stays open/P1 and is referenced, not tested; #332 (the export-time diagnostic that would make this class self-detecting) is not mentioned. - The CI gap is structural, not incidental:
.github/workflows/contains onlyhelios-lifecycle.yml(not opened),native-serving.yml,release.yml(not opened); none runs pytest/the Python suite (pytest,unittest,tests/preparationmatch nothing under.github), andFLARE_RUN_CUDA_TESTSappears nowhere there. Every CUDA assertion in this PR is local-only by design, so "36 passed, 1 skipped" and the reversed-order run on GB10 remain self-reported and a maintainer must confirm them rather than wait for checks. - Mechanistic corroboration of the quoted failure (supports the fix being plausible): in the error string the
context 0x0is a null CUcontext returned bycuPointerGetAttributewithrecorded context Some(125396576)(heliopause/src/export/capture.rs:1443-1460), i.e. the pointer was no valid allocation in the serving context at all — consistent with a default caching-allocator segment on unified memory.0x4000000000is exactlyCoreStorage.EXTERNAL_FLOOR(core_storage.py:42) and+2097152is the 2 MiB pool segment, not the 1 MiB of requested tensor bytes (capture.py:73-74: 512×512 bf16 +empty_like). The fix works because core-allocator segments fall inside declareddevice-Nmappings withpreserve_address=True(runtime_core.py:308-310), which discovery skips (capture.rs:1437-1442).
Retractions (downstream must not repeat these)
- "Docstring contradicts the new behaviour in
_seed_warmup_workspaces" — fixed;capture.py:52-65now describes both branches (pool=Nonemodule pool;warmup_pool()export pool) consistently. - "Documentation drift at
docs/preparation-development.md:88-91" — fixed;:92-94now documentsCoreStorage.warmup_pool()and "inside declared core mappings" (nit: awkward reflow — "mappings. Ranks" at:94). - "The GPU test never exercises a real
CoreStorage/ declared mappings" — fixed; the test is now a subprocess (:123-145) runningcheck_export_warmup_pool(:148-254) against realCoreStorage+ModuleImages, with the mappings-containment assert at:197-204. - "
_warmup_poolis created viagetattrand undeclared in__init__" — fixed (core_storage.py:74); the remaininggetattrat:305only serves the CPU fake test that builds the object withCoreStorage.__new__(tests/preparation/test_core_storage.py:95-97). - "The GPU test pollutes shared
_warmup_streams[0]/cuBLASLt cache state" — fixed by subprocess isolation (:123-128), same pattern astests/preparation/test_recorded_export_graph_cuda.py:14-20. - "The description omits the failing native error and the #331/#266 references" — fixed; the body now quotes "external allocation 0x4000000000+2097152 is not device memory in the serving context (memory 2, context 0x0, recorded context Some(125396576), serving context 0x7796660)" and references both.
- "No labels / 4 files" — superseded: 5 files, +191/−8, labels
area:preparation, bug, triage:review.
What the change is (unchanged from the earlier case file, for orientation only)
CoreStorage.warmup_pool() lazily builds one persistent torch.cuda.MemPool(self._allocator.allocator()), caches it on self._warmup_pool, and registers pool.id in _preparation_pools (core_storage.py:301-310, same shape as scratch_pool() at :295-299). capture_forwards duck-types warmup_storage.warmup_pool() and passes it, keeping the exact 2-argument call otherwise (capture.py:117-124). Net effect in export processes: the module-level pool is never created at all (capture.py:68-71 skipped), so one warmup pool per CoreStorage instead of two — retention moved, not added, and still not stated in the description.
Recommendation (unchanged verdict, narrower reason)
Still Changes Requested. Blocker: the new test bypasses the two export validations the fix targets (discover_allocations absent from RuntimeCore.write's request, runtime_core.py:108-133/:360; device_address_floor left at 0, runtime_core.py:97-98/:364) and dropped the direct-branch/transient assertions — route the test through export_model (precedents: helios/tests/fixed_core_fixture.py:171, helios/tests/gather_core_fixture.py:134 (not opened)) or teach write the flag, and restore the lost asserts. Should-fix: state and (cheaply) handle the inactive/zero_ranges export-content effect of the new pool id, add the re-export note, and stop claiming #331's caller-owned-pool invariant is preserved. Nit: fix the stale test module docstring (:4-13) and the docs/preparation-development.md:94 reflow.
Open questions
- Does the new test pass on a hardware-integrated host where
storage.integratedis true andEXTERNAL_FLOORis non-zero — i.e. would it still pass if the seed landed below the floor (core_storage.py:42)? Nothing in the new test can tell. - Does the warmup pool's active block actually get written into exported cores, or is it skipped as unreachable (
capture.rs:3167-3182)? Unasserted either way. - Do cores exported before this change on unified-memory GPUs need a re-export?
- Is relocating the allocation the right layer versus #332-style export diagnostics? Unsettled design call for maintainers.
Not found / not relevant
No linked issue or bug report corroborates the specific GB10 export rejection; no competing fix; local tracker searches for this failure produce nothing but #266/#331/#332/#395 (all unrelated to the new commit). Signed-off-by still unverifiable from here — a recurring blocker in this area (yatesdr raised it on #331 and #332).