Skip to content

core,hub,heliopause,ignition: decouple signed bodies, single-pass export, slice synthesis, and HF LFS SHA-256 - #618

Merged
lukealonso merged 1 commit into
mainfrom
large-tp-core-packaging-hub-lfs-inte
Nov 29, 2026
Merged

lukealonso merged 1 commit into
mainfrom
large-tp-core-packaging-hub-lfs-inte

Conversation

@lukealonso

Copy link
Copy Markdown
Collaborator

Why

Four packaging, export, and download defects block shipping and updating large multi-rank model cores (such as TP8 and TP16 MoE models) and weaken download integrity:

  1. Unverified Hugging Face tree-API LFS downloads and unsafe blob adoption (flare/src/hub.rs): When Hugging Face transfers are planned through the tree API, fetch_tree_identities stores each Git-LFS entry's bare 64-hex lfs.oid SHA-256 digest in FileIdentity.etag without a sha256: prefix. Downstream verification (content_digest) requires a sha256: prefix so opaque HTTP ETags are not assumed to be digests, causing it to return None for every tree-API LFS file. As a result, transfer_blob_with_streams disables SHA-256 verification and fetch_file_with_identity_and_streams skips blob_matches on cached transport blobs. Separately, Transport::adopt_complete copies legacy cache blobs without locking <key>.lock, falls back to renaming over an existing complete blob on AlreadyExists, and creates .adopt-* temporary files that do not match the .<key>.adopt-* pattern reclaimed by flare::download_cache.
  2. Monolithic 128 MiB ProtectedCore envelope limit (helios/proto/core.proto, helios/src/core/protection.rs): Helios permits up to 1 GiB of reconstructed rank metadata across selected ranks (MAX_SELECTED_RANK_METADATA), and each rank of a large multi-rank MoE core can serialize tens of megabytes of graph and weight-catalog metadata. However, ProtectedCore inlines every SignedDeployment.body and SignedRank.body into a single flare.manifest tensor capped at MAX_ENVELOPE = 128 MiB, preventing publication of cores whose combined deployment and rank bodies exceed 128 MiB.
  3. Duplicate device-to-host weight reads, uncached staging collisions, and peak capture host RAM (heliopause/src/export/{capture,core}.rs, ignition/preparation/{aot,capture}.py): Cached weight capture in resolve_weight_payload scans every group's GPU blocks once in scan_group_blocks to hash and size non-zero blocks, then calls Root::insert_payload over ElidedBlocks to read the same GPU memory over PCIe a second time (including on cache hits and --no-weights exports). In uncached export, materialize_payload_spans opens rank-{rank}-{base}.payload with File::create, so a layer carrying both a stable group (layer-000) and a tuned group (layer-000:tuned) truncates the already-pinned stable staging file in place. During graph preparation, ForwardCache.prepare_many and capture_forwards retain all deserialized BoundForward objects, Dynamo guard trees, StorageBackend descriptors, and loaded CUDA modules across the entire catalog simultaneously, multiplying host RAM usage across ranks on the same host.
  4. Full weight re-downloads after minor layer-layout edits (helios/src/core/cache.rs, flare/src/hub.rs): When a republished model core removes, reorders, or renames a weight tensor inside a layer payload, the layer's PayloadId changes even though the remaining tensor bytes are identical. Because acquisition planning only reuses exact PayloadId matches and in-core derivations, flare download re-downloads every shifted weight companion over HTTP even when a prior core for the same model is installed locally with its PreparedWeightCatalog.

What changed

  • Hugging Face LFS SHA-256 verification and blob adoption (flare/src/hub.rs):
    • Before: FileIdentity carried only etag; content_digest returned None for bare lfs.oid digests; Transport::adopt_complete wrote .adopt-* temporary files without acquiring <key>.lock and renamed over existing blobs on AlreadyExists.
    • After: Added sha256: Option<[u8; 32]> to FileIdentity, populated from entry.lfs.oid via parse_sha256_hex in fetch_tree_identities and from content_digest(&etag) in file_identity_with_agent (preserving opaque bare-hex HTTP ETags). Updated pending_network_from_identities, fetch_file_with_identity_and_streams (blob_matches and adopt_hub_file), and transfer_blob_with_streams to verify against metadata.sha256(). Updated Transport::adopt_complete to acquire a non-blocking exclusive lock on <key>.lock before checking destination.exists() and call publish_copy(..., replace = false) so existing complete blobs are never overwritten; publish_copy names temporaries .<key>.adopt-<pid>-<n> so download_cache::reclaim collects crash orphans.
  • External signed deployment and rank bodies (helios/proto/core.proto, helios/src/core/{protection,reader,export,cache,conversion}.rs, helios/src/core/conversion/edit.rs, helios/src/runtime_core/{protection,metadata}.rs, heliopause/src/export/weight_reuse.rs, flare/src/{cache_support,trust,hub}.rs, flare-cli/src/orbit/controller.rs, docs/core-format-design.md, docs/runtime-core-design.md):
    • Before: Every SignedDeployment and SignedRank stored serialized protobuf bytes inline inside flare.manifest (<= 128 MiB combined), and export.rs assembled model.safetensors into one heap Vec<u8>.
    • After: Added ExternalBody { sha256, stored_nbytes, decoded_nbytes }, SignedDeployment.external_body, and SignedRank.external_body in core.proto, stored as deduplicated flare.body.<sha256> U8 tensors in model.safetensors (single-frame zstd level 3, window <= 8 MiB, stored and decoded lengths each <= 128 MiB, mutually exclusive with inline body). EnvelopeBuilder::sign_envelope keeps envelopes <= 128 MiB inline and spills deployment and rank bodies to flare.body.<sha256> when inline serialization would exceed 128 MiB, while preserving flare-package-signature-v5 Ed25519 signatures and parent commitments over the exact decoded protobuf bytes. verify_metadata and verify_with_bodies check the 1 GiB MAX_SELECTED_RANK_METADATA aggregate cap across selected ranks before decompressing any external body or compressed weight catalog and verify each compressed frame's SHA-256 before decompression. export.rs streams model.safetensors directly to disk (write_primary_to_file). Updated cache copy/readiness/conversion/edit, unverified inspection (enforcing the aggregate cap before decompressing selected ranks), --reuse-weights serialization, Hub/trust verification, and Orbit's mirrored_ranges to handle flare.body.* tensors.
    • Compatibility: Existing inline v2 cores (body populated, external_body absent) continue to verify and load without re-export or re-signing. Newly exported cores whose inline envelope fits within 128 MiB continue to emit inline bodies unchanged.
  • Single-pass cached weight capture, uncached staging disambiguation, and streaming forward capture (helios/src/core/cache.rs, heliopause/src/export/{capture,core}.rs, ignition/preparation/{aot,capture}.py, tests/preparation/test_preparation_reclamation.py):
    • Before: Cached weight capture read every group's device blocks twice (scan_group_blocks followed by Root::insert_payload over ElidedBlocks); uncached export opened rank-{rank}-{base}.payload with File::create; ForwardCache.prepare_many and capture_forwards held every live BoundForward and full StorageBackend across the entire preparation and capture lifecycle.
    • After: Added Root::verified_payload (verifying length and on-disk SHA-256 without re-reading caller streams) and Root::capture_streaming_payload (reserving a 4,096-byte prefix, streaming and hashing unknown-length bytes in one pass, discarding staging on verified hits, or backfilling the deterministic 4,096-byte companion header at offset 0 and publishing via publish_verified_payload on misses). Replaced the two-pass loop in heliopause/src/export/capture.rs with single-pass capture_group_into_cache (one read pass and zero staging writes for --no-weights weight groups; one read pass for normal exports). Qualified uncached staging files in heliopause/src/export/core.rs as rank-{rank}-{stable|tuned}-{base}.payload opened with create_new(true). Added DeferredCompiledForward, StorageBackend.retire_after_capture() (stripping _bound, inputs, signature, invocations, _serialized_artifact, artifact, and cubin_raw while preserving _cuda_allocation_sizes and retaining loaded StaticallyLaunchedTritonKernel and native library owners), and stream=True on ForwardCache.prepare_many / _prepare_many / _prepare_ranks; capture_forwards holds the publication lock and materializes, captures, and retires one compiled forward at a time when retain_forwards=False.
  • Local slice-level weight synthesis during download (helios/src/core/synthesis.rs, helios/src/core/{mod,cache}.rs, flare/src/hub.rs):
    • Before: plan_acquisition_with only reused exact cached PayloadIds and in-core derivations.
    • After: Added model-agnostic local slice synthesis in helios/src/core/synthesis.rs, wired into Root::plan_acquisition_for_model (called by plan_acquisition_with and flare/src/hub.rs::plan_payload_acquisition). For missing remote weight or tuned-weight payloads, acquisition planning leases installed donor entries for the same model (skipping conflicting non-empty checkpoint_revisions and preferring matching revisions and (tensor_parallel, rank)), matches target PreparedWeightCatalog views against donor views by exact layout or declared checkpoint sources, handles zero-elided donor subranges and bounded (<= 64 KiB) alignment gaps, coalesces contiguous copy and zero-fill segments, probes 3 representative payloads early when more than 8 candidates exist, and streams 8 MiB chunks across up to 16 parallel workers (with Linux posix_fadvise and AcquisitionProgress accounting and cooperative cancellation). A synthesized blob is published via publish_verified_payload and removed from remote_files() only when its SHA-256 matches the target's signed PayloadId; any gap, error, or digest mismatch falls back transparently to HTTP download.

Claimed benefit and observed result

  • Expected impact on large-TP packaging and downloads: Multi-rank and multi-deployment cores with aggregate rank metadata between 128 MiB and 1 GiB can be published, mirrored over Orbit, cached, and loaded without hitting the 128 MiB per-tensor limit; cached and --no-weights GPU exports cut weight D2H passes in half (one pass instead of two); streaming forward capture bounds peak unretired compiled forwards to one per rank; and local slice synthesis eliminates HTTP re-downloads of shifted weight layers when a compatible prior core is installed locally. Live multi-GPU export memory and download throughput on whole checkpoints are not measured in this PR.
  • Observed in CPU contract and integration tests:
    • Tree-API LFS downloads verify both downloaded and cached blobs by lfs.oid SHA-256, and adopt_complete locks <key>.lock, preserves existing complete blobs, and writes reclaimable .<key>.adopt-* temporary files.
    • External-body envelopes spill and round-trip a 3-rank ~138 MiB core under the default 128 MiB MAX_ENVELOPE limit while rejecting tampered compressed frames, dual inline+external bodies, trailing zstd bytes, and >1 GiB aggregate declarations before decompression.
    • capture_group_into_cache reads every source block once (3 reads instead of 6 for a 3-block fixture) across cold misses, warm hits, and --no-weights hits (with zero staging transactions under --no-weights), and mixed stable+tuned uncached groups publish distinct intact companions.
    • Streamed prepare_many frees each warmed BoundForward (verified via weakrefs) before warming the next, capture_forwards holds peak unretired live forwards at 1, and StorageBackend.retire_after_capture() strips compilation metadata while retaining loaded kernel owners.
    • End-to-end Hub downloads synthesize a shifted weight layer locally with zero HTTP requests for weights/layer-000.safetensors and fall back to HTTP when a single weight byte changes.

Evidence and limitations

Validated at commit 3a57a707 on Linux x86_64 (CPU fixtures, ulimit -l unlimited):

  • cargo test --locked --release --manifest-path helios/Cargo.toml --features runtime-core,server --target-dir flare-cli/target --lib -- core:: runtime_core::: 496 passed, 0 failed, 12 ignored (includes 3 new core::protection::tests::external_body_* tests, core::cache::selection_tests::capture_streaming_payload_handles_miss_hit_empty_corruption_and_error, and 3 new core::synthesis::tests::* tests covering shifted/renamed/zero-elided synthesis from external-body donors, mismatch/revision fallback, and segment coalescing).
  • cargo test --locked --release --manifest-path helios/Cargo.toml --features runtime-core,server --target-dir flare-cli/target --lib: 1,724 passed, 45 ignored, 6 failed (all 6 failures are frontend template tests requiring FLARE_TEST_TEMPLATE_DIR).
  • cargo test --locked --release --manifest-path helios/Cargo.toml --features runtime-core,server --target-dir flare-cli/target --test unverified_empty: 1 passed, 0 failed.
  • cargo test --locked --release --manifest-path flare/Cargo.toml --target-dir flare-cli/target: 245 passed, 0 failed, 4 ignored (237 unit tests including tree_api_lfs_verifies_downloaded_and_cached_blobs_by_sha256, adopt_complete_locks_preserves_existing_blob_and_uses_collectible_temp_name, and download_synthesizes_shifted_weight_layer_locally_without_fetching_it; 7 packed_canonical_download; 1 reference_workflows).
  • PYO3_PYTHON=.venv/bin/python cargo test --locked --release --manifest-path heliopause/Cargo.toml --target-dir flare-cli/target --lib: 213 passed, 0 failed, 6 ignored (including capture_group_into_cache_reads_source_once_for_miss_hit_and_no_weights and uncached_mixed_stable_and_tuned_groups_do_not_overwrite_each_other).
  • cargo test --locked --release --manifest-path flare-cli/Cargo.toml --test cache_commands --test cli --test inspect --test unverified_payload and cargo build --locked --release --manifest-path flare-cli/Cargo.toml: 24 passed, 0 failed (cache_commands 7, cli 6, inspect 4, unverified_payload 7); release binary built cleanly.
  • cargo test --locked --release --manifest-path flare-cli/Cargo.toml --bin flare: 201 passed, 3 ignored, 1 failed (unrelated pre-existing failure in untouched distribution::tests::source_waits_for_receiver_file_verification, BrokenPipe after 130 s idle wait; all orbit::controller::tests including updated mirrored_ranges_follow_each_core_carrier passed).
  • eos (2 passed), selene (548 passed), selene-manager (187 lib + 3 builder + 82 client passed; 3 unrelated pre-existing failures in untouched selene-manager/tests/client.rs TCP/TLS loopback relay tests: a_host_record_is_relayed_between_two_instances_on_other_hosts_over_tcp, a_record_put_into_a_manager_on_another_host_is_restored_over_tcp, a_record_put_into_a_manager_on_another_host_is_restored_over_tls).
  • Python (with PYTHONPATH set to the worktree): tests/cli (133 passed), tests/test_design_review_hook.py (18 passed), targeted tests/preparation (56 passed, including new streaming and retirement tests in tests/preparation/test_preparation_reclamation.py), tests/preparation/test_runtime_static_triton.py standalone (28 passed), full tests/preparation (1,148 passed, 74 CUDA-gated skipped, 2 environment failures: test_installation_does_not_write_dependency_sources due to prior test initializing torch.cuda in the shared process and test_heliopause_build_source_identity_matches_workspace_sources because the preinstalled flare_heliopause wheel in .venv was built from the base tree), and tests/test_compilation.py (43 CUDA-gated skipped).

Limitations:

  • CUDA-gated GPU graph capture and export tests (FLARE_RUN_CUDA_TESTS=1, FLARE_RUN_TP_CUDA_TESTS=1) and live multi-rank ignition export / flare run runs were not executed in this CPU test pass.
  • Frontend template tests requiring FLARE_TEST_TEMPLATE_DIR, rebuilt flare_heliopause wheel source-identity tests, and Windows builds/tests were not executed.

Discord: lukealonso

…ort, slice synthesis, and HF LFS SHA-256

Why:

Four packaging, export, and download defects block shipping and updating large
multi-rank model cores (such as TP8 and TP16 MoE models) and weaken download
integrity:

1. Unverified Hugging Face tree-API LFS downloads and unsafe blob adoption:
   `fetch_tree_identities` in `flare/src/hub.rs` stores each Git-LFS entry's
   bare 64-hex `lfs.oid` SHA-256 digest in `FileIdentity.etag` without a
   `sha256:` prefix. Downstream verification (`content_digest`) requires a
   `sha256:` prefix so opaque HTTP ETags are not assumed to be digests, causing
   it to return `None` for every tree-API LFS entry and silently disabling
   SHA-256 verification on downloaded and cached LFS blobs. Separately,
   `Transport::adopt_complete` copies legacy blobs without locking `<key>.lock`,
   falls back to renaming over an existing complete blob on `AlreadyExists`, and
   writes `.adopt-*` temporary files that do not match the `.<key>.adopt-*`
   pattern reclaimed by `flare::download_cache`.
2. Monolithic 128 MiB `ProtectedCore` envelope limit: `helios/src/core/schema.rs`
   allows up to 1 GiB of reconstructed rank metadata across selected ranks
   (`MAX_SELECTED_RANK_METADATA`), yet `ProtectedCore` inlines every
   `SignedDeployment.body` and `SignedRank.body` into one `flare.manifest`
   tensor capped at `MAX_ENVELOPE = 128 MiB`, blocking publication of large
   multi-rank or multi-deployment cores.
3. Duplicate device-to-host weight reads, uncached staging collisions, and peak
   capture host RAM: `resolve_weight_payload` in `heliopause/src/export/capture.rs`
   reads every weight group from GPU memory twice (once in `scan_group_blocks`
   and again through `Root::insert_payload`), even on cache hits and
   `--no-weights` exports; `materialize_payload_spans` in
   `heliopause/src/export/core.rs` opens `rank-{rank}-{base}.payload` with
   `File::create`, truncating an already-pinned stable layer file in place when
   the same layer also has a `:tuned` group; and `ForwardCache.prepare_many`
   plus `capture_forwards` retain every compiled `BoundForward`, Dynamo guard
   tree, `StorageBackend` descriptor set, and loaded CUDA module across the
   entire catalog simultaneously.
4. Full weight re-downloads after minor layer-layout edits: removing, reordering,
   or renaming a weight tensor inside a layer payload changes that layer's
   `PayloadId` even when remaining tensor bytes are unchanged, causing
   `flare download` to re-download every shifted weight file over HTTP despite
   an earlier core for the same model being installed locally with its
   `PreparedWeightCatalog`.

What changed:

- Hugging Face LFS SHA-256 verification and adoption (`flare/src/hub.rs`):
  - Before: `FileIdentity` carried only `etag`; `content_digest` returned `None`
    for bare `lfs.oid` strings; `adopt_complete` wrote `.adopt-*` temporaries
    without locking `<key>.lock` and renamed over existing complete blobs.
  - After: Added `sha256: Option<[u8; 32]>` to `FileIdentity`, populated from
    `entry.lfs.oid` via `parse_sha256_hex` in `fetch_tree_identities` and from
    `content_digest(&etag)` in HTTP probes (keeping opaque HTTP ETags unassumed).
    Updated `pending_network_from_identities`, `fetch_file_with_identity_and_streams`,
    and `transfer_blob_with_streams` to verify against `metadata.sha256()`.
    Updated `Transport::adopt_complete` to take a non-blocking exclusive lock on
    `<key>.lock` and call `publish_copy(..., replace = false)` so existing
    complete blobs are never replaced, with collectible temporary names
    `.<key>.adopt-<pid>-<n>`.
- External signed deployment and rank bodies (`helios/proto/core.proto`,
  `helios/src/core/{protection,reader,export,cache,conversion}.rs`,
  `helios/src/core/conversion/edit.rs`, `helios/src/runtime_core/{protection,metadata}.rs`,
  `heliopause/src/export/weight_reuse.rs`, `flare/src/{cache_support,trust,hub}.rs`,
  `flare-cli/src/orbit/controller.rs`, `docs/core-format-design.md`,
  `docs/runtime-core-design.md`):
  - Before: `SignedDeployment` and `SignedRank` always stored protobuf bytes
    inline inside `flare.manifest` (`<= 128 MiB`), and `export.rs` buffered
    `model.safetensors` in a single `Vec<u8>`.
  - After: Added `ExternalBody { sha256, stored_nbytes, decoded_nbytes }`,
    `SignedDeployment.external_body`, and `SignedRank.external_body` backed by
    deduplicated `flare.body.<sha256>` U8 tensors in `model.safetensors`
    (single-frame zstd level 3, window `<= 8 MiB`, stored and decoded lengths
    each `<= 128 MiB`, mutually exclusive with inline `body`).
    `EnvelopeBuilder::sign_envelope` keeps envelopes `<= 128 MiB` inline and
    spills deployment/rank bodies when inline serialization would exceed 128 MiB,
    preserving `flare-package-signature-v5` Ed25519 signatures and parent
    commitments over exact decoded bytes. `verify_metadata` and
    `verify_with_bodies` enforce the 1 GiB `MAX_SELECTED_RANK_METADATA` cap
    before decompressing external bodies or compressed weight catalogs and check
    compressed SHA-256 before decompression. `export.rs` streams
    `model.safetensors` directly to disk. Updated cache, conversion, edit,
    unverified inspection (enforcing the aggregate cap before decompressing
    selected ranks), `--reuse-weights`, Hub/trust verification, and Orbit
    `mirrored_ranges`.
  - Compatibility: Inline v2 cores load and verify unchanged without re-export
    or re-signing; cores whose inline envelope fits within 128 MiB continue to
    be emitted inline.
- Single-pass weight capture, uncached staging fix, and streaming capture
  (`helios/src/core/cache.rs`, `heliopause/src/export/{capture,core}.rs`,
  `ignition/preparation/{aot,capture}.py`,
  `tests/preparation/test_preparation_reclamation.py`):
  - Before: Cached weight capture read GPU spans twice (`scan_group_blocks` plus
    `insert_payload`); uncached export used `File::create` on
    `rank-{rank}-{base}.payload`; `ForwardCache.prepare_many` and
    `capture_forwards` held all live `BoundForward` objects and full
    `StorageBackend` metadata simultaneously.
  - After: Added `Root::verified_payload` and `Root::capture_streaming_payload`
    (reserving a 4,096-byte prefix, hashing and streaming in one pass,
    discarding staging on verified hits, or backfilling the deterministic
    companion header at offset 0 on misses) and wired single-pass
    `capture_group_into_cache` in `heliopause/src/export/capture.rs`. Named
    uncached staging files `rank-{rank}-{stable|tuned}-{base}.payload` with
    `create_new(true)`. Added `DeferredCompiledForward`,
    `StorageBackend.retire_after_capture()` (stripping `_bound`, `inputs`,
    `signature`, `invocations`, `_serialized_artifact`, `artifact`, and
    `cubin_raw` while preserving `_cuda_allocation_sizes` and retaining loaded
    `StaticallyLaunchedTritonKernel` and native library owners), and
    `stream=True` in `ForwardCache.prepare_many` / `_prepare_many` /
    `_prepare_ranks`; `capture_forwards` holds the publication lock and
    materializes, captures, and retires one forward at a time when
    `retain_forwards=False`.
- Local slice-level weight synthesis (`helios/src/core/synthesis.rs`,
  `helios/src/core/{mod,cache}.rs`, `flare/src/hub.rs`):
  - Before: `plan_acquisition_with` only reused exact cached `PayloadId`s and
    in-core derivations.
  - After: Added model-agnostic slice synthesis in `helios/src/core/synthesis.rs`,
    invoked by `Root::plan_acquisition_for_model`. For missing remote weight or
    tuned-weight payloads, planning leases installed donor entries for the same
    model (skipping conflicting non-empty `checkpoint_revision`s and preferring
    matching revisions and `(tensor_parallel, rank)`), matches target
    `PreparedWeightCatalog` views by exact layout or declared checkpoint
    `sources`, handles zero-elided donor subranges and bounded (`<= 64 KiB`)
    alignment gaps, coalesces contiguous copy/zero segments, probes 3
    representative payloads early when `> 8` candidates exist, and streams 8 MiB
    chunks across up to 16 parallel workers with Linux `posix_fadvise` and
    `AcquisitionProgress` accounting and cancellation. Synthesized blobs are
    published and removed from `remote_files()` only on exact SHA-256 match
    against the target's signed `PayloadId`; any gap or mismatch falls back to
    HTTP download.

Claimed benefit and observed result:

- Expected impact on large-TP workflows: removes the 128 MiB envelope limit for
  multi-rank/multi-deployment cores up to the 1 GiB aggregate rank budget, cuts
  cached and `--no-weights` GPU weight D2H passes from two to one, bounds peak
  unretired compiled forwards during capture to one per rank, and avoids
  re-downloading shifted weight layers when a compatible prior core is installed
  locally. End-to-end multi-GPU export memory and download throughput on live
  checkpoints are not measured here.
- Observed in CPU tests: tree-API LFS blobs are verified by `lfs.oid` SHA-256
  and `adopt_complete` locks `<key>.lock`, preserves existing blobs, and writes
  reclaimable temp files; external-body envelopes spill and verify a 3-rank
  ~138 MiB core under the default 128 MiB limit while rejecting tampering, dual
  bodies, trailing zstd bytes, and >1 GiB declarations before decompression;
  `capture_group_into_cache` reads each source block once across cold misses,
  warm hits, and `--no-weights` hits (with zero staging transactions under
  `--no-weights`); mixed stable+tuned uncached groups publish distinct intact
  companions; streamed `prepare_many` and `capture_forwards` collect each warmed
  forward before loading the next and maintain peak live unretired forwards at 1;
  and end-to-end Hub downloads synthesize shifted weight layers with zero HTTP
  requests for the shifted layer and fall back to HTTP on weight mutations.

Evidence and limitations:

Validated on Linux x86_64 (CPU fixtures, `ulimit -l unlimited`):
- `helios --lib -- core:: runtime_core::`: 496 passed, 0 failed, 12 ignored.
- `helios --lib` (full): 1,724 passed, 45 ignored, 6 failed (all 6 require
  `FLARE_TEST_TEMPLATE_DIR`).
- `helios --test unverified_empty`: 1 passed, 0 failed.
- `flare` (lib + `packed_canonical_download` + `reference_workflows`): 245
  passed, 0 failed, 4 ignored.
- `heliopause --lib`: 213 passed, 0 failed, 6 ignored.
- `flare-cli` (`cache_commands`, `cli`, `inspect`, `unverified_payload`, release
  build): 24 passed, 0 failed; release binary built cleanly.
- `flare-cli --bin flare`: 201 passed, 3 ignored, 1 failed (unrelated
  pre-existing failure in untouched
  `distribution::tests::source_waits_for_receiver_file_verification`).
- `eos` (2 passed), `selene` (548 passed), `selene-manager` (187 lib + 3 builder
  + 82 client passed; 3 unrelated pre-existing failures in untouched
  `selene-manager/tests/client.rs` TCP/TLS loopback relay tests).
- Python: `tests/cli` (133 passed), `tests/test_design_review_hook.py` (18
  passed), targeted `tests/preparation` (56 passed),
  `tests/preparation/test_runtime_static_triton.py` standalone (28 passed), full
  `tests/preparation` (1,148 passed, 74 CUDA-gated skipped; 2 environment
  failures from shared-process CUDA init and preinstalled `.venv` wheel mismatch),
  `tests/test_compilation.py` (43 CUDA-gated skipped).

Limitations: CUDA-gated GPU capture/export tests (`FLARE_RUN_CUDA_TESTS=1`,
`FLARE_RUN_TP_CUDA_TESTS=1`), `FLARE_TEST_TEMPLATE_DIR` frontend template tests,
rebuilt `flare_heliopause` wheel tests, and Windows builds were not run.

Design-Signed-Off-By: Antigravity (Gemini 4 Neon); design-review=2e5b
@flare-autobot

Copy link
Copy Markdown
Collaborator

A case file has been opened for 618.
Case File Intake Report

Future reviews will auto-run 90 minutes after code updates are pushed.

  • Re-review sooner: Call @flare-autobot after push.
  • Opt-out: Include #autobot:ignore in the PR or any comment.

@flare-autobot flare-autobot added area:caching Prefix/KV reuse, cache retention, and model or payload cache behavior. area:memory Memory budgets, allocation lifetimes, scratch sharing, and capacity. area:orbit Orbit host agents, orchestration, and package-cache management. area:packaging Package assembly, verification, distribution, inspection, and loading. area:preparation Ignition checkpoint loading, tuning, compilation, capture, and export. bug Something isn't working enhancement New feature or request performance Performance, latency, throughput, or memory-efficiency investigation or improvement. triage:review Proposed change needs code review; this does not imply merge readiness. labels Nov 29, 2026
@lukealonso
lukealonso merged commit e80b1f2 into main Nov 29, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:caching Prefix/KV reuse, cache retention, and model or payload cache behavior. area:memory Memory budgets, allocation lifetimes, scratch sharing, and capacity. area:orbit Orbit host agents, orchestration, and package-cache management. area:packaging Package assembly, verification, distribution, inspection, and loading. area:preparation Ignition checkpoint loading, tuning, compilation, capture, and export. bug Something isn't working enhancement New feature or request performance Performance, latency, throughput, or memory-efficiency investigation or improvement. triage:review Proposed change needs code review; this does not imply merge readiness.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants