Case file — PR #618: core,hub,heliopause,ignition: decouple signed bodies, single-pass export, slice synthesis, and HF LFS SHA-256
Author: lukealonso (COLLABORATOR; Discord lukealonso) · open, marked ready for review, opened & last updated 2026-11-29 19:40 · head 3a57a70 · base main · +4784 / −399 in 23 files · 0 reviews, 0 comments, no labels · CI failed on head.
Key findings
- No core-format version bump accompanies the new external bodies.
helios/src/core/schema.rs:23still saysFORMAT_VERSION: u32 = 2, andsign_envelopewrites it unchanged (helios/src/core/protection.rs:1396+);core.protoonly adds an optionalExternalBodymessage and two optional fields (helios/proto/core.proto:396-420). A core whose envelope exceeded 128 MiB therefore has empty inlinebodyfields, andmain's verifier passes an empty body intocheck_commitmentand fails (helios/src/core/protection.rs:101-106, 674, 713onmain). The PR's own test asserts the mirror image — verification errors without aBodyStore(core::protection::tests::external_body_spills_and_round_trips_through_container_conversion_and_cache,protection.rs:2794-2830). So: spilled cores are readable only by this version or newer, nothing in the description says which release first ships it, and the stated compatibility guarantee covers only the ≤128 MiB inline path (which is preserved byte-identically). - Two undeclared API/behaviour tightenings.
EnvelopeBuilder::sign()now fails for cores above the inline limit ("core envelope exceeds its inline limit and requires external body tensors",protection.rs:1379-1390), andEnvelopeBuilder::deployment/ranknow reject empty bodies (protection.rs:1363-1377, previously only> MAX_BODY). New publicwith_inline_limit(usize), clamped toMAX_ENVELOPE(protection.rs:1355-1361); production export never sets it, so the 128 MiB spill trigger is automatic. - Three change areas beyond the four described surfaces change quietly:
flare inspect's unverified path re-derives the selected deployment differently, enforces the 1 GiB aggregate on declared sizes before decompression, and changes error text (helios/src/runtime_core/metadata.rs:129-210); Orbit'smirrored_rangesnow mirrorsflare.body.*and refuses cores over the caps (flare-cli/src/orbit/controller.rs:2143-2160) — an older controller on a peer node cannot mirror a spilled core, a mixed-version fleet hazard the description does not mention; and the--reuse-weightsJSON grewexternal_bodies(heliopause/src/export/weight_reuse.rs:19-40,#[serde(default)], so forward-safe but not backward-readable by older heliopause). - Claim 1's three premises are verified real on
main. Bare 64-hexlfs.oidis stored asFileIdentity.etag(flare/src/hub.rs:1144-1152) whilecontent_digestrequires thesha256:prefix (hub.rs:1737-1752), so tree-API LFS files were never digest-checked;publish_copywrote.adopt-<pid>-<n>-<name>(hub.rs:1631-1637) whichdownload_cache::adopted_keycannot match (flare/src/download_cache.rs:1081-1107) so crash orphans were unreclaimable;adopt_completetook no<key>.lockandpublish_copyfell back torenameover an existing complete destination (hub.rs:1558-1581,1656-1665). - No filed bug or measurement backs areas 3 and 4. Searches for tracked motivation (double D2H read, stable/tuned staging truncation, peak capture host RAM, re-download after layout edits, LFS verification, adoption locking) returned only #618 itself; the "why" rests entirely on the description. The charter's evidence rule asks performance PRs for served-workload benchmarks (#210), and the description explicitly says "Live multi-GPU export memory and download throughput on whole checkpoints are not measured in this PR."
- The 128 MiB work is the deliberate follow-on to #371 and the #398 TP16 stack. #371 (merged 2026-11-21, voipmonitor) raised
MAX_SELECTED_RANK_METADATA512 MiB → 1 GiB for 16-rank Kimi cores (~592 MiB aggregate metadata) while keeping the 128 MiB per-rank/per-envelope caps; #618 removes the envelope ceiling that #371 deferred. #618 keeps the 1 GiB cap (schema.rs:32) and enforces it before decompression (protection.rs:1007, 1204). - Textual conflicts with two open PRs. #606 (open, avifenesh; reviewed "ready to merge" 18:03 the same day) restructures
capture_forwards, which #618 rewrites wholesale around anExitStack+ publication lock (ignition/preparation/capture.py:120-131). #586 (open, FujitsuPolycom) adds tests to the samepayload_export_testsmodule inheliopause/src/export/core.rsthat #618 extends. Whichever lands second must rebase. - Author is the owner of every touched area and wrote the code being repaired. Dominant committer 180d: helios/src 224, flare/src 62, heliopause/src 58, ignition/preparation 156, tests/preparation 205, docs 379, helios/proto 47. The Hub tree-API/
.adopt-*behaviour #618 fixes came from their own21b2eae3and9710cadcsix days earlier (2026-11-23); the capture.rs silent-overwrite family matches their own #593 merged hours before. Charter lists them as a priority contributor.
The change
Four independent fixes in one PR (line counts per pr_files):
- Hub LFS SHA-256 + blob adoption (
flare/src/hub.rs, +619/−34;flare/src/{cache_support,trust}.rs, +2/−2 each).FileIdentitygainssha256: Option<[u8;32]>, populated fromentry.lfs.oidviaparse_sha256_hexinfetch_tree_identitiesand fromcontent_digest(&etag)infile_identity_with_agent, preserving opaque bare-hex HTTP ETags.pending_network_from_identities,fetch_file_with_identity_and_streams(blob_matches,adopt_hub_file) andtransfer_blob_with_streamsverify againstmetadata.sha256().adopt_completenow takes a non-blocking exclusive<key>.lockbefore checking the destination, andpublish_copy(..., replace = false)never overwrites a complete blob; temporaries are named.<key>.adopt-<pid>-<n>sodownload_cache::reclaimcollects crash orphans (contract-tested bytree_api_lfs_verifies_downloaded_and_cached_blobs_by_sha256andadopt_complete_locks_preserves_existing_blob_and_uses_collectible_temp_name). - **External signed bodies (
helios/proto/core.proto+13;helios/src/core/protection.rs+834/−38;reader.rs+35/−3;export.rs+70/−40;cache.rs+345/−13;conversion.rs+18/−6;conversion/edit.rs+13/−6;runtime_core/{protection,metadata}.rs;heliopause/src/export/weight_reuse.rs+45/−6;flare-cli/src/orbit/controller.rs+24/−1; both design docs +45/−16).sign_envelopesigns over the uncompressed bodies, encodesProtectedCore, and only whenencoded_len() > inline_limitrewrites each deployment/rank body as one zstd level-3 frame (window ≤ 8 MiB, checksum/contentsize, no trailing bytes) intoExternalBody{sha256, stored_nbytes, decoded_nbytes}, deduplicated by digest intoflare.body.<sha256>U8 tensors; rank compression is parallel over up toMAX_RANK_AUTH_WORKERSthreads and the re-encoded manifest is re-checked againstMAX_ENVELOPE(protection.rs:1433-1494). Verification preflights declared selected-rank bytes againstMAX_SELECTED_RANK_METADATAbefore reading any external body, checks each compressed frame's SHA-256 before decompression, then the commitment and Ed25519 signature over decoded bytes (protection.rs:998-1018,371-560).export.rsnow streams the primary to disk (write_primary_to_file) instead of building one heapVec<u8>. Docs updated to describe the tensor and the ordering (docs/core-format-design.md:178-192, 252-270, 441-447;docs/runtime-core-design.md:501-510). - Single-pass capture, staging disambiguation, streaming forwards (
heliopause/src/export/capture.rs+261/−62;core.rs+93/−2;ignition/preparation/aot.py+168/−34;capture.py+110/−91;tests/preparation/test_preparation_reclamation.py+209). NewRoot::capture_streaming_payloadreserves a 4,096-byte prefix, streams and hashes unknown-length bytes once, discards staging on hits, and backfills the deterministic companion header on misses;Root::verified_payloadvalidates length and on-disk SHA-256 without re-reading caller streams.capture_group_into_cachereplaces thescan_group_blocks+insert_payload(ElidedBlocks)two-pass loop (one read pass; zero staging writes for--no-weightsweight groups);ElidedBlocksis now#[cfg(test)]. Uncached staging names becomerank-{rank}-{stable|tuned}-{base}.payloadopened withcreate_new(true)(core.rs:1771-1778, 2039-2045).StorageBackend.retire_after_capture()strips_bound,inputs,signature,invocations,_serialized_artifact,artifact,cubin_rawwhile keeping_cuda_allocation_sizesand loaded Triton/native owners;DeferredCompiledForwardre-materializes viacache._load(..., required=True);ForwardCache.prepare_many/_prepare_many/_prepare_ranksgainedstream=/_locked=;capture_forwardsholdscache._publication_lockand materializes/captures/retires one forward at a time whenretain_forwards=False(aot.py:453-499, 672-694;capture.py:120-131). - Local slice synthesis (
helios/src/core/synthesis.rsnew, +1804;cache.rs,mod.rs,flare/src/hub.rs). New model-agnostic module called fromRoot::plan_acquisition_for_model(used byflare/src/hub.rs:3053); only the Hub path supplies a model key —plan_acquisition_withstill passesNone(cache.rs:654-660), and all other in-tree callers are tests. Donor discovery scans the caller's cache model key, the target's derived key, and all cached models with a matching signedcore.model_identity, skipping conflicting non-emptycheckpoint_revisions and preferring matching revisions and(tensor_parallel, rank)(synthesis.rs:494-518, 639-708); donors are leased so they cannot be reclaimed mid-plan. Plans match targetPreparedWeightCatalogviews to donor views by exact layout or declared checkpointsources, allow zero-elided donor subranges and ≤64 KiB alignment gaps, coalesce contiguous copies/fills, probe 3 representative payloads when >8 candidates (bail to HTTP on probe failure), and stream 8 MiB chunks over ≤16 workers with Linuxposix_fadvise,AcquisitionProgressaccounting and cooperative cancellation (synthesis.rs:1119-1228). A synthesized blob is published viapublish_verified_payloadand removed fromremote_files()only whenPayloadId::from_digest(sha256(bytes)) == plan.target; otherwiseMismatch→ transparent HTTP fallback (synthesis.rs:973-1085).
What the description says the change does not do, or understates (all verified in the diff, see Key findings 1–3): no format-version bump; sign() becomes a failing API; empty bodies now rejected; inspect, Orbit mirroring and --reuse-weights JSON change shape without being called out; capture_forwards now holds the forward-cache publication lock for the whole capture phase; deferred forwards are re-materialized from a cache path with required=True, so a reaped artifact fails capture rather than degrading (not covered by the described tests).
The why
- Area 1 is self-consistent and verified: the tree-API plan was unconditionally preferred (
hub.rs:1203-1216onmain), so every LFS file planned through it carried no digest and SHA-256 checking was silently disabled downstream. Introduced by the author's own21b2eae3/9710cadc(2026-11-23). - Area 2 has a concrete external driver: #371 (merged 2026-11-21, voipmonitor) documents "~37 MiB of reconstructed prepared-weight metadata per rank … aggregate ~592 MiB exceeds the previous 512 MiB
MAX_SELECTED_RANK_METADATAcap" for TP16 MoE and deliberately left the 128 MiB per-rank/envelope cap alone; #398 (open issue, voipmonitor) is the Kimi K3.1 Pro + DSpark TP16/DCP8 stack with published 16× RTX PRO 6000 Blackwell cores. No issue names "128 MiB envelope blocks publication" directly. - Areas 3 and 4 have no linked issue, bug report, or benchmark. All searches (
export weight capture device host copy twice staging,export payload staging tuned stable overwrite corruption,PayloadId reuse,PreparedWeightCatalog views sources,flare download cache reclaim adopted files,LFS sha256 verification download integrity, …) returned only #618. Nearest precedents: #593 (merged 2026-11-29, lukealonso) same silent-corruption family incapture.rs; #498 (merged 2026-11-24, FujitsuPolycom) measures the two-passWeightDownload(404 copies across 4 ranks) in this exact machinery; #559 (merged 2026-11-27, voipmonitor) documents 6.1 GiB RSS/rank and 96% CPU ingc_collect_mainduring Kimi TP16 export — the closest published evidence the retention problem is real, though #559 fixed reclamation, not retention. Synthesis has no in-repo precedent at all.
Related work
- #371 (merged, voipmonitor) — same
protection.rsverify path; #618 is its deferred follow-on, keeps its 1 GiB aggregate. - #398 (open issue, voipmonitor) — the TP16 workload behind the framing; #618 is not in its enumerated PR list and touches files that stack does not own, so it is additive rather than part of it.
- #559 (merged, voipmonitor) — created
BoundForward.retire_after_capture()andtests/preparation/test_preparation_reclamation.py, both edited/extended here (per-forward retirement becomes materialize+capture+retire). - #587 (merged 2026-11-29, FujitsuPolycom) — same
heliopause/src/export/core.rs; removed per-span digest+fsync, which is what makes single-pass streaming affordable; adjacent hunks, merged before. - #586 (open, FujitsuPolycom) — parallelizes Engram plane assembly in the same file and adds to the same
payload_export_testsmodule; three-way overlap risk. - #606 (open, avifenesh) — edits
_seed_warmup_workspaces/capture_forwards; #618 rewritescapture_forwardswholesale; textual conflict, semantics disjoint. - #498 (merged, FujitsuPolycom) — PCIe D2H tail-fence in the
Downloader/WeightDownloadmachinery #618 drives once instead of twice; #618 halves exposure to that bug class (a side benefit the description omits). - #593 (merged, lukealonso) — same silent-corruption family, same file, hours earlier.
- #79 (open, efegokdemir) — no-replace rename fallback for heliopause blobs; same "publish without clobbering" concern at another layer, complementary.
- #617 (open, lukealonso) —
flare models gc --prune, same author/day, adjacent cache-reclaim area, no shared files. - #588 (closed) surfaced only on a
publish_verified_payloadname match; not read — a lead, not followed. - Chronology note:
9de65fbd(2026-11-17, "Reuse cached core payloads and return transferable Orbit primaries") is the ancestor idea synthesis generalises from whole-payload reuse to byte-range reuse;190efabb(#539, PCCessna, "zero-staging export blob reuse") is the direct precursor ofcapture_streaming_payload.
Recent activity
Everything #618 touches was churning in the 48 hours before it: eee6a9fa (PCCessna, #581, USE_NODE_PRIORITY on exported graphs), 0c25e88f (lukealonso, #613), 9a054b49 (#608), fb32cd39 (#598), f1bd4210 (#587), a39f6777 (#593), 190efabb (#539), 3e2fcd27 (#559). #618 builds on this series (#539 → #593 → #587 → #618) rather than reversing anyone's work; the only textual conflicts are the two still-open PRs above. Its protection.rs work sits on top of the fb32cd39/0c25e88f-era changes and follows #371.
People
- Author: lukealonso — COLLABORATOR, charter priority contributor ("
@voipmonitor,@original-el8,@lukealonso… we never close their PRs out of hand"), 21 merged PRs in 180 days, one other open (#617). Primary owner of every area touched (commit counts above), and author of the Hub code being repaired. - Area regulars not yet engaged: yatesdr (47 helios/src, 47 docs; reviewed #371 with CHANGES_REQUESTED), voipmonitor (#371, #398, #559, reviewed #586/#587), FujitsuPolycom (#498, #586, #587), Martin Vit (52 helios/src, 52 ignition/preparation), jasonc/Eugene Rakhmatulin (flare/src), efegokdemir (#79), avifenesh (#606).
Community
Nothing: no comments, reviews, or reactions on #618; opened and last updated in the same minute (no follow-up pushes or replies). Comparable-size recent PRs (#498, #559, #606, #79) each drew an automated case-file comment within minutes; #618 has none in the local copy, consistent with it being opened at the snapshot cut-off.
Project fit (facts from read_charter)
- Aligns: the four-part description standard (why / what changed / claimed result / evidence) is met, with an explicit Limitations block; model-agnostic rule (#267/#334) is respected — synthesis matches catalog layouts and declared
sources, no model branches, no user-facing flags or aliases; targets the stated SM120/GB10 hardware via the TP16 Kimi cores; the compatibility rule ("verify that existing data, artifacts, and exported cores still load") is met for existing inline v2 cores, byte-identically. - Tension: "Bring real evidence: performance PRs need benchmarks showing an actual speedup over
mainon a served workload (#210)" — the performance half of the claims (halved D2H passes, bounded peak RAM, fewer downloads) has no served-workload benchmark and the PR says so itself. "What gets merged: … a reproducible bug, a measured performance/memory issue" — areas 1 and 2 qualify (verified defects, #371/#398 pressure); areas 3 and 4 lean on the author's standing rather than a filed report. Nothing in the roadmap (#6, #267, #215) covers this; it is infrastructure maintenance.
Claims and evidence
- Verified independently on
main: all three Hub-adoption premises (Key finding 4); the two-pass read in the old capture path and theFile::createtruncation ofrank-{rank}-{base}.payload;MAX_BODY/MAX_ENVELOPE= 128 MiB andMAX_SELECTED_RANK_METADATA= 1 GiB (schema.rs:25-32);FORMAT_VERSION = 2unchanged. - Verified in the PR tree: the spill/verify ordering, the synthesis acceptance gate (
PayloadIdequality), single-pass capture,create_newstaging,DeferredCompiledForward/retire_after_capture, streamingprepare_many, publication lock incapture_forwards. - Claimed, evidenced by tests only (CPU fixtures, Linux x86_64,
ulimit -l unlimited, commit3a57a707): helioscore::+runtime_core::496 passed / 0 failed / 12 ignored (incl. 3 newexternal_body_*, the capture-streaming and 3 newsynthesistests); helios full lib 1724 passed / 45 ignored / 6 failed (frontend templates needingFLARE_TEST_TEMPLATE_DIR);--test unverified_empty1 passed; flare 245 passed / 0 failed / 4 ignored; heliopause 213 passed / 0 failed / 6 ignored; flare-cli 24 passed acrosscache_commands/cli/inspect/unverified_payloadplus a clean release build; flare-cli--bin flare201 passed / 3 ignored / 1 failed (distribution::tests::source_waits_for_receiver_file_verification, BrokenPipe after a 130 s idle wait, declared pre-existing); eos 2, selene 548; selene-manager 187 lib + 3 builder + 82 client with 3 declared pre-existing TCP/TLS loopback failures; Pythontests/cli133, design-review hook 18, targetedtests/preparation56, fulltests/preparation1148 passed / 74 CUDA-gated skipped / 2 declared environment failures (shared-processtorch.cudainit; preinstalled wheel built from base tree). - Not evidenced: any live multi-GPU export memory or download-throughput number; CUDA-gated graph capture/export tests (
FLARE_RUN_CUDA_TESTS=1,FLARE_RUN_TP_CUDA_TESTS=1); live multi-rankignition export/flare run; Windows; frontend template tests; and no test at all in the diff for the changed unverifiedinspectpath.
Reach
Users/operators: anyone pulling TP8/TP16 MoE cores (new spilled cores need this version or newer, and a mixed-version Orbit fleet will not mirror them); anyone on main's tree-API Hub path (downloads start being digest-verified, and a cached blob whose lfs.oid does not match will now be refetched); exporters on hosts where multiple ranks' metadata previously fit under 128 MiB see no change; --reuse-weights JSON is forward- but not backward-compatible; flare inspect output/error text and the aggregate preflight change; disk layout unchanged except for the new flare.body.<sha256> tensors and the renamed .adopt- temporaries (which is what makes orphans reclaimable); no new flags, no defaults changed, no dependencies added; docs/core-format-design.md and docs/runtime-core-design.md updated in the same PR.
Process
Open and marked ready for review on the day of the snapshot, single push, no labels, CI failed on the head commit (cause not visible in the local copy; the description attributes every local failure to pre-existing tests, which I could not confirm). Self-declared limitations are unusually complete. Reviewers for these areas (yatesdr, voipmonitor, FujitsuPolycom) have not engaged.
Open questions / could not find
- Which release/tag first ships external bodies, and should
FORMAT_VERSIONor a capability flag be bumped so a spilled core is rejected cleanly rather than as a commitment mismatch? Related: should the Orbit mirrorer version-gateflare.body.*? - CI failure cause on
3a57a70— not visible locally; whether any of the 6+3+2 declared "pre-existing" failures are actually caused by this PR is unconfirmed. - No served-workload benchmark for the halved D2H passes, bounded peak RAM, or download-throughput claims (charter #210).
- No filed bug behind areas 3 and 4; whether a maintainer requested them is not recorded anywhere I could see.
- Synthesis blast radius: donor leases pin cache entries for the plan's lifetime, and the model-key path is only wired from
flare/src/hub.rs:3053; whether other acquisition callers should get synthesis is undecided in the diff. - #588 was surfaced only by a name match on
publish_verified_payloadand was not read — a remaining lead, not analysed.