Repository navigation
heliopause: skip digest and fsync on disposable export spans - #587
Draft
FujitsuPolycom wants to merge 1 commit into
Draft
FujitsuPolycom wants to merge 1 commit into
FujitsuPolycom wants to merge 1 commit into
Conversation
voipmonitor
reviewed
Nov 28, 2026
voipmonitor
left a comment
Collaborator
There was a problem hiding this comment.
Draft Review & Test Report (commit bcd28e8d)
Verdict: Approve once out of draft (minor items & rebase coordination with #586) — durability and integrity are sound.
Automated Test Results
cargo test --locked --release --manifest-path heliopause/Cargo.toml --lib(default parallel threads) — 209 passed, 0 failed.
Integrity & Durability Check
- Verified that
materialize_spanis private toheliopause/src/export/core.rswith exactly two non-test callers (cubins atcore.rs:1862and graphs atcore.rs:1913), both writing solely intopublish_payload's private.flare-payload-*TempDirforPublishResource. helios/src/core/export.rsalways re-readsPublishResource.paththroughcompress_stream(hashing every plaintext chunk into signedchunk_sha256, zstd-compressing, callingsync_all()on.sealing-{rank}, and verifying + syncing viainstall_path_bytes), then deletes the entireTempDiron return or error.BufWritercloses beforefs::remove_file(&path)on read/write/flush errors (Windows-safe).
Minor Items Before Ready/Merge
- [Merge coordination] Directly conflicts with
#586indocs/runtime-core-design.md:323,heliopause/src/export/core.rs:2077(materialize_span), and the test insertion point inmod packing_metadata_tests. Please rebase cleanly with#586so#587's no-digest/no-fsyncmaterialize_spanwins while#586's cleanup removingfn materializestays intact. - [Minor] Replace the internal fork PR reference
Split out from #30in the PR description with#586. - [Nit] Hoist
use std::io::{Read, Seek, Write};out of thefor pieceloop (core.rs:2092) and consider placing the new test inmod payload_export_tests.
Why: During rank executable assembly, `materialize_span` extracted disposable uncompressed graph and cubin spans through the durable payload materializer, computing a standalone SHA-256 digest and calling `fsync` on temporary files whose digest was immediately discarded before archive sealing. What: Before: `materialize_span` called `materialize`, hashing every temporary span and syncing its temporary file to disk before rank archive sealing. After: `materialize_span` copies span pieces through a bounded 4 MiB `BufWriter`, flushes buffered bytes via `into_inner()`, removes the temporary file if reading or flushing fails, and leaves compression, hashing, and `fsync` to rank archive and final core publication. Existing signed runtime cores and wire schemas remain unchanged. Result: Temporary cubin and graph extraction avoids redundant SHA-256 passes and per-span `fsync` barriers while keeping final executable and core durability syncs intact. Live GPU export throughput has not yet been measured on this revision. Evidence: - `cargo test --locked --release --manifest-path helios/Cargo.toml --features runtime-core,server --lib core::`: 484 passed, 11 ignored, 0 failed. - `cargo test --locked --release --manifest-path heliopause/Cargo.toml --lib`: 209 passed, 5 ignored, 0 failed. - `pytest -q -rs tests/preparation/test_core_boundary.py tests/test_design_review_hook.py`: 22 passed. - End-to-end GPU export timing and Windows native export remain unverified on this revision. Discord: Dooner Design-Signed-Off-By: Antigravity (Gemini 4); design-review=c3a9 Signed-off-by: FujitsuPolycom <[email protected]>
FujitsuPolycom
force-pushed
the
perf/heliopause-skip-disposable-span-fsync
branch
from
November 28, 2026 23:42
bcd28e8 to
38876f6
Compare
Contributor
Author
|
@voipmonitor Addressed at
Could you take another look at |
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
During rank executable assembly,
materialize_spanextracted disposable uncompressed graph and cubin spans intopublish_payload's private temporary directory through the durable payload helper (materialize), computing a standalone SHA-256 digest that was immediately discarded and issuing a per-spanfsyncbefore rank archive sealing re-read, compressed, hashed, and synced the archive.What changed
heliopause/src/export/core.rs&docs/runtime-core-design.md:materialize_spandelegated tomaterialize, hashing each temporary uncompressed cubin or graph span and callingsync_all()on the temporary file before archive compression.materialize_spancopies source pieces through a bounded 4 MiBBufWriter(4 KiB..=4 MiB), flushes buffered writes viainto_inner(), and unlinks the temporary file on read, write, or flush error. Rank executable sealing (compress_stream+sync_all()on.sealing-{rank}+install_path_bytes) and final core publication retain full chunk-digest authentication andfsyncdurability. Split out from heliopause, helios: parallelize Engram plane assembly in core export #586.Claimed benefit and result
fsyncbarriers on disposable cubin and graph staging files while preserving exact span bytes, error cleanup, and final archive durability.Supporting evidence and limitations
Tested at candidate commit
38876f608aab29a38149867782d34a9f0ee4635fonmain(ba3afb13a7e9836080c23eadf8e1c17ee96e6e7a) in non-root Linux (uid=1000):cargo test --locked --release --manifest-path helios/Cargo.toml --features runtime-core,server --lib core::: 484 passed, 11 ignored, 0 failed.cargo test --locked --release --manifest-path heliopause/Cargo.toml --lib: 209 passed, 5 ignored, 0 failed (0 compiler warnings).disposable_span_materialization_preserves_bytes_and_cleans_up_failed_flushesinmod payload_export_testsverifies multi-part span byte preservation and/dev/fullENOSPCflush cleanup.pytest -q -rs tests/preparation/test_core_boundary.py tests/test_design_review_hook.py: 22 passed.ba3afb13a7e9836080c23eadf8e1c17ee96e6e7aso heliopause: skip digest and fsync on disposable export spans #587 is not gated on heliopause, helios: parallelize Engram plane assembly in core export #586's large-Engram benchmark.docs/runtime-core-design.mdandmod payload_export_testsauto-merge without conflict; whichever PR lands second resolves a single hunk infn materialize_span(heliopause/src/export/core.rs) by keeping heliopause: skip digest and fsync on disposable export spans #587's no-digest/no-fsyncBufWriterimplementation alongside heliopause, helios: parallelize Engram plane assembly in core export #586'smaterialize_piecesandfn materializeremoval (verified together at 484 passed inhelioscore::and 212 passed, 0 warnings inheliopause).Discord: Dooner