Case file: PR #667 — Harden Orbit payload integrity, multi-deployment TP seams, GB10 page-cache release, Unix flock drop, and multi-host peer exports
Author: lukealonso (COLLABORATOR; charter-named priority contributor; Discord lukealonso) · open, "ready for review", opened 2026-12-01 · head 7908ac3 on main a3c80e19 (#657) · 25 files, +1588/−352, one squashed commit · no labels, no reviews, no comments · CI on head: passed.
Key findings
Things a reader could not learn from the description:
- The controller silently drops its own cache pre-check for intra-node transfers.
flare-cli/src/orbit/controller.rs:2031now guards the wholehave()/check_space/ "fetching N from X" block withif source.public_key != node.public_key. Before, the loop always ran, so same-node transfers got a free-space guard. The description mentions none of this. (scratchpad #2, #10) - Every existing single-host Payload core cache entry becomes a miss, not just colliding ones. Single-host
describe()builds the export as<sanitized stem>-<hex of envelope_digest[..8]>(controller.rs:2448, test at:3731), somodelbecomes e.g.model-1a2b3c4d5e6f7a8bfor all single-host payload cores. Combined with the new "refuse unverified staging hits" rule (agent.rs:1581-1586), previously cached copies must be re-transferred once, and the old<export>-<len>directories are left behind;docs/orbit.md:518-520states flat rank directories from older agents "are not migrated automatically". The description frames the rename only as collision prevention. agent::runre-opens and re-verifies the sealed core before every rank launch on the production path (agent.rs:2177-2194,verify_envelope_on_runset only byAgent::newatagent.rs:775;with_fakessets it false). That is an extraVerifiedCore::openmetadata parse per launch, unmentioned in the description.- The envelope guard is opt-out by omission.
Grant.core.envelope_digestis[serde(default)] [u8;32]andexpected_envelope()returnsNonewhen it is all zero (grant.rs:86-98), so a controller that omits the field (old binary, or hostile) disables the entire integrity binding and the agent silently falls back to today's behaviour.parse_expected_envelopetreats all zero the same way (agent.rs:1548-1556). Related: the launch-time guard only covers thelocal_corebranch (agent.rs:2140-2196); the description's "before spawningflare run" is narrower than it sounds. (#10, #16) --verify-weightson multi-deployment Payload cores looks unfixed on the controller-present branch.verify()→trust::load→RuntimeCore::open(..., None)runs beforedescribe()recoverstensor_parallel(controller.rs:1187vs:2423;verify_weightsset only on theCoreReference::Localbranch at:1165), so the PR's TP fix depends on the user also passing--tensor-parallel(helios/src/.../trust.rs:41-49(not opened)). (#10)- The page-cache benefit for #630 is unmeasured and #630 stays open. The description says so itself; #630's reporter pfn confirmed on 2026-12-01 that #646 did not fix this path, and #630's asks 2 and 3 (warn when reclaimable page cache limits the KV budget; print MemFree/MemAvailable/Cached on
cuCtxCreatefailure) are untouched by #667. (#3, #11) - No documentation is changed although user-visible semantics change: peer caches are removed,
--no-weightsrequirements move to the coordinator, and cache directory naming changes.docs/multi-host.md:306still says the peer host "Prepares and retains its rank's payload blobs locally" and:319still says "--no-weightsrequires matching cached payloads". (#9, #20) - Four of the five defects have no issue trail at all — no bug report, no repro, no linked discussion; only defect 3 (#630, filed by pfn, not the author) is externally reported. Defect 4's window (forked child holding an inherited fd before
execve) was created hours earlier by the author's own #650; defect 2's.ok()swallow by the author's own #646. (#19) - Textual conflict with open #668 (same author, same day): both rewrite the peer
export_options(...)block atignition/preparation/host_ranks.py:685-689; #668's own review flags the collision. Conceptual overlap with open #394 (voipmonitor), which also reworks theNativeExportStageworkspace that #667 now puts a cache root inside. (#7, #20)
The change
What it does, in plain terms (25 files, +1588/−352, 6 areas, one squashed commit 7908ac3):
- Orbit stops resolving cached weights by name and length.
Grant.coregainsenvelope_digest: [u8;32]andtensor_parallel: Option<u32>, both#[serde(default)](flare-cli/src/orbit/grant.rs:86-92,expected_envelope()at:98; legacy-deserialization test:268-274). Single-hostdescribe()folds 16 hex chars of the envelope digest into the export name (controller.rs:2448);HAVEframes carry the digest (controller.rshave());agent.rschecksSourceRef::expected_envelope()inhave(),transfer(),fetch()andrun(), refuses unverified staging hits, and rejects "staged core signed envelope differs from the grant" / "core … signed envelope differs from the grant" (agent.rs:525,:2189).publish_orbit_entryno longer swallowsVerifiedCore::openvia.ok(), so real envelopes and.flare-verified.json(not opened) markers are written instead of[0u8;32](agent.rs:881-993). - Multi-deployment Payload cores work. New
open_verified_coredispatchesCoreFormat::Payload+Some(tp)toVerifiedCore::open_tensor_parallel(agent.rs:504,helios/src/runtime_core/protection.rs:766) instead ofVerifiedCore::open(..., None), which errors for more than one deployment.ServingOptions::rank_optionsforwards--tensor-parallel(flare-cli/src/cli.rs:1167-1177);agent::runstrips conflicting copies and emits exactly one scalar (agent.rs:2229);Controller::rundeduplicates saved vs CLI values (controller.rs:697,:1960-1982);launch.rs:144-149injects envelope+TP into--hostsgrants. - Linux page cache is dropped after big reads. New
eos::release_page_cache_range(eos/src/unix.rs:74-80,posix_fadvise(..., POSIX_FADV_DONTNEED); Windows stub), re-exported viahelios/src/lib.rs. Call sites:sha256_file(flare-cli/src/distribution.rs:627), peer shard ranges inserve_source(:1218), all deduplicated peerArc<File>s atSourceteardown (:1136, with a comment that rank-zero's loader never opens peer shards),store_parallel/store_partialaftersync_all(),agent::fetchafter each served range,protection.rsafter each hashed payload, andmodel.rs:808immediately afterload_payloadwhen any rank is integrated (pre-existing releases at:618before CUDA init and:920before allocate). - Unix locks are explicitly released.
helios::core::cache::Lockandcore::conversion::CoreLockgain#[cfg(unix)] Drop→flock(fd, LOCK_UN)(helios/src/core/cache.rs:4246-4262,conversion.rs:2696-2703). New cross-platformflare::file_lock::FileLock(flare/src/file_lock.rs, UnixLOCK_UNat:25) replaces hand-rolled locks inhub.rs(−99),download_cache.rs(−88) andtrust.rs(−17). - Multi-host peers stop caching blobs they never commit.
ExportOptions.remote_cache(default false) on the Python↔Rust export options; underno_weights && remote_cachecapture_group_into_cachehashes in one pass and records ids inWeightPayloadSources.cachedwithout a local cache lookup (heliopause/src/export/capture.rs);receive_rankvalidates presence and length in the coordinator cache with a new message "--no-weights requires the peer payload object in the coordinator cache" (heliopause/src/export/transfer.rs);ignition/preparation/host_ranks.py:685-689captures intopeer-cacheinside theNativeExportStagetempdir withremote_cache=Trueand releasescorebeforenative_stage.close().
Description vs code: everything the description claims is present in the diff; the deltas are omissions (findings 1–4, 7 above), not false statements. The stated compatibility claim is precise for cores and grants ("no model core wire format or Protobuf schema changes"; legacy grants deserialize) but says nothing about cached single-host payload entries, which do change identity.
The why
- Defect 3 (page cache / GB10): issue #630 (open; labels
area:memory,bug,performance,priority:P2,triage:investigate; opened 2026-11-30 by pfn, not the author). Same core +reserve=4Gon 2× DGX Spark GB10 yields a 13.75–14.44 GiB KV budget (2.08–2.19M tokens) with a full page cache vs 22.20 GiB / 3,427,584 tokens after clearing, withMemAvailable~116 GiB in both states. Root cause named in the issue: the plan runs right after distributing ~95 GiB of rank-1 weights over CX7, which fills the controller's page cache — exactly thesha256_file/serve_sourcepaths this PR now releases. pfn's 2026-12-01 comment: "Still open onmaine85019b9— #646's GB10 KV-sizing change did not cover this path." #667 addresses only ask 1 and leaves asks 2 (warn when reclaimable page cache limits the KV budget) and 3 (print MemFree/MemAvailable/Cached oncuCtxCreatefailure) open. Do not treat #630 as closed. - Defects 1, 2, 4, 5 have no issue trail. Searches for the stale-cache collision, the multi-deployment TP failures, peer blob orphans and the flock-across-fork problem return only #667 (and tangentially #361/#629, closed by #646). The PR body is the only report; there is no user-visible repro log.
- Defect 4's window is hours old and self-inflicted: #650 (merged 2026-12-01) moved rank spawning onto a persistent agent thread, which is what puts a forked child in existence while locks are held. Defect 2's
.ok()swallow and the externalized-signing seams come from the author's #646 (2026-11-30) and #618 (2026-11-29). - Nearest existing report of the general cost theme: #93 (open) "Warm multi-host start re-hashes each peer's cached rank on one thread (7 min for a 280 GB rank)" — not addressed by #667; dropping page cache after reads, if anything, makes a warm re-read colder.
Related work
- #646 (merged 2026-11-30,
bf7562ae, same author, 29 files +3008/−1241) — the direct parent. #667 continues #646's Orbit rank-cache unification (publish_orbit_entry,resolve_orbit_entry,.flare-verified.json(not opened)), its page-cache story (extendingPayloadSource::release_page_cachebeyond payload paths), and its--hostsTP inference. #646's review already flagged "verify that existing data, artifacts, and exported cores still load" — directly relevant to the cache rename. - #650 (merged 2026-12-01,
571a4471, same author, sameorbit/agent.rs) — creates the fork window #667 closes. - #618 (merged 2026-11-29) introduced
capture_group_into_cacheand the single-pass export contract #667 extends; #647 (merged 2026-11-30) and #652 (merged 2026-12-01) also touchheliopause/src/export/. - #668 (open, same author, same day) edits the same
host_ranks.pyexport_options(...)lines as #667; its own review notes "Same-author PR #667 also edits the peerexport_options(...)block athost_ranks.py:718-719". Stacked/textual conflict risk. - #394 (open, voipmonitor) "Assemble temporary core payloads in the rank export workspace" reworks
NativeExportStage/binding.rsandhost_ranks.py; #667 places a cacheRootinside the stage tempdir — same premise, no coordination. - #588 (closed) "Accelerate multi-host rank export transfer and check disk space up front" — prior multi-host export work whose reviewer objected to pre-rendezvous disk checks breaking cached re-exports; context for the peer-cache change.
- #629 (closed issue, orbit ignoring
--core-cache) and #361 — closed by #646; no longer live but the same rank-cache area. #667 does not undo any of them. - eos-side additive overlap only: #625 (merged), #576, #589, #92, #80 also touch
eos/src/unix.rs;release_page_cache_rangeis additive, low conflict risk. - Nothing found that #667 supersedes or reverses.
Recent activity
main is moving fast under these files, mostly by the same author within 72h: a3c80e19 #657, 5d53040e #628 (yatesdr, helios Copy-Engine gating), a747a5a5 #653, 571a4471 #650, bf7562ae #646, c146d7be #620, e80b1f2f #618, 968ca411 #617, 1da22724 #652, f2ca2c41 #647, plus e85019b9 (#645 — the revision #630's reporter tested and found still broken; #667 is based three commits later). Direction of travel: #646 moved Orbit rank caches onto helios::core::cache::Root with source refs and .flare-verified.json (not opened); #650 moved rank spawning to a persistent thread; #620 removed copy/history drafts; #647/#652 changed export capture and cubin pruning. #667 continues every thread rather than reversing any. No semantic conflict found; the risks are textual (open #668, #394) and one behavioural (see Reach).
People
- lukealonso — COLLABORATOR; one of three charter-named priority contributors (
@voipmonitor,@original-el8,@lukealonso). 36 merged PRs in 180 days, 0 closed, 3 open. Touch profile: helios/src (26), docs (22), ignition/preparation (10), flare-cli/src (9), heliopause/src (7) — i.e. he is the de-facto owner of every area #667 edits (180-day commit counts onmain: helios/src 235, ignition/preparation 160, flare 67, heliopause 63, flare-cli 20). - Area regulars not engaged yet: yatesdr (eos/orbit), Martin Vit (helios, ignition), voipmonitor (preparation, open #394), original-el8 (orbit/multi-host), FujitsuPolycom and PCCessna (heliopause export), eugr (flare-cli).
- pfn is the only external voice relevant to the change (issue #630 reporter); #667 does not reply to #630's remaining asks or credit the report.
Community
None. pr_comments returns "No comments": no review, no inline comments, no labels, no flare-autobot case file or review yet (unlike #646 and #668, which got one within minutes). The PR is hours old. Precedent for this author's bundles: #646 received "Changes Requested" (1 blocker + 6 should-fix) and merged the same day; #668 received "Changes Requested" (0 blockers). No reactions anywhere.
Project fit
- Charter goals explicitly include "Support single-host and cross-node serving, with Orbit handling placement and supervising serving ranks" and cache/prefix sharing — Orbit and multi-host work is in scope, and #667 adds no model alias, per-model branch, new user-facing flag or config key, so it does not run into the non-goals (broad hardware coverage, cluster orchestration).
- Charter review standard "Supported matrix & compatibility: … verify that existing data, artifacts, and exported cores still load" is exactly where #667 is thinnest: cores and grants are compatible, cached single-host payload directories are not (
docs/orbit.md:518-520). - Charter "Bring real evidence. … Bug fixes need to address the root cause; don't just swallow, skip, or retry an unexplained error (#397)" — the PR is framed as root-cause fixes, but the #630 memory benefit is explicitly unmeasured ("not yet re-measured on GB10 hardware").
- Charter "PR descriptions: four parts (why / what changed / claimed result / evidence)" — satisfied, and unusually detailed.
- Charter "Be explicit and pin everything. No magic defaults" — sits awkwardly with
#[serde(default)]fields whose all-zero value silently means "no integrity binding" (grant.rs:98,agent.rs:1548-1556) and withremote_cachedefaulting false. - Charter "smallest footprint" — #667 bundles five unrelated defects across 25 files in one commit; #646's review already objected to "bundling 4 unrelated changesets in one commit", so this criticism is likely to recur.
- Documentation is stale rather than updated:
docs/multi-host.md:306("Premints and retains its rank's payload blobs locally") and:319("--no-weightsrequires matching cached payloads");docs/orbit.md:471-535(core caching / prestaging /<export>-rank<R>/ no migration of legacy dirs); alsodocs/cli-design.md:416 (not opened)/1166/1541,docs/model-preparation.md:24(not opened),docs/preparation-development.md:157,docs/runtime-core-design.md:338(not opened),docs/core-format-design.md:816(not opened). Zero doc files in the diff.
Claims and evidence
Backed:
- Test suites (eos 12; helios 507 + 12 ignored; flare 246 unit + 8 integration + 4 ignored; flare-cli 219 + 26 + 3 ignored; heliopause 229 + 6 ignored; pytest 140 and 94/8 skipped): self-reported, but every named test exists in the diff and CI on
7908ac3passed. - The new tests are genuinely adversarial.
envelope_digest_blocks_stale_single_host_cache_hits_and_wrong_weightsbuilds two same-architecture cores with identical filenames and identical byte lengths (assert_eq!(files_a, files_b)), seeds a collidingmodel-<len>directory, and asserts HAVE/TRANSFER/RUN each reject the wrong envelope (agent.rstests, e.g.:5260,:5278).multi_deployment_payload_core_verifies_publishes_and_launches_rank_zero_with_tpassertsVerifiedCore::open(..., None)really fails and that--tensor-parallelappears exactly once.single_host_describe_derives_distinct_exports_from_envelope_digest(controller.rs:3731) andrank_options_forward_tensor_parallelcover the naming and CLI forwarding. - flock drop:
lock_drop_releases_flock_even_with_duplicate_descriptor(helios/src/core/cache.rstests) andfile_lock::tests::drop_releases_flock_even_when_duplicate_descriptor_stays_open(flare/src/file_lock.rs:148-166) simulate the fork-inherited descriptor withtry_clone()and assert re-acquisition succeeds. - Multi-host no-weights:
capture_group_into_cache_reads_source_once_for_miss_hit_and_no_weights(with cold-peerremote_cache=true) andremote_no_weights_peer_reuses_coordinator_cache_and_rejects_missing_or_corrupt.
Not backed / unrun:
- The GB10 KV improvement — explicitly not re-measured; #630's reporter has not confirmed; asks 2 and 3 remain.
- "Zero orphan weight blobs on peer hosts" and the "40–100+ GiB leaked" figure — argued from the tempdir lifetime (
NativeExportStage.close()), not measured. - No real
fork()/execvetest — both flock tests useFile::try_clone. - No Python test added for
peer_cache/remote_cache=Trueinhost_ranks.py; the pytest filter exercises existing tests only. - No Windows evidence for the new
LockFileExpath inflare/src/file_lock.rs, which replaces three Windows helpers;eos::release_page_cache_rangeis a no-op there. - Unrun per the description: live multi-host GB10 KV measurement, CUDA/RoCE export tests (
FLARE_RUN_CUDA_TESTS=1/FLARE_RUN_TP_CUDA_TESTS=1),FLARE_TEST_TEMPLATE_DIRchat-template tests.
Reach
- Users/operators:
flare orbit run/orbit push(single- and multi-host) andignition export+ignition joinmulti-host flows. - Config/defaults: no new flags or config keys.
Grant.core.{envelope_digest,tensor_parallel}andExportOptions.remote_cacheare internal wire fields with serde defaults, so old grants and old Python callers keep working.ServingOptions::rank_optionsnow emits--tensor-parallelintoGrant.serving(comma-joined when several are configured,cli.rs:1167-1177), andController::runrewrites savedspec.servingto keep the last occurrence (controller.rs:1960-1982) — any consumer of saved persistent groups sees the flag appear. - Compatibility: single-host payload cache directories change identity and are not migrated (
docs/orbit.md:518-520); mixed old/new binaries degrade to pre-PR behaviour rather than failing (all-zero digest = no binding) — worth noting for rolling upgrades. Cores and Protobuf schemas unchanged, no Cargo dependency changes. - Peers lose their local rank cache entirely (
host_ranks.py:685-689+finally: core = None), so every subsequent export on a peer re-reads and re-hashes its rank weights from the checkpoint; that cost is not discussed, and--no-weightsstill fails when the coordinator cache is cold (the failure merely moved hosts, perreceive_rank). - Page-cache release is broadly applied on Linux, not only for GB10: hashing, every served shard range, every stored blob, every verified payload now evict evidence the kernel might have reused — a disk/network re-read cost on a later pass (relevant to warm restarts, #93) that the description does not discuss.
- Documentation: unchanged (see Project fit).
Process
Open, ready for review, one squashed commit, base main at a3c80e19, opened and last updated 2026-12-01 (<1 day old). CI passed on head. No labels, no reviews, no comments, no Autobot review yet. Three other same-author bundles are open the same day (#668, #659, #658), splitting reviewer attention over helios/orbit/ignition. Nothing blocked, nothing superseded.
Open questions / not found
- Does
VerifiedCore::open_tensor_parallelbehave identically toVerifiedCore::openfor a single-deployment (TP1) core?describe()now setstensor_parallel = Some(n)for every Payload core (controller.rs:2423), so all payload launches switch to the TP entry point. Not answered by any test in the diff. - Does
orbit run --verify-weightsof a multi-deployment Payload core still fail on the controller-present path, wheretrust::loadruns beforedescribe()knows the TP size? (controller.rs:1165-1187vs:2423.) - Whether the intra-node
check_spaceguard removal (controller.rs:2031) is intentional — no comment, no test, no description mention. - How much re-transfer the single-host cache rename costs operators in practice (population size, GB) — no measurement.
- Whether pfn / #630 will confirm the KV collapse on GB10 hardware — explicitly outstanding, and #630 remains open.
- Whether #667 and #668 will conflict textually on
host_ranks.py:685-689/:718-719— flagged by #668's own review; whichever lands second needs a rebase. - No issue, comment or review could be found anywhere for defects 1, 2, 4, 5 — the PR body appears to be their only provenance.