Repository navigation
helios,heliopause,ignition: unify RankBody and RankOutput payload visitors for external_extents and align config.toml schema - #720
Merged
Conversation
…itors for external_extents and align config.toml schema
Independent payload walkers across Helios and Heliopause omitted
RankBody.external_extents (the authenticated extent directories and
backing segments for Execution.async_transfers), creating six defects:
multi-host rank export dropped external_extents files and left
sender-local paths unrewritten; keyless pack/unpack and combine dropped
external_extents from location closures and PublishRank.payloads;
runtime-core verification omitted external_extents directories from
supporting_payload_ids (leaving directories unhashed once
supporting_verified is set), omitted segments from
verification_payloads(true), and omitted external_extents companions
from multi-host serving bootstrap (rank_ranges); weight reuse and export
planning omitted external_extents from cached-weight checks, file
descriptor preflight accounting, and cache-lease deduplication; capture
validation checked external_extents at seg_base_offset=0, allowing
alignments above the 4 KiB core container alignment to pass export and
fail at load; and Ignition's config.toml validator rejected [memory]
pool_vram and pool_ram that Flare already accepts. Separately, a test
Core literal in helios/src/runtime_core/cache_memory.rs omitted
external_extents, breaking cargo test --features runtime-core,server
compilation while the Helios lifecycle workflow only built --features
server. Unifying rank traversal through exhaustively destructured
visitors ensures future payload-bearing fields on RankBody or RankOutput
fail compilation until every consumer classifies them.
Changes:
- helios/src/core/schema.rs: add RankPayloadUse and exhaustively
destructured wire::RankBody::{visit_payload_uses,
try_visit_payload_uses}; fix validate_external_extents to validate
directory.slice.nbytes rather than the enclosing payload length.
- helios/src/core/reader.rs, helios/src/core/conversion.rs,
helios/src/runtime_core/protection.rs,
flare-cli/src/distribution/cache_tests.rs: replace manual rank payload
loops with RankBody::visit_payload_uses / try_visit_payload_uses.
supporting_payload_ids now always includes ExternalExtentDirectory
(independent of PayloadRole, preserving compatibility with cores whose
directories use PayloadRole::Weights) plus any InitialState
ExternalExtentSegment; verification_payloads(true) includes all
ExternalExtentSegment payloads; rank_ranges includes all rank
external_extents companions.
- helios/src/runtime_core/format.rs,
helios/src/runtime_core/cache_memory.rs,
.github/workflows/helios-lifecycle.yml: reject nonempty
Core.external_extents without an execution manifest, add missing
external_extents: vec![] to the cache_memory test Core literal, and
add runtime-core,server test compilation to the Helios lifecycle
workflow.
- heliopause/src/export/{mod,transfer,weight_reuse,core,capture}.rs and
ignition/preparation/execution.py: add RankSourcePath and exhaustively
destructured RankOutput::{visit_source_paths, try_visit_source_paths,
visit_source_paths_mut}; transfer and rewrite external_extents paths
in send_rank/receive_rank; route weight_reuse::open_source through
RankBody::try_visit_payload_uses; account for external_extents file
descriptors in estimated_export_fds and deduplicate them against
core-cache leases in rank_plan; extract and enforce 4 KiB
container::ALIGNMENT (validating at seg_base_offset=4096 and rejecting
empty directories) in capture.rs and AsyncTransferChannel.
- ignition/cli/config.py, docs/cli-design.md, tests/cli/test_config.py,
flare-cli/src/config.rs: accept and validate [memory] pool_vram and
pool_ram matching flare_helios::runtime_core::PoolMemoryLimit, update
the configuration specification, and add a Rust-vs-Python schema
parity test that parses flare/src/configuration.rs and loads every
Rust configuration key through Configuration.load.
Result:
Restores flare-helios --features runtime-core,server test compilation,
closes multi-host export transfer, keyless pack/unpack, combine,
multi-host serving rank_ranges, --reuse-weights, and cryptographic
verification coverage for RankBody.external_extents, prevents exporting
unloadable external_extents channels above 4 KiB container alignment,
unblocks Ignition commands sharing config.toml files with [memory]
pool_vram or pool_ram, and turns future omitted payload fields on
RankBody or RankOutput into compile-time errors.
Validation (CPU suites on Linux x86_64):
- cargo test --locked --manifest-path helios/Cargo.toml --features
runtime-core,server --lib --no-run: compiled cleanly (0 warnings).
- cargo test --locked --release --manifest-path helios/Cargo.toml
--features runtime-core,server --lib (with
FLARE_TEST_TEMPLATE_DIR=/tmp/flare-test-templates): 1899 passed,
49 ignored, 6 failed solely in external chat-template tests due to
missing nemotron_h/qwen38/step5 fixtures in /tmp/flare-test-templates;
all new schema, conversion, combine, and protection external_extents
tests and all 52 cache_memory unit tests passed.
- cargo test --locked --release --manifest-path helios/Cargo.toml
--features runtime-core,server --test unverified_empty
--test actual_qwen38_tp2 --test actual_w4a16: 3 passed, 0 failed,
2 ignored.
- cargo test --locked --release --manifest-path heliopause/Cargo.toml
--lib: 234 passed, 0 failed, 6 ignored (including new capture
alignment, transfer roundtrip, FD preflight, cache dedup, and
weight_reuse::open_source tests).
- cargo test --locked --release --manifest-path flare/Cargo.toml
--tests: 255 passed, 0 failed, 4 ignored.
- cargo test --locked --release --manifest-path flare-cli/Cargo.toml
--tests: 249 passed, 0 failed, 3 ignored (including new pool_vram and
pool_ram config precedence tests).
- pytest tests/cli tests/preparation/test_execution.py: 260 passed,
0 failed (including pool_vram/pool_ram validation, Rust-vs-Python
config parity, and AsyncTransferChannel alignment tests);
tests/preparation/test_runtime_core.py and test_core_boundary.py:
26 passed, 14 skipped (CUDA/optional fixtures).
Limitations: live CUDA execution, GPU-only tests, multi-host live fabric
serving with external_extents, and the 6 missing-template frontend tests
were not executed here.
Design-Signed-Off-By: Antigravity (Gemini); design-review=2e5b
Signed-off-by: Luke Alonso <lalonso@gmail.com>
jcartu
added a commit
to jcartu/hyperflare-inference
that referenced
this pull request
Dec 4, 2026
… inherit orbit memory reserve, and log integrated MemInfo Why - On Linux unified-memory GPUs (such as GB10), CUDA allocations and context creation can respond to Linux `MemFree` rather than `MemAvailable` when tens of gigabytes of clean page cache accumulate from core distribution and buffered cache I/O (NVIDIA#630). - `flare-cli`'s peer-serving path (`distribution::serve_source`) streamed core shards via buffered `RangeReader` before dropping page cache, leaving multi-GiB bursts in the page cache during transfer, and four buffered I/O sites across `flare-cli` and `helios` omitted `release_page_cache`. - `flare orbit run` did not inherit `[memory] reserve` from host configuration (`config.rs`), unlike `flare run`, while persistent groups still needed their stored `--memory-limit` preserved unless overridden on the command line and must not freeze config defaults into saved `GroupSpec.serving` definitions. - When integrated-GPU cache planning was memory-limited or `cuDevicePrimaryCtxRetain` / `cuCtxCreate_v2` returned `CUDA_ERROR_OUT_OF_MEMORY`, diagnostics did not surface Linux `MemFree / MemAvailable / Cached` or hint when reclaimable page cache was likely blocking allocation. What changed - Direct peer serving and missed `release_page_cache` sites: - Re-exported `eos` direct-I/O helpers (`FileReadAt`, `allocate_aligned`, `direct_reopen`, `free_aligned`) from `helios/src/lib.rs`. - Updated `flare-cli/src/distribution.rs::serve_source` to reopen files with `direct_reopen` on Unix and stream 4 MiB aligned chunks from a zero-initialized `AlignedBuffer` (handling arbitrary unaligned offsets, multi-range requests, and unaligned EOF byte-for-byte identically to `cache::RangeReader`), falling back cleanly to buffered `RangeReader` when `O_DIRECT` is unsupported or returns `EINVAL`, and executing one unconditional post-branch `release_page_cache_range` loop in `copy_source_ranges` for every served range (including on error). - Added `release_page_cache` / `release_page_cache_range` at the four missed buffered I/O sites: `flare-cli/src/orbit/controller.rs`, `flare-cli/src/core_cache.rs`, `flare-cli/src/orbit/agent.rs::get`, and `helios/src/core/cache.rs` (`write_stream`, `verify_file`, `hash_file`, `import_legacy_into`, and non-Windows `copy_file`). Collapsed `verify_file` onto `hash_file(path, release: bool)` so `import_legacy_into` hashes with `release = false` (avoiding double storage reads before `insert_legacy_container`) and releases the source file unconditionally after `insert_legacy_container` returns. - Orbit `[memory] reserve` propagation: - Added `#[arg(skip)] pub config_memory_limit: Option<MemoryLimit>` to `OrbitRun` (`flare-cli/src/cli.rs`) and `RunOptions` (`flare-cli/src/orbit/controller.rs`), populated from `[memory] reserve` in `flare-cli/src/config.rs` only when `--memory-limit` is unset on the command line. - Kept config-derived `--memory-limit` out of `OrbitRun::rank_options` and `GroupSpec.serving` so persistent groups never freeze config defaults; applied it only at launch via `apply_config_memory_limit` when neither the saved group nor the CLI specifies `--memory-limit`. - Added a persistent-group round-trip unit test through `save_group` / `Orbit::save` / `Orbit::load` verifying config reserve edits take effect on reload while explicit saved and CLI `--memory-limit` values retain precedence. - Linux integrated-GPU `/proc/meminfo` diagnostics: - Added `LinuxMemInfo { free, available, cached }` parser and `CUDA_ERROR_OUT_OF_MEMORY` constant in `helios/src/runtime_core/`. - Appended `MemFree / MemAvailable / Cached` to the `Plan cache` summary on Linux integrated GPUs and emitted a concise stderr warning when `MemAvailable - MemFree > 10 GiB` and KV sizing is limited by memory (without repeating the triple already logged in `Plan cache`). - Enriched `cuDevicePrimaryCtxRetain` and `cuCtxCreate_v2` `CUDA_ERROR_OUT_OF_MEMORY` failures on Linux integrated GPUs via `enrich_integrated_ctx_oom(error, meminfo: Option<LinuxMemInfo>)` with `MemFree / MemAvailable / Cached` (and a `drop_caches` hint when `MemAvailable - MemFree > 4 GiB`) while preserving the structured `ExecutionError::Driver(CudaError { code: 2, .. })` error. - Documentation: - Documented `orbit run` `[memory] reserve` inheritance, non-persistence, and saved/CLI `--memory-limit` precedence in `docs/orbit.md` and `docs/cli-design.md`, and integrated-GPU `Plan cache` / context-OOM `/proc/meminfo` diagnostics in `docs/cli-design.md`. Verification - Rebased onto `origin/main` (`f705086b`, including `NVIDIA#720` and `NVIDIA#721`). - CPU-only verification on Linux x86_64 (no live GB10 run yet): - Verified `.githooks/commit-msg` passes on the staged diff and message. - `cargo test --locked --release --manifest-path flare-cli/Cargo.toml`: 254 passed (228 bin + 9 cache_commands + 6 cli + 4 inspect + 7 unverified_payload), 0 failed, 3 ignored. - `cargo test --locked --release --manifest-path flare/Cargo.toml`: 255 passed (247 lib + 7 packed_canonical_download + 1 reference_workflows), 0 failed, 4 ignored. - `cargo test --locked --release --manifest-path helios/Cargo.toml --features runtime-core,server --lib`: `core::cache` 106 passed, 0 failed, 2 ignored; `runtime_core::` 206 passed (including `runtime_core::memory` 30 passed), 0 failed, 13 ignored. - `rustfmt --edition 2024`: clean on all touched lines across all 12 Rust files. Design-Signed-Off-By: Antigravity (Gemini 3.1 Pro); design-review=2e5b Signed-off-by: Joshua Cartu <jcartu@users.noreply.github.com>
fakoli
added a commit
to fakoli/hyperflare-inference
that referenced
this pull request
Dec 4, 2026
Why:
Under --prefix-cache-pool with --prefix-cache-memory 0 (pool_only()), the host
capture slab and runtime_core::memory headroom planning previously sized
buffers for full multi-sequence GPU KV capacity (~33 GiB on an RTX PRO 6000
96 GiB card for 1M-context cores), even though any single sequence chain
cannot exceed max_sequence_tokens.
What changed:
- selene/src/offload.rs: Added PrepareInputs::max_sequence_pages: Option<u64>
and capped pool_only() chain capture slots to local_pages.min(limit) +
row_slots when limit > 0, keeping unbounded local_pages for None / Some(0).
- helios/src/runtime_core/{memory,model}.rs: Computed max_sequence_pages =
max_sequence_tokens.div_ceil(page_tokens), passed it to PrepareInputs, and
clamped minimum_pages, capture_growth, and planned_offload_host in memory.rs.
- docs/prefix-cache-offload.md & tests: Documented prepared max-sequence page
capping and power-of-two --staging (Arena) sizing behavior for NoWindows
avoidance on >8 GiB exports, and added
pool_only_caps_capture_buffer_to_max_sequence_pages.
Claimed benefit:
Bounds pool_only() host capture allocation on a 1M-context JMNI-Labs/Inkling-2-Mini-FLARE
RTX PRO 6000 96 GiB prefill rank to one sequence chain plus one row (9.1 GiB /
8,293 slots), reducing combined committed RSS across selene, prefill, and decode
from 46.02 GiB to 41.77 GiB. Multi-sequence simultaneous capture still requires
explicit --prefix-cache-memory.
Evidence:
- 6-crate RUSTFLAGS="-D warnings" cargo check and release test suite (3,514
passed, 0 failed, 94 ignored) on 45e1c1a baseline, plus focused re-verification
of flare-helios, flare-selene, and flare-selene-manager tests after rebase
onto f705086 (NVIDIA#720) including pool_only_caps_capture_buffer_to_max_sequence_pages.
- verification/helios-lifecycle/check.py --mutations passed all TLA+ models and
observed Rust transitions on 45e1c1a.
Design-Signed-Off-By: Antigravity (Gemini 3.1 Pro); design-review=2e5b
Signed-off-by: fakoli <fakoli@users.noreply.github.com>
lukealonso
pushed a commit
that referenced
this pull request
Dec 4, 2026
… inherit orbit memory reserve, and log integrated MemInfo (#713) Why - On Linux unified-memory GPUs (such as GB10), CUDA allocations and context creation can respond to Linux `MemFree` rather than `MemAvailable` when tens of gigabytes of clean page cache accumulate from core distribution and buffered cache I/O (#630). - `flare-cli`'s peer-serving path (`distribution::serve_source`) streamed core shards via buffered `RangeReader` before dropping page cache, leaving multi-GiB bursts in the page cache during transfer, and four buffered I/O sites across `flare-cli` and `helios` omitted `release_page_cache`. - `flare orbit run` did not inherit `[memory] reserve` from host configuration (`config.rs`), unlike `flare run`, while persistent groups still needed their stored `--memory-limit` preserved unless overridden on the command line and must not freeze config defaults into saved `GroupSpec.serving` definitions. - When integrated-GPU cache planning was memory-limited or `cuDevicePrimaryCtxRetain` / `cuCtxCreate_v2` returned `CUDA_ERROR_OUT_OF_MEMORY`, diagnostics did not surface Linux `MemFree / MemAvailable / Cached` or hint when reclaimable page cache was likely blocking allocation. What changed - Direct peer serving and missed `release_page_cache` sites: - Re-exported `eos` direct-I/O helpers (`FileReadAt`, `allocate_aligned`, `direct_reopen`, `free_aligned`) from `helios/src/lib.rs`. - Updated `flare-cli/src/distribution.rs::serve_source` to reopen files with `direct_reopen` on Unix and stream 4 MiB aligned chunks from a zero-initialized `AlignedBuffer` (handling arbitrary unaligned offsets, multi-range requests, and unaligned EOF byte-for-byte identically to `cache::RangeReader`), falling back cleanly to buffered `RangeReader` when `O_DIRECT` is unsupported or returns `EINVAL`, and executing one unconditional post-branch `release_page_cache_range` loop in `copy_source_ranges` for every served range (including on error). - Added `release_page_cache` / `release_page_cache_range` at the four missed buffered I/O sites: `flare-cli/src/orbit/controller.rs`, `flare-cli/src/core_cache.rs`, `flare-cli/src/orbit/agent.rs::get`, and `helios/src/core/cache.rs` (`write_stream`, `verify_file`, `hash_file`, `import_legacy_into`, and non-Windows `copy_file`). Collapsed `verify_file` onto `hash_file(path, release: bool)` so `import_legacy_into` hashes with `release = false` (avoiding double storage reads before `insert_legacy_container`) and releases the source file unconditionally after `insert_legacy_container` returns. - Orbit `[memory] reserve` propagation: - Added `#[arg(skip)] pub config_memory_limit: Option<MemoryLimit>` to `OrbitRun` (`flare-cli/src/cli.rs`) and `RunOptions` (`flare-cli/src/orbit/controller.rs`), populated from `[memory] reserve` in `flare-cli/src/config.rs` only when `--memory-limit` is unset on the command line. - Kept config-derived `--memory-limit` out of `OrbitRun::rank_options` and `GroupSpec.serving` so persistent groups never freeze config defaults; applied it only at launch via `apply_config_memory_limit` when neither the saved group nor the CLI specifies `--memory-limit`. - Added a persistent-group round-trip unit test through `save_group` / `Orbit::save` / `Orbit::load` verifying config reserve edits take effect on reload while explicit saved and CLI `--memory-limit` values retain precedence. - Linux integrated-GPU `/proc/meminfo` diagnostics: - Added `LinuxMemInfo { free, available, cached }` parser and `CUDA_ERROR_OUT_OF_MEMORY` constant in `helios/src/runtime_core/`. - Appended `MemFree / MemAvailable / Cached` to the `Plan cache` summary on Linux integrated GPUs and emitted a concise stderr warning when `MemAvailable - MemFree > 10 GiB` and KV sizing is limited by memory (without repeating the triple already logged in `Plan cache`). - Enriched `cuDevicePrimaryCtxRetain` and `cuCtxCreate_v2` `CUDA_ERROR_OUT_OF_MEMORY` failures on Linux integrated GPUs via `enrich_integrated_ctx_oom(error, meminfo: Option<LinuxMemInfo>)` with `MemFree / MemAvailable / Cached` (and a `drop_caches` hint when `MemAvailable - MemFree > 4 GiB`) while preserving the structured `ExecutionError::Driver(CudaError { code: 2, .. })` error. - Documentation: - Documented `orbit run` `[memory] reserve` inheritance, non-persistence, and saved/CLI `--memory-limit` precedence in `docs/orbit.md` and `docs/cli-design.md`, and integrated-GPU `Plan cache` / context-OOM `/proc/meminfo` diagnostics in `docs/cli-design.md`. Verification - Rebased onto `origin/main` (`f705086b`, including `#720` and `#721`). - CPU-only verification on Linux x86_64 (no live GB10 run yet): - Verified `.githooks/commit-msg` passes on the staged diff and message. - `cargo test --locked --release --manifest-path flare-cli/Cargo.toml`: 254 passed (228 bin + 9 cache_commands + 6 cli + 4 inspect + 7 unverified_payload), 0 failed, 3 ignored. - `cargo test --locked --release --manifest-path flare/Cargo.toml`: 255 passed (247 lib + 7 packed_canonical_download + 1 reference_workflows), 0 failed, 4 ignored. - `cargo test --locked --release --manifest-path helios/Cargo.toml --features runtime-core,server --lib`: `core::cache` 106 passed, 0 failed, 2 ignored; `runtime_core::` 206 passed (including `runtime_core::memory` 30 passed), 0 failed, 13 ignored. - `rustfmt --edition 2024`: clean on all touched lines across all 12 Rust files. Design-Signed-Off-By: Antigravity (Gemini 3.1 Pro); design-review=2e5b Signed-off-by: Joshua Cartu <jcartu@users.noreply.github.com> Co-authored-by: Joshua Cartu <jcartu@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Payload-format prepared cores store authenticated
Execution.async_transfersextent tables inRankBody.external_extents(a packed 24-byte-entry directory payload plus backing segment payloads), while preparation represents them inRankOutput.external_extents(ExternalExtentInputdirectory and segment file paths). Six independent hand-written walkers across Helios and Heliopause enumeratedinitializers,modules[].globals, andresources(orRankOutput.payload) without visitingexternal_extents, causing concrete failures across export, conversion, verification, and serving:heliopause/src/export/transfer.rs):send_rankandreceive_rankhashed, validated, transferred, and rewrote onlyRankOutput.payloadsource paths, droppingexternal_extentsfiles and leaving sender-local paths in the coordinator's staged rank output.combine(helios/src/core/conversion.rs):rank_consumersomittedexternal_extents(dropping theirLocationSetentries duringVerified::openinpackandunpack), andpublish_rankclonedrank.external_extentswithout adding the directory or segment payloads toPublishRank.payloads, failingschema::validate_rank.helios/src/runtime_core/protection.rs):PayloadSource::supporting_payload_idsomittedexternal_extentsdirectories andverification_payloads(true)omittedexternal_extentssegments. Onceauthorizesetssupporting_verified = true,PayloadSource::readskips per-read hashing, soprepare_async_transfersread unverified extent directories and--verify-weightsnever hashed offloaded extent segments. In addition,PayloadAuthorizedCore::rank_rangesomittedexternal_extentscompanions from per-rank transfer closures during multi-host serving bootstrap.heliopause/src/export/weight_reuse.rs,heliopause/src/export/core.rs):open_sourceignoredexternal_extentswhen checking cached weight payloads for--reuse-weights;estimated_export_fdsomitted pinned or leasedexternal_extentsfile descriptors; andrank_planpinned raw extent files directly instead of deduplicating against core-cache leases (forcing duplicate hashing inresolve_cache_object).heliopause/src/export/capture.rs,ignition/preparation/execution.py): Core safetensors containers align payload bases tocontainer::ALIGNMENT(4 KiB), placing companion tensors at offset4096. Capture validatedexternal_extentsatseg_base_offset = 0for anychannel.alignment >= 4096, allowing channels withalignment > 4096to export cleanly and fail at load time indecode_extent_directory(helios/src/async_transfer/ring.rs).config.tomldrift (ignition/cli/config.py):flare/src/configuration.rsaccepts[memory] pool_vramand[memory] pool_ram, whereasignition/cli/config.pyrestricted[memory]to{"reserve"}, causing every Ignition command to fail withUsageErrorwhen either key is configured in~/.config/flare/config.toml.heliostest compilation (helios/src/runtime_core/cache_memory.rs,.github/workflows/helios-lifecycle.yml):cuda_sentinel_row_with_exact_granule_stride_maps_without_tailomittedexternal_extents: vec![]in aruntime_core::format::Coreliteral, breakingcargo test --manifest-path helios/Cargo.toml --features runtime-core,serveronmainwhile the Helios lifecycle workflow only built--features server.Centralizing rank payload traversal in exhaustively destructured visitors (
RankBody::visit_payload_usesandRankOutput::visit_source_paths) removes duplicated field walks and turns future payload-bearing field additions into compile-time errors across every consumer.What changed
RankBodyvisitor and schema validation (helios/src/core/schema.rs):RankPayloadUse(Initializer,ModuleGlobal,ExternalExtentDirectory,ExternalExtentSegment,ExecutableResource) andwire::RankBody::{visit_payload_uses, try_visit_payload_uses}, destructuring all fields ofRankBodyand its payload-bearing records without...validate_external_extentsfrom checking the whole payload length returned bycatalog.check_useto checkingdirectory.slice.nbytes, matchingModuleGlobalslice validation.helios/src/core/reader.rs,helios/src/core/conversion.rs,helios/src/runtime_core/protection.rs,helios/src/runtime_core/format.rs,flare-cli/src/distribution/cache_tests.rs):reader::required_payloads,conversion::rank_consumers,conversion::publish_rank,PayloadSource::supporting_payload_ids,PayloadSource::verification_payloads,PayloadAuthorizedCore::rank_ranges, andcache_testswithvisit_payload_uses/try_visit_payload_uses.supporting_payload_ids,verification_payloads(true),rank_ranges,rank_consumers, andpublish_rankskippedexternal_extents. After:supporting_payload_idsunconditionally includesExternalExtentDirectory(independent ofPayloadRole, preserving compatibility with existing cores whose directories carryPayloadRole::Weights) plus anyInitialStateExternalExtentSegment;verification_payloads(true)includes allExternalExtentSegmentpayloads; andrank_ranges,rank_consumers, andpublish_rankinclude allexternal_extentsdirectories and segments.Core::validateinhelios/src/runtime_core/format.rsnow rejects nonemptyexternal_extentswhenexecutionis absent.helios/src/runtime_core/cache_memory.rs,.github/workflows/helios-lifecycle.yml):external_extents: vec![]to theCoretest literal atcache_memory.rs:1659(the same one-line fix as NVIDIA/hyperflare-inference#714; if fix(helios): add missing external_extents field in cache_memory test Core literal #714 merges first, rebasing drops this hunk cleanly).cargo test --locked --manifest-path helios/Cargo.toml --features runtime-core,server --lib --no-runto.github/workflows/helios-lifecycle.yml.RankOutputvisitor and Heliopause export (heliopause/src/export/{mod,transfer,weight_reuse,core,capture}.rs,ignition/preparation/execution.py):RankSourcePathand exhaustively destructuredRankOutput::{visit_source_paths, try_visit_source_paths, visit_source_paths_mut}.send_rankandreceive_rankto hash, validate, transfer, and rewriteexternal_extentsdirectory and segment paths alongsideRankOutput.payload.weight_reuse::open_sourceto validate cached weight payloads viaRankBody::try_visit_payload_uses.estimated_export_fdsto countexternal_extentsfiles (2 FDs per cache lease when cached, 1 pinned FD when uncached) and updatedrank_planto pin extent files before hashing viaSlice::digest()and reuse matching core-cache leases.validate_external_extentsincapture.rsto validate directories atseg_base_offset = container::ALIGNMENT(4 KiB), rejectchannel.alignment > container::ALIGNMENT, reject invalid alignments (< 4096or non-power-of-two) before modulo arithmetic, and reject empty directory files; added the matchingalignment > 4096check whenextent_directoryis set onAsyncTransferChannelinignition/preparation/execution.py.ignition/cli/config.py,docs/cli-design.md,tests/cli/test_config.py,flare-cli/src/config.rs):[memory] pool_vramand[memory] pool_ramto_SECTIONSand_BUILT_INwith validation matchingflare_helios::runtime_core::PoolMemoryLimit::from_str.[memory] pool_vramandpool_ramindocs/cli-design.md.test_python_config_schema_matches_rust_configurationintests/cli/test_config.py, which parsesflare/src/configuration.rsstructs and serde aliases and loads a generated TOML file containing every Rust key throughConfiguration.load, plus unit tests for[memory] pool_vram/pool_ramprecedence inflare-cli/src/config.rs.Claimed benefit
flare-helios --features runtime-core,servertest compilation and keeps it gated in Helios lifecycle CI.RankBody.external_extentsend-to-end across multi-host export (send_rank/receive_rank), keylesspack/unpack,combine, multi-host serving bootstrap (rank_ranges),--reuse-weights, export FD preflight, cache-lease deduplication, and startup cryptographic verification (directories always verified; weight segments verified underverify_weights = true).external_extentschannels whose alignment exceeds the 4 KiB core container alignment.UsageErrorfailures in Ignition when[memory] pool_vramor[memory] pool_ramis set in shared~/.config/flare/config.toml, with an automated Rust-vs-Python schema parity check.RankBodyorRankOutputfail compilation until handled in every visitor consumer.Supporting evidence and limitations
Executed on Linux x86_64 against
origin/main(17961ccd):cargo test --locked --manifest-path helios/Cargo.toml --features runtime-core,server --lib --no-runpassed with 0 warnings (baseline onorigin/mainfailed withE0063: missing field external_extentsathelios/src/runtime_core/cache_memory.rs:1659).FLARE_TEST_TEMPLATE_DIR=/tmp/flare-test-templates cargo test --locked --release --manifest-path helios/Cargo.toml --features runtime-core,server --lib:1899 passed, 6 failed, 49 ignored.core::schema::tests::visit_payload_uses_covers_all_rank_payload_categories,core::schema::tests::validate_external_extents_checks_directory_slice_length,core::conversion::tests::pack_unpack_and_combine_preserve_external_extents_payloads,runtime_core::protection::payload_core_tests::external_extents_verification_and_rank_ranges_cover_directory_and_segments, and all52non-GPUcache_memory::tests(4GPU/benchmark tests ignored).frontend::jinja::tests::*,frontend::templates::tests::compatibility_requires_exact_legacy_bytes,server::protocol::decode::native_prompt_tests::messages_image_hints_end_after_expansion_for_text_and_segmented_templates) occurred because the local/tmp/flare-test-templatescache lacked external template fixtures fornemotron_h,qwen38, andstep5.cargo test --locked --release --manifest-path helios/Cargo.toml --features runtime-core,server --test unverified_empty --test actual_qwen38_tp2 --test actual_w4a16:3 passed, 0 failed, 2 ignored.cargo test --locked --release --manifest-path heliopause/Cargo.toml --lib:234 passed, 0 failed, 6 ignored, including new testsexport::capture::tests::validate_external_extents_enforces_container_alignment_and_nonempty_directory,export::transfer::tests::rank_transfer_roundtrips_external_extents_and_rewrites_paths, andexport::core::payload_export_tests::external_extents_fd_preflight_cache_dedup_and_weight_reuse_open_source.cargo test --locked --release --manifest-path flare/Cargo.toml --tests:255 passed, 0 failed, 4 ignored(247lib,7packed_canonical_download,1reference_workflows).cargo test --locked --release --manifest-path flare-cli/Cargo.toml --tests:249 passed, 0 failed, 3 ignored(223bin includingconfig::tests::pool_memory_configuration_and_flag_precedence,9cache_commands,6cli,4inspect,7unverified_payload).CUDA_VISIBLE_DEVICES="" pytest tests/cli tests/preparation/test_execution.py -q:260 passed, 0 failed, including[memory] pool_vram/pool_ramvalidation,test_python_config_schema_matches_rust_configuration, andtest_async_transfer_channel_rejects_external_extents_alignment_above_container_alignment.CUDA_VISIBLE_DEVICES="" pytest tests/preparation/test_runtime_core.py tests/preparation/test_core_boundary.py -q:26 passed, 14 skipped(CUDA/optional fixtures).#[ignore]/FLARE_RUN_CUDA_TESTS), live multi-host GPU export and serving withexternal_extents, and the 6 external-template frontend tests were not run locally; GitHub Actions workflows will run the full template-populated Linux/Windows native-serving, Python CPU, and Helios lifecycle suites.Discord: lukealonso