#1 [high] Change: scope and file map of PR #667
PR #667 (open, ready for review, opened 2026-12-01, head 7908ac3, base main, 25 files +1588/-352, no labels, no reviews, CI passed).
Five defect bundles:
- Orbit payload integrity: flare-cli/src/orbit/grant.rs (+26), controller.rs (+299/-37), agent.rs (+679/-69); cli.rs (+55), launch.rs (+6).
- Page-cache release: eos/src/unix.rs (+13), windows.rs (+1), helios/src/lib.rs (+1/-1), helios/src/runtime_core/model.rs (+3), protection.rs (+6/-2), flare-cli/src/distribution.rs (+27/-10), core_cache.rs (+3), orbit/agent.rs.
- Unix flock explicit LOCK_UN: helios/src/core/cache.rs (+37/-1), conversion.rs (+8), flare/src/file_lock.rs (new +168), lib.rs (+1), hub.rs (+8/-99), download_cache.rs (+19/-88), trust.rs (+2/-17).
- Multi-host peer export caching: heliopause/src/export/{mod (+5), capture (+115/-22), transfer (+94/-3)}.rs; ignition/preparation/{core_snapshot (+3/-1), host_ranks (+8/-2), runtime_core (+1)}.py.
Key new API surface added:
grant.rs:Core.envelope_digest: [u8;32](serde default),Core.tensor_parallel: Option<u32>(serde default),Core::expected_envelope() -> Option<[u8;32]>(None when all-zero). File flare-cli/src/orbit/grant.rs:~83-100.controller.rs:ResolvedCore.envelope_digest,ResolvedCore.tensor_parallel; single-hostdescribe()export =<sanitized stem>-<hex of first 8 bytes of envelope_digest>;deduplicate_tensor_parallel()helper;have()now takesexpected_envelopeand sendsenvelope_digestin the HAVE request;transfer()skips thehave()pre-check entirely when source.public_key == node.public_key.describe()now derives tensor_parallel fromidentity.tensor_parallelwhen > 0.
Note: description says "Single-host describe() appends the first 8 bytes (16 hex chars) of authorized.envelope_digest() to export" — confirmed in diff.
Note: export format is model-<16 hex> — this changes cache directory naming for ALL single-host payload cores (not only colliding ones), i.e. every existing single-host payload core cache entry becomes a cache miss after upgrade.
#2 [high] Change: Orbit envelope binding and TP forwarding in detail (#667)
- grant.rs:
Core.envelope_digest: [u8;32]+Core.tensor_parallel: Option<u32>, both#[serde(default)];expected_envelope()returns None when digest is all-zero (legacy). Testgrant ... legacy grants lacking envelope_digest and tensor_parallel still deserialize cleanly(grant.rs tests). - controller.rs:
ResolvedCoregainsenvelope_digest,tensor_parallel.describe()single-host export =<stem>-<hex(envelope_digest[..8])>(16 hex chars). Controllerhave()sendsenvelope_digestin HAVE frame.Controller::rungaineddeduplicate_tensor_parallel()which rewrites saved--tensor-parallelinservingto keep only the last occurrence, and if the CLI (hub.tensor_parallel) is empty fills it from the saved value soresolve_coresees it. - controller.rs
transfer(): the entirehave()-based byte/space pre-check is now skipped whensource.public_key == node.public_key(same node). Undeclared in description (description only mentions envelope plumbing). Consequence: for intra-node transfers the controller no longer computesneeded/check_spaceor prints "fetching N from X". - agent.rs:
Verifierclosure signature changed to(&Path, Option<usize> rank, Option<u32> tp, Option<[u8;32]> expected_envelope, &Publisher) -> Result<Option<VerifiedCoreMeta>, Failure>;VerifiedCoreMeta { model_id, hardware, tensor_parallel, envelope }.verify_corenow returns metadata instead of(), and rejects when staged envelope != expected. - agent.rs
open_verified_core()dispatches onNativeResources::core_format:CoreFormat::Payload+ Some(tp) ->VerifiedCore::open_tensor_parallel(primary, publishers, tp, rank_id); elseVerifiedCore::open(...). Legacy alwaysVerifiedCore::open. - agent.rs
resolve_orbit_entry-> newresolve_orbit_entry_matching(directory, expected_envelope)usingRoot::resolve_source_ref_record+SourceRef::expected_envelope();resolve_orbit_entrykept but now#[cfg(test)]only. - agent.rs
have(): binds envelope; whenexpected_envelope.is_some(), an unverified staging hit returns 0 (miss) — refuses stale staging reuse. - agent.rs
fetch()/run(): resolve entries with envelope match;run()in production (verify_envelope_on_run = true, only set byAgent::new) re-opens the on-disk core and comparesenvelope_digest()before spawningflare run.with_fakessets it false. - agent.rs
run()argument building: strips any--tensor-parallel/--tensor-parallel=from grant.serving whengrant.core.tensor_parallel.is_some(), then appends exactly one--tensor-parallel <tp>. Also keeps existing roce-ring/chain stripping. - agent.rs
publish_orbit_entryno longer callsVerifiedCore::open(...).ok(); it takesOption<VerifiedCoreMeta>and when present uses the authenticated model_id/hardware/tp/envelope (previously the.ok()swallow produced[0u8;32]envelopes and no.flare-verified.json). - New tests:
orbit::agent::tests::envelope_digest_blocks_stale_single_host_cache_hits_and_wrong_weights,multi_deployment_payload_core_verifies_publishes_and_launches_rank_zero_with_tp,orbit::controller::tests::single_host_describe_derives_distinct_exports_from_envelope_digest,cli::cache_cli_tests::rank_options_forward_tensor_parallel. Test helperreal_agent_harnessusesAgent::new(so envelope-on-run is active).
#3 [high] Why: issue #630 and what #667 does/does not cover of it
#630 "GB10 unified memory: KV budget and cuCtxCreate respond to page-cache-polluted MemFree, not MemAvailable" — open, labels area:memory, bug, performance, priority:P2, triage:investigate; opened 2026-11-30 by pfn (not the author).
- Same core + reserve=4G on 2x DGX Spark GB10 gives 13.75–14.44 GiB budget (2.08–2.19M KV tokens) when page cache is full vs 22.20 GiB / 3,427,584 tokens after clearing page cache. MemAvailable ~116 GiB in all states; only MemFree differs.
- Root cause named in the issue: "distribution re-hash filled it" / "plans immediately after distributing ~95 GiB of rank-1 weights over CX7, which reads them into page cache on the controller".
- Asks: (1) size KV plan from MemFree or reap reclaimable page cache before planning; (2) warn when reclaimable page cache limits the KV budget; (3) print MemFree/MemAvailable/Cached on cuCtxCreate failure.
- Comment 2026-12-01 by pfn: "Still open on
maine85019b9— #646's GB10 KV-sizing change did not cover this path." Explicitly the distribution-read path, which is exactly what #667'ssha256_file/serve_sourcereleases target. - #667 addresses ask (1) partially (release page cache on read paths) but NOT asks (2) and (3) — those remain open; PR description itself says "not yet re-measured on GB10 hardware". Do not claim #630 is closed by this.
- #646 (merged 2026-11-30) had claimed to "address/closes" #630 but pfn confirms it did not cover this path.
Sources: issue #630 body + its 2026-12-01 comment.
#4 [high] Change: page-cache release sites (#667, #630)
Page-cache half of #667 (#630):
eos/src/unix.rs: newpub fn release_page_cache_range(file, offset, len)→posix_fadvise(fd, offset, len, POSIX_FADV_DONTNEED); 0-len no-op; falls back to whole-file release if the values don't fitoff_t.eos/src/windows.rs: no-op stub. Re-exported viahelios/src/lib.rs(pub use flare_eos::{raise_open_file_limit, release_page_cache, release_page_cache_range}).flare-cli/src/distribution.rs: (a)sha256_filenow callsrelease_page_cache(&file)after the hash loop (this is the "distribution re-hash filled it" path blamed in #630); (b)Source::drop/teardown releases page cache for every deduplicated peerArc<File>(new) — comment in code: "Peer shard files are not opened by rank zero's model loader, so release their Linux page cache here before CUDA initialization and KV cache sizing"; (c)serve_sourcereleases the exact transferred ranges withrelease_page_cache_rangeafterio::copy.helios/src/runtime_core/model.rs:**804-809**: aftermodel.parallel(...load_payload...),if model.ranks.iter().any(|rank| rank.integrated) { Files::release_page_cache(&files); }— releases immediately after payload load on integrated GPUs (was previously only before GPU init and beforeallocate_caches`).helios/src/runtime_core/protection.rs:PayloadSource::verifyandPayloadVerifiedCore::verifynow release the verified range after hashing.flare-cli/src/core_cache.rs:store_parallelandstore_partialrelease the written file's page cache aftersync_all()/chmod (also on digest mismatch).flare-cli/src/orbit/agent.rs::fetch: releases each served range afterwrite_frame_fromreturns.- Reach: Linux-only effect (POSIX_FADV_DONTNEED); Windows is a no-op. Affects all distribution/export/verify paths, not only GB10.
#5 [high] Change: Unix flock LOCK_UN on drop (#667)
helios/src/core/cache.rs:4246-4262:struct Lock(File)gains#[cfg(unix)] impl Dropcallinglibc::flock(fd, LOCK_UN), with a comment that a concurrentfork()can inherit the open file description beforeexecve(O_CLOEXEC).helios/src/core/conversion.rs:2696-2703: same forCoreLock.- New
flare/src/file_lock.rs(+168):pub(crate) struct FileLock(File)with UnixDrop→flock(LOCK_UN); Windows usesLockFileExvialock_file(). API:exclusive,shared,try_exclusive,try_exclusive_file,try_shared(cfg(test)),open_lock_file(path, create)(mode 0o600 on Unix,windows::private_fileon Windows). Registered aspub(crate) mod file_lockinflare/src/lib.rs. - Replaces hand-rolled locks in
hub.rs(open_lock/content_lock/shared_lock/try_lock_exclusive/lock_windowsdeleted, −99 lines;Transport._leaseandlegacy_blob_dirsnow holdFileLock),download_cache.rs(−88: its ownopen_lock/try_exclusivedeleted,LockState::Free(Option<FileLock>)),trust.rs::modify(−17: rawOpenOptions+ flock, andwindows::lock, replaced byFileLock::exclusive).trust.rsstill importsOpenOptionsat line 15 for the atomic write at :265. - Tests:
helios::...::lock_drop_releases_flock_even_with_duplicate_descriptor(helios/src/core/cache.rs ~9618-9640) andflare::file_lock::tests::drop_releases_flock_even_when_duplicate_descriptor_stays_open(flare/src/file_lock.rs ~148-166); bothtry_clone()the fd to simulate a fork-inherited descriptor and assert re-acquisition succeeds after drop. - Nit worth noting:
helios/src/core/cache.rsends with "\ No newline at end of file" in the diff (pre-existing? introduced by this patch's appended test). - Note: the "fork by another thread before execve" scenario was raised as a real bug; no issue reference is given for it in the PR body, so the defect report appears to be author-internal (no linked issue).
#6 [high] Change: multi-host peer export caching (#667)
heliopause/src/export/mod.rs:ExportOptions.remote_cache: bool(#[serde(default)], default false) — new field on the Python↔Rust export options wire (both sides serde/PyO3; default keeps old callers working).heliopause/src/export/capture.rs: newenum CapturedGroupPayload { Local(PayloadObject), Remote(PayloadId) };capture_group_into_cachegains aremote_cachearg. Underno_weights && remote_cacheit hashes the source in one pass, returnsRemote(payload_id)and does NOT require or look up a local blob (previouslyroot.verified_payload(...)had to exist or export failed with "no-weights export is missing cached payload ..."). Node-local (remote_cache=false) behaviour is unchanged.resolve_weight_payloadcollectsremote_cacheddescriptors intoWeightPayloadSources.cachedwhenreusedis None;capture_rankpassesrequest.options.no_weights && !request.options.remote_cachewhere it previously passedno_weights(affects astore/cache-scan flag).heliopause/src/export/transfer.rs::receive_rank: when a declared cached payload is missing on the coordinator, the error now says--no-weights requires the peer payload object in the coordinator cache(previously "reused payload object disappeared"), and length is still checked ("reused payload object has the wrong length"). New testremote_no_weights_peer_reuses_coordinator_cache_and_rejects_missing_or_corrupt.ignition/preparation/core_snapshot.py:ExportOptions.remote_cache: bool = False+export_options(..., remote_cache=False)kwarg.ignition/preparation/runtime_core.py:330-332:_cache_optionsforwardsremote_cache(False when cache is None).ignition/preparation/host_ranks.py:676-699(serve_peer): peers now buildpeer_cache = Path(native_stage.path)/"peer-cache"inside theNativeExportStagetempdir instead of using the localcore_cache, always passremote_cache=True, and setcore = Nonein afinallybeforenative_stage.close()so transient blobs are reclaimed immediately. Because the peer cache lives inside the stage tempdir, it inherits the stage's filesystem (which is exactly what #394 wants, but without #394's other machinery).- Not covered by tests: the Python side has no new tests for
peer_cache/remote_cache=Trueinhost_ranks.py(the PR's pytest filters are "host_ranks or core_snapshot or export", 94 passed / 8 skipped, but the diff adds no test files there); the only new coverage is the Rustcapture.rs/transfer.rstests. - Docs: no doc file is touched by #667 even though docs/multi-host.md:319 ("
--no-weightsrequires matching cached payloads") and docs/model-preparation.md:24 now describe only the coordinator-side requirement. docs/orbit.md also not updated for the newmodel-<digest>export naming.
#7 [high] Related work: stacked and overlapping PRs
- #646 "Unify Orbit rank cache, fix GB10 page-cache KV sizing, consolidate NVML, and harden flare-agent" — MERGED 2026-11-30 (bf7562ae), same author, 29 files +3008/−1241. #667 is the direct follow-up: it continues #646's Orbit rank cache unification (
publish_orbit_entry,resolve_orbit_entry,.flare-verified.json), #646's page-cache story (PayloadSource::release_page_cachewas made real there for the payload paths; #667 extends to distribution/verify/store paths), and #646's--hoststensor_parallel inference. #646's own review (flare-autobot) flagged "Verifies that existing data, artifacts, and exported cores still load" and hardware-unrun paths — relevant to #667's cache-renaming. - #647 "Fix externalized core signing, stream-0 weight race, export I/O, and multi-host tuning" — merged 2026-11-30 (f2ca2c41), same author, touches heliopause/src/export/capture.rs too. Introduced/adjacent to the
capture_group_into_cacheno_weightsbehaviour and the multi-host tuning that #668 later fixes. - #650 "orbit: spawn rank processes from a persistent agent thread so PR_SET_PDEATHSIG survives RPC disconnect" — merged 2026-12-01 (571a4471), same author, same file flare-cli/src/orbit/agent.rs. #667's
agent::runchanges build on it. Note this PR itself creates the forked-child-then-execve window the flock fix addresses (rank children spawned from the agent process). - #618 "core,hub,heliopause,ignition: decouple signed bodies, single-pass export, slice synthesis, and HF LFS SHA-256" — merged 2026-11-29, same author; introduced
capture_group_into_cacheand the single-pass export contract #667 extends. - #652 "heliopause: prune unreferenced kernels from exported CUDA ELF64 cubins" — merged 2026-12-01, same author, same file.
- #668 (OPEN, same author, opened same day) — also edits
ignition/preparation/host_ranks.py, specifically theexport_options(...)block at ~718-719 that #667 rewrites. Textual conflict/stacking risk: #667 replacescontext = export_options(core_cache, ...)withexport_options(peer_cache, ..., remote_cache=True); #668'sserve_peerchanges addkernel_cacheforwarding. Both touch the same lines. #668's own review flags this: "Same-author PR #667 also edits the peerexport_options(...)block athost_ranks.py:718-719". - #394 (OPEN, voipmonitor) "Assemble temporary core payloads in the rank export workspace" — also reworks
NativeExportStage/binding.rsandhost_ranks.py:1 line. #667'speer_cache = Path(native_stage.path)/"peer-cache"puts a cache root inside the stage workspace, closely overlapping #394's premise ("Assemble temporary core payloads in the rank export workspace"). Potential coordination/conflict. - #588 (closed) "Accelerate multi-host rank export transfer and check disk space up front" — related multi-host export work; reviewer raised pre-rendezvous disk-space checks breaking cached re-exports.
- #93 (open issue) "Warm multi-host start re-hashes each peer's cached rank on one thread" — adjacent multi-host verification cost, not addressed here.
- #631/#651 (issues) multi-host autotune divergence — context for #668, not #667.
- #625 (merged), #576 (open), #589, #92, #80 — other eos/src/unix.rs actors; #667's
release_page_cache_rangeis additive to eos, low conflict risk with those.
#9 [high] Project fit: charter mapping and stale docs
Charter (read_charter) points that bear on #667:
- Goals include "Support single-host and cross-node serving, with Orbit handling placement and supervising serving ranks" and the review standard "Supported matrix & compatibility: Check interactions across every supported model, cache scheme, parallel layout, multi-host setup, and hardware target... verify that existing data, artifacts, and exported cores still load." → #667's Orbit cache-directory rename and envelope binding fall squarely in this standard; the compatibility claim (legacy grants still deserialize) is only about grants, not about on-disk cache directories.
- "Bring real evidence. Performance PRs need benchmarks showing an actual speedup over
mainon a served workload (#210). Bug fixes need to address the root cause; don't just swallow, skip, or retry an unexplained error (#397)." → #667 is bug fixes, and the page-cache claim (#630, a measured memory issue) is asserted as "expected to eliminate ... (not yet re-measured on GB10 hardware)". No measurement is provided for the memory benefit. - "PR descriptions: Expect four parts: why the change is needed, what changed, the claimed result, and the evidence backing it." → satisfied.
- Non-goals requiring sign-off: "Broad production coverage across arbitrary models, GPUs, or deployment setups, as well as rack-scale features like disaggregation" and "general cluster orchestration". Orbit multi-host is an explicit goal, so #667's Orbit work is in scope; nothing here adds a model alias, a per-model branch, or a new user-facing switch.
- No doc change accompanies a behaviour change (export/cache directory naming,
--no-weightssemantics on peers). Docs in repo that are now stale: docs/orbit.md:471-489 and :499-535 (core caching / prestaging /<export>-rank<R>), docs/multi-host.md:305-320 ("Peer host: Prepares and retains its rank's payload blobs locally", "--no-weightsrequires matching cached payloads"), docs/cli-design.md:416/1166/1541, docs/model-preparation.md:24, docs/preparation-development.md:157, docs/runtime-core-design.md:338, docs/core-format-design.md:816. - The charter's "Be explicit and pin everything. No magic defaults" tension:
#[serde(default)]onenvelope_digest/tensor_parallelandremote_cachedefault false are deliberate back-compat defaults; an all-zeroenvelope_digestsilently means "no envelope binding", which is exactly the insecure legacy path the PR otherwise closes.
#10 [high] Change: undeclared behaviour and open questions
Undeclared / under-declared behaviour changes a reader could not learn from the description:
- Controller skips its own cache pre-check when the source is the target node.
flare-cli/src/orbit/controller.rs:2031if source.public_key != node.public_key { ...have/check_space/print... }. Previously the loop always ran; now intra-node transfers get nocheck_spacefree-space guard and no "fetching N from X" line. Not mentioned anywhere in the description. - Every existing single-host Payload core cache entry becomes a miss. The export name changes from
modeltomodel-<16 hex>for all single-host payload cores (controller.rs:2434-2457), soGrant.cache_directory()/complete_directory()(grant.rs:150-157) produce new directory names on the agent. Combined with "unverified staging hits are refused when an envelope is bound" (agent.rs:1581-1586) this forces a re-transfer of previously cached single-host payload cores once, and leaves the old<export>-<len>entries behind (docs/orbit.md:518-520 notes legacy flat dirs "are not migrated automatically"). The description frames the change as only preventing collisions. agent::runnow re-opens and re-verifies the sealed core before every launch when an envelope is bound (verify_envelope_on_run, only true viaAgent::new; agent.rs:2177-2194). That is an extraVerifiedCore::open(header/index metadata parse) per rank launch on the production path;with_fakesagents don't do it, so tests other than the new ones don't exercise it.--verify-weightsregression risk for controller-present cores.controller.rs:1165setsrun_args.serving.verify_weights = verify_weightsonly on theCoreReference::Localbranch, andverify()→trust::load(...)→RuntimeCore::open(..., None)for Payload cores beforedescribe()can learntensor_parallel(controller.rs:2382-2396 vs 2423). So anorbit run --verify-weightsof a multi-deployment Payload core can still fail/exclude deployments at the controller even though the numeric TP is only recovered afterwards; the PR rests on the user having passed--tensor-parallelsoload_withsupplies it (trust.rs:41-49). Also this flag is written intoServingOptionsafterrank_options()may already have been derived elsewhere.tensor_parallelisSome(n)for every Payload core, including plain TP1.describe()sets it wheneveridentity.tensor_parallel > 0(controller.rs:2423); that makesstrip_tptrue inagent::run(agent.rs:2229) andgrant.core.tensor_parallel.is_some()routeopen_verified_coretoVerifiedCore::open_tensor_parallel(..., tp, rank_id)for cores that previously used plainVerifiedCore::open(agent.rs:496-506). Behaviourally equivalent only ifopen_tensor_parallelmatchesopenfor a single-deployment core.tensor_parallelis sent as a joined list.ServingOptions::rank_optionsemits--tensor-parallel 1,2when several are configured (cli.rs:1167-1177), whileagent::runemits a single scalar from the grant;agent::runstrips any--tensor-parallelfromservingonly whengrant.core.tensor_parallel.is_some(), which is always for real cores.- New failure mode replaces an old silent one. Where a colliding cache previously launched stale weights, a launch can now fail with "signed envelope differs from the grant" / "staged core signed envelope differs from the grant" — correct, but a hard stop for anyone whose staged bytes don't match (e.g. a core re-exported in place).
- Page-cache release drops the kernel's readahead benefit for everything read through these paths, not only GB10:
sha256_file, everyserve_sourcerange, every verified payload, every stored blob. Declared as intended, but the cost (re-reads from disk/network on any later pass, e.g. hash-then-transfer of the same file) is not discussed. agent::fetchnow sleeps nowhere but releases the page cache of ranges it just sent — on a peer that serves the same ranges repeatedly (#93-style warm restart), it will re-fault them from disk each time.flare-cli/src/launch.rs:144-149adds the envelope/TP to--hostsgrants viacore.identity().ok()— anerror -> Noneswallow on the path the rest of the PR is hardening; the export is still injected into the grant so it is at least authenticated there.
#11 [high] Claims and evidence: what is backed, what is not
Claims in the description vs what backs them:
- "All Rust suites passed" (eos 12, helios 507/12 ignored, flare 246+8, flare-cli 219+26, heliopause 229/6 ignored; Python 140 and 94/8 skipped). CI on head
7908ac3: PASSED per the orientation packet. Nothing independently verifies the counts; they are self-reported and consistent with the named tests existing in the diff (single_host_describe_derives_distinct_exports_from_envelope_digest,envelope_digest_blocks_stale_single_host_cache_hits_and_wrong_weights,multi_deployment_payload_core_verifies_publishes_and_launches_rank_zero_with_tp,rank_options_forward_tensor_parallel,capture_group_into_cache_reads_source_once_for_miss_hit_and_no_weights,remote_no_weights_peer_reuses_coordinator_cache_and_rejects_missing_or_corrupt,lock_drop_releases_flock_even_with_duplicate_descriptor,file_lock::tests::drop_releases_flock_even_when_duplicate_descriptor_stays_open). - The tests are genuinely adversarial: the collision test builds two same-architecture Payload cores with identical filenames and byte lengths (
assert_eq!(files_a, files_b)), seeds a collidingmodel-<len>directory, and asserts HAVE/TRANSFER/RUN each reject the wrong envelope; the multi-deployment test assertsVerifiedCore::open(..., None)really errors and that--tensor-parallelappears exactly once. - "expected to eliminate the residual GB10 KV collapse reported in #630 (not yet re-measured on GB10 hardware)" — explicitly unmeasured. #630's own reporter (pfn) has not confirmed; the issue is still OPEN with asks 2 and 3 (KV-budget warning, MemFree/MemAvailable/Cached diagnostics on cuCtxCreate failure) untouched.
- "Multi-host
--no-weightsexports work on cold or GC'd peers, and normal multi-host exports leave zero orphan weight blobs on peer hosts" — supported on CPU only bycapture_group_into_cachecold-peer test andreceive_ranktest; "zero orphan blobs" is argued from the tempdir lifetime (NativeExportStage.close()), not measured (the description's "leaking 40-100+ GiB" figure has no measurement backing either). - "Dropping cache, trust, and download-transport locks releases Unix flock immediately even while a concurrently forked child holds an inherited descriptor pre-
execve" — supported by the two duplicate-descriptor tests. No test spawns a realfork()/Command; it simulates withFile::try_clone. - "No model core wire format or Protobuf schema changes. Existing cores load without re-export" — true for cores; but the cache identity changes for single-host payload cores (see undeclared behaviour #2), so existing cached copies stop being reused.
- Unrun: live multi-host GB10 KV measurement (#630), CUDA/RoCE export tests,
FLARE_TEST_TEMPLATE_DIRchat-template tests. No Windows build/test evidence for the newfile_lockWindows branch (LockFileEx), thoughflareis built for Windows elsewhere (eos/src/windows.rs stub added suggests awareness).
#17 [high] Research summary
Case file gathered across all nine angles; 16 scratchpad notes hold the details with file:line and PR/issue citations.
What the PR is. #667 is a single squashed commit (7908ac3, on main at a3c80e19, 25 files +1588/−352) from lukealonso, a charter-named priority contributor and the de-facto owner of every area it touches (235 helios/src commits in 180 days, 63 heliopause, 67 flare, 160 ignition/preparation). It bundles five unrelated defect fixes: Orbit envelope binding + multi-deployment TP forwarding, page-cache release on distribution/verify/store paths, explicit Unix flock(LOCK_UN) in Drop, and multi-host peer export caching. Open, ready, no comments, no labels, no reviews (the flare-autobot case file has not run yet); CI passed.
Most important things a reader could not learn from the description. (1) controller.rs:2031 silently drops the controller's own have()/check_space byte and free-space pre-check whenever the transfer source is the target node — undeclared. (2) The single-host export rename to model-<16 hex> invalidates every existing single-host Payload core cache entry, not just colliding ones, and nothing migrates them (docs/orbit.md:518-520 says legacy dirs are not migrated). (3) agent::run now re-opens and re-verifies the sealed core before every rank launch on the production path. (4) --verify-weights for controller-present Payload cores is still resolved by trust::load before describe() learns tensor_parallel (controller.rs:1187 vs 2423), so the multi-deployment fix may not cover that branch. (5) The envelope guard is skipped entirely when a grant omits envelope_digest (all-zero = legacy), i.e. an old or hostile controller can switch off the whole integrity feature, and the guard does not apply to non-local_core launches.
Claims. Test claims are detailed, self-reported, and matched by real, adversarial tests in the diff (identical-filename/identical-length collision seeded as model-<len>; VerifiedCore::open(..., None) asserted to fail on a multi-deployment core; --tensor-parallel asserted to appear exactly once). The page-cache benefit for #630 is explicitly unmeasured, and #630 is still open with its asks 2 and 3 (KV-budget warning, MemFree/MemAvailable/Cached diagnostics) untouched — the reporter pfn confirmed on 2026-12-01 that #646 did not fix this path, which is precisely the sha256_file/serve_source path #667 now addresses. "Zero orphan peer blobs" and the "40–100+ GiB leaked" figure are argued from tempdir lifetime, not measured. No doc file is changed although multi-host/--no-weights/core-caching semantics change (docs/multi-host.md:305-320, docs/orbit.md:471-535, docs/cli-design.md:416 (not opened)/1166/1541 and others are now stale).
Related work. Direct continuation of #646 (merged 2026-11-30) and #650 (merged 2026-12-01, same file, the change that creates the forked-child window the flock fix addresses), and extends #618's capture_group_into_cache and #647's multi-host export. Textual conflict risk with open same-author #668, which edits the same host_ranks.py export_options(...) lines #667 rewrites; and conceptual overlap with open #394 (voipmonitor), which also moves export scratch into NativeExportStage — #667 now puts a cache root inside that stage workspace.
Process/community. Hours old, no engagement; the author has four bundles open on the same day (#667, #668, #659, #658), and #646's review already criticised the multi-defect-bundle pattern the charter also flags ("smallest footprint"). #667 follows the charter's four-part PR description format and stays inside Orbit/multi-host goals without new user-facing flags, but adds serde-defaulted internal fields and a silent all-zero legacy escape hatch, which sits awkwardly with the charter's "be explicit, no magic defaults".
#18 [high] Change: plain-terms summary of the five defect bundles
Plain-terms summary for the report's opening section (25 files, +1588/−352, one squashed commit 7908ac3 on main a3c80e19, 6 areas):
- Orbit stops guessing about which weights are cached. The signed launch grant (
Grant.core) now carries the SHA-256 digest of the core's signed envelope and an optional tensor-parallel size. The controller folds 16 hex chars of that digest into the cache directory name for single-host payload cores, sends the digest with every cacheHAVEprobe, and the agent refuses cache hits, staging hits, transfers and launches whose stored bytes do not hash to that envelope. It also forwards--tensor-parallelonce, for bothorbit runandflare run --hosts, and verifies multi-deployment payload cores throughVerifiedCore::open_tensor_parallelinstead of the oldVerifiedCore::open(..., None)which simply errored and was swallowed by.ok(). - Page cache is actively dropped after reading big files on Linux. A new
posix_fadvise(DONTNEED)range primitive ineos, re-exported throughhelios, is called after hashing a core's primary, after every peer shard range served during distribution, across all deduped shard handles at source teardown, after storing blobs, after each payload hash during verification, and immediately after payload load on integrated GPUs. Motivation: GB10 unified memory — page cache steals from the KV pool andcuCtxCreate. - Unix advisory locks are explicitly unlocked on drop.
helios'sLockandCoreLockand a new cross-platformflare::file_lock::FileLock(replacing three hand-rolled lock helpers inhub.rs,download_cache.rs,trust.rs) now callflock(LOCK_UN)inDrop, because a concurrently forked child (Orbit rank spawn) inherits the open file description and would otherwise keep the lock held pastexecve. - Multi-host peers stop writing a model cache they never use.
ignition joinpeers now export into a transientpeer-cacheinside the native export stage tempdir (reclaimed onclose()), and under--no-weightsthey only hash the weight groups and declare the identities, leaving validation to rank zero's coordinator cache.
No new user-facing flags or config keys; no crate dependency changes; no model core wire-format change.
#19 [high] Why: provenance of each defect, and what has no issue trail
Provenance of each of the five defects — how long/widely reported:
- Defect 3 (GB10 page cache) is the only one with a filed issue: #630, opened 2026-11-30 by pfn (a different user), P2/triage:investigate, with a second reproduction comment 2026-12-01 showing it still open on
maine85019b9. It also has a documented export-time cousin (#73, open) and #646 previously claimed it. So this one has ~1 day of history but an external reporter and two independent reproductions. - Defects 1, 2, 4, 5 have no linked issue anywhere in the repo.
search_itemsfor "orbit stale weights cache hit same length", "orbit run tensor-parallel multi-deployment payload core", "orphan blob peer cache reclaim export" and "flock fork child process inherited lock" return only #667 itself (plus tangentially #361/#629, both already closed by #646). The descriptions in the PR body are the only report; there is no user-visible bug report, no repro log, and no linked discussion for them. - Defect 4 (flock across fork) is materially a consequence of #650 (merged 2026-12-01, same author), which moved rank spawning onto a persistent agent thread — so the window it fixes is ~hours old, introduced by the author's own prior PR.
- Defect 2's "multi-deployment TP seams" is likewise largely a consequence of #646's
.ok()swallow and #618's externalized signing, both by the same author in the preceding 48h. - Related issue #93 (open) "Warm multi-host start re-hashes each peer's cached rank on one thread (7 min for a 280 GB rank)" is the closest existing report of the general "re-hashing and re-reading peer ranks is expensive" theme, and #667 does not address it (it only drops the page cache after reads, which if anything worsens a warm re-read).
- #588 (closed, FujitsuPolycom) "Accelerate multi-host rank export transfer and check disk space up front" is earlier multi-host export work whose reviewer objected to pre-rendezvous disk-space checks breaking cached re-exports — context for the peer-cache change, not superseded by it.
Bottom line for the "why" angle: one of five defects is externally reported and reproducible (#630); four are author-internal findings with no issue trail.
#8 [medium] People and community: author, area owners, no reviews yet
- Author: lukealonso, GitHub association COLLABORATOR; one of three named priority contributors in the project charter ("Priority contributors (
@voipmonitor,@original-el8,@lukealonso) carry extra weight"). 36 merged PRs in the last 180 days, 0 closed, 3 open. Areas touched: helios/src (26), docs (22), ignition/preparation (10), flare-cli/src (9), heliopause/src (7). - De-facto owner of the areas this PR edits: commits on main in the last 180 days — helios/src 235, ignition/preparation 160, flare/src 67, heliopause/src 63, flare-cli/src 20 (vs eugr 4, yatesdr 4, Darrell Chee, jasonc 17, Martin Vit 52).
- #667 is a single squashed commit
7908ac3on top ofmainata3c80e19(#657), opened and last updated the same day (2026-12-01); no review comments at all (pr_comments: "No comments"), no labels. Description is structured exactly as the charter requires (why / what changed / claimed result / evidence). - Style precedent: this author's recent PRs are large multi-defect bundles (#646: 4 defects, 29 files; #658; #659). The charter asks for "the smallest footprint" and #646's review complained about "bundling 4 unrelated changesets in one commit". #667 bundles 5 defects across 25 files / 6 areas — same pattern. Expect that criticism to recur.
- Other people in these areas: yatesdr (eos, orbit, selene), Martin Vit (helios, ignition), voipmonitor (preparation; author of open #394 touching the same host_ranks.py/export-stage code), original-el8 (orbit/multi-host), FujitsuPolycom (heliopause export), PCCessna (heliopause), eugr (flare-cli). Nobody has engaged on #667 yet (opened hours ago; no Autobot case-file comment is present either, unlike #646/#668 which got an immediate
flare-autobotcase file + review). - Community interest: #630 (the linked issue) was reported by pfn, not the author, on 2026-11-30 with a second comment 2026-12-01 explicitly saying it is still open after #646; #667 does not reply to pfn or reference the remaining asks.
#12 [medium] Reach: who and what this affects
- Users/operators affected: anyone running
flare orbit run/orbit push(single-host or multi-host) and anyone doing multi-hostignition export+ignition join. - Config/defaults: no new CLI flags, no new config keys.
ExportOptions.remote_cacheandGrant.core.{envelope_digest,tensor_parallel}are internal wire fields with serde defaults, so old grants and old Python callers keep working.ServingOptions::rank_optionsstarts emitting--tensor-parallelintoGrant.servingwhere it previously did not — any consumer that assumedservingnever contains that flag (e.g. saved persistent groups'spec.serving) will now see it, andController::run's newdeduplicate_tensor_parallel(controller.rs:1960-1982) rewrites savedspec.servingto keep only the last occurrence. - Compatibility: on-disk cache directory naming changes for single-host payload cores (
model→model-<16 hex>), so caches from earlier versions are not reused and are not migrated (docs/orbit.md:518-520); grants from an older controller lackenvelope_digest, so all envelope checks are skipped (theOption/all-zero convention). A mixture of old and newflarebinaries across controller/agents therefore degrades to today's behaviour rather than failing — worth noting for rolling upgrades. - Dependencies: no Cargo.toml/Cargo.lock changes; uses host CPU + CUDA VMM only.
- Deployment:
flare agent(Orbit) andignition export/join; no changes toflare runserving alone beyond the inference paths. - Documentation: zero doc files changed (see project-fit note).
- Windows:
eos::release_page_cache_rangeis a no-op stub;flare::file_lockhas a realLockFileExpath replacinghub::lock_windowsanddownload_cache'stry_exclusive/windows::try_lock/trust'swindows::lockcall sites — those Windows helpers are now unused by those files, which is a behaviour change on Windows that only the Windows CI can confirm.
#13 [medium] Process: draft/ready, CI, reviews, age
- Process state at review time: OPEN, "ready for review", opened 2026-12-01, last updated 2026-12-01 (same day — hours old). Base
main, head7908ac3, 25 files +1588/−352, exactly 1 commit (7908ac3f"Harden Orbit payload integrity, multi-deployment TP seams, GB10 page-cache release, Unix flock drop, and multi-host peer exports" — squashed-style, no intermediate history). CI on head: passed (per orientation packet). - No labels, no reviews, no comments at all —
pr_commentsreturns "No comments". Noflare-autobotcase file/review is present yet, unlike #646 and #668 which received one within minutes, so the automated review for #667 simply hasn't run yet. - Precedent on review outcome for this author's bundles: #646 got "Changes Requested" with 1 blocker + 6 should-fix and still merged same day; #668 (same day, same size class) got "Changes Requested" with 0 blockers.
- Age: <1 day; nothing blocked, nothing superseding. Concurrent open same-author PRs #668, #659, #658 (2026-12-01) mean review attention is split across four bundles touching helios/orbit/ignition on the same day.
- Recent main activity in the touched areas, all within 72h and mostly by the same author: a3c80e19 (#657 2h earlier), 5d53040e (#628 yatesdr), a747a5a5 (#653), 571a4471 (#650), bf7562ae (#646), c146d7be (#620), e80b1f2f (#618), 968ca411 (#617), 1da22724 (#652), f2ca2c41 (#647), e85019b9 (#645 — the commit #630's reporter tested against and found still broken).
mainis moving fast under this PR's files, but #667 is rebased on the tipa3c80e19.
#14 [medium] Code map: helper functions and cache naming
resolve_source_ref_recordexists:helios/src/core/cache.rs:2682returns(SourceRef, Entry);SourceRef::expected_envelope()athelios/src/core/cache.rs:4177. These are pre-existing (added in #646) — #667 only starts consuming the record instead of dropping it.VerifiedCore::open_tensor_parallelathelios/src/runtime_core/protection.rs:766;NativeResources::core_formatathelios/src/runtime_core/mod.rs:247(enumCoreFormat::{Payload, Legacy}). Pre-existing; #667 is the first Orbit caller.envelope_digest()accessors: protection.rs:256/663/727/2202/2675, archive.rs:497, core/protection.rs:761.publish_orbit_entry(agent.rs:881-993) now writes.flare-verified.jsonviacrate::distribution::write_verified_marker_foronly whenreal_core(i.e. verified_meta is Some), and publishesorbit:<dir>,<export>-rank<R>(rank>0) or<export>-complete(rank 0) source refs carryingenvelope.VERIFIED(".verified") marker is written unconditionally.flare orbit coresreportsverifiedif either marker exists (agent.rs:1173-1174).- Grant cache directories:
Grant::cache_directory(rank)={export}-{length}-rank{rank},complete_directory()={export}-{length}(grant.rs:150-157) — so the length component remains and the new digest prefix is appended insideexport. flare-cli/src/orbit/controller.rs:831also buildscomplete_directory: format!("{}-{length}", resolved.export)for a prestage/detect path; consistent with the above.- Report-only (
cores()listing) still names rank entries<export>-<len>-rank<R>(agent.rs:1163) whilepublish_orbit_entry's entry id is{platform}-tp{tp}-{directory}sanitized (agent.rs:641-665) — two naming schemes, unchanged by this PR. Controller::rundeduplicate_tensor_parallel(controller.rs:697-707 + 1960-1982): takes the last--tensor-parallelout of savedspec.serving, removes all occurrences, re-appends one, and if the CLI gave none, parses the saved value (comma-split) intooptions.run_args.serving.hub.tensor_parallelsoresolve_core→trust::load_withsees it. Errors on unparsable values.
#15 [medium] Recent activity: what changed lately in the touched areas
- Recent changes in the touched areas (last 60 days, per orientation packet + git log): flare-cli/src — a3c80e19 #657 (Luke), 5d53040e #628 (yatesdr), a747a5a5 #653 (Darrell Chee), 571a4471 #650 (Luke, same file agent.rs, immediately preceding #667), bf7562ae #646 (Luke, same files), c146d7be #620, e80b1f2f #618, 968ca411 #617. flare/src — a3c80e19, bf7562ae #646, c146d7be #620, 493f24c3 #603 (hub errors), e80b1f2f #618, 968ca411 #617, fb32cd39 #598, f5ce5534 #591 (eugr, WinUI). heliopause/src — 5d53040e #628, 1da22724 #652, bf7562ae #646, f2ca2c41 #647, c146d7be #620, e0290571 #586, e80b1f2f #618, f1bd4210 (FujitsuPolycom, "skip digest and fsync on disposable export spans" — adjacent to the no-weights single-pass work). helios/src — dominated by Luke (235 commits/180d).
- Direction of travel: #646 moved Orbit rank caches onto
helios::core::cache::Rootwith.flare-verified.jsonmarkers and source refs; #650 moved rank spawning onto a persistent agent thread (which is what makes a forked child exist while locks are held); #647/#652 changed export capture and cubin output; #620 removed copy drafts/history drafts. #667 continues each thread rather than reversing any: it consumes #646'sSourceRefenvelope record, hardens the fork window #650 widened, and extends #618's single-passcapture_group_into_cache. - Nothing in the recent history conflicts semantically; the risk is textual (same hunks as open #668 in host_ranks.py, and #394's export-stage workspace).
- #628 (yatesdr, helios offload Copy Engine gating) and #658/#659 (Luke, helios VMM/zero-granule) are in helios but not in the files #667 touches except
helios/src/lib.rsre-export line. - Note
mainate85019b9(#645) is the revision #630's reporter pfn used to demonstrate the KV collapse is still present; #667 is based 3 commits later (a3c80e19).
#16 [medium] Change: limits of the envelope guard
- Blind spot in the
run()launch guard: the new envelope check runs only for cores reached through thelocal_corebranch (agent.rs:2140-2196), i.e.grant.core.sourcewith a matching key or a resolved cache entry. A rank whose core arrives via a non-local path (e.g. one that later gets resolved for a peer) does not get theopen_verified_corecomparison before spawn; the transfer-time verifier is the only guard there. Worth noting because the description says the check happens "before spawningflare run". - The envelope check happens after
expected_envelopeis read from the signed grant (agent.rs:2137), so it is tamper-evident only against cache/staging contents, not against a controller that omitsenvelope_digest(all zero →None→ no check). A malicious or older controller can disable the entire integrity feature by leaving the field out, and the agent will still verify stored data via the verifier but will not bind the bytes to a specific envelope. verify_corereturnsOk(None)never in practice (it always returnsSome(meta)when it succeeds), sopublish_orbit_entryalways takes the authenticated branch for a verified core; the fallback branch (grant-derived model key, zero envelope) is reached only if a verifier fake returnsNone(test fakes do) — i.e. thereal_coredistinction now depends on the verifier's return, a small contract subtlety.open_verified_coremapsrank(usize) tou32and fails on overflow — fine in practice.parse_expected_enveloperejects malformed digests, and treats all-zero as "no binding" (agent.rs:1548-1556).
#20 [medium] Reach: what peers lose by no longer caching rank blobs
Consequences of the multi-host peer-export change that a reader should weigh (reach angle):
- Peers lose their local rank cache entirely.
host_ranks.py:685replacesexport_options(core_cache, ...)withexport_options(peer_cache, ..., remote_cache=True)wherepeer_cacheis insideNativeExportStage'sTempDir, and thefinallysetscore = Nonebeforenative_stage.close(). So after a multi-host export a peer holds no payload blobs and no model entry. This is the intended orphan-blob fix, but it also means a peer can no longer act as a local cache for a repeat export or for a laterorbit pushfrom that host; every subsequent export re-reads and re-hashes its rank weights from the source checkpoint. That cost is not discussed in the description. - It contradicts the current documented behaviour rather than updating it:
docs/multi-host.md:305-306says the peer host "Prepares and retains its rank's payload blobs locally" and "--no-weightsrequires matching cached payloads". Same fordocs/model-preparation.md:24,docs/cli-design.md:416/1166/1541,docs/preparation-development.md:157("--no-weightsmust fail on any missing exact stored-data blob") anddocs/runtime-core-design.md:338. #667 changes the rule only for the coordinator side and leaves all five doc statements as-is. - The correctness of
--no-weightsnow rests onreceive_rankinheliopause/src/export/transfer.rsrejecting a missing or wrong-length payload in the coordinator cache (new tests cover both). If a peer declares an id the coordinator does not hold, the failure text is the new "--no-weights requires the peer payload object in the coordinator cache" — which is the old failure moved to a different host, so a cold coordinator cache still fails a--no-weightsexport; only cold peers are fixed. - Interaction with the #394 line of work (voipmonitor, open): both reduce export scratch outside the shared cache, but #394 routes intermediate publication files through the stage while #667 creates a second cache
Rootinside the stage workspace. Nothing coordinates the two, and #394's PR also editshost_ranks.py.