Repository navigation
fix(minimald): reuse the compose-time graph names in the finalize package check - #2304
Merged
norrietaylor merged 2 commits intoOct 18, 2026
Conversation
Contributor
…kage check The finalize-time package check re-evaluated the project's nickel graph (~1.1 MB of retained heap per evaluation) to answer a question the compose step had already answered minutes earlier: which packages the session's graph declares. run_compose now returns the package names its own graph resolution produced, configure_loadout captures them on the actor, and the check answers membership from that capture — falling back to the original evaluation only for actors that never saw a compose (restored from disk) or whose workspace had no mfile. Expiry no longer relies on the graph evaluation being slow: tokio polls the check before its timer, so a Duration::ZERO deadline would lose the race against judging the captured names. The check now measures its own budget before any judging and steps aside deterministically. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Sorry, something went wrong.
…graph reuse Word an unknown session package through one env::unknown_package helper for both the launch lookup and the captured-names check. Judge captured names inline from a HashSet instead of a blocking-pool round-trip, log the up-front budget expiry like the timer expiry, and add tests that finalize judges the compose-time graph and that an actor without captured names still evaluates the graph and refuses.
Member
|
/review |
Sorry, something went wrong.
Contributor
|
Approved: no findings at Nothing to do. Clobber: none: |
Sorry, something went wrong.
norrietaylor
approved these changes
Oct 18, 2026
Member
There was a problem hiding this comment.
Approved on ARCH PASS at fd1e742.
Sorry, something went wrong.
norrietaylor
deleted the
inbox-patch/fix/minimald-reuse-compose-graph-e063bf3d954ffa05
branch
October 18, 2026 08:08
This was referenced Oct 18, 2026
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.
Routing-Key: inbox-route/I_kwDOSUhdos8AAAABVa6jbw
The finalize-time package check re-evaluated the project's nickel graph — the most expensive step of a compose, ~1.1 MB of retained heap per evaluation — to answer a question the compose step had already answered minutes earlier: which packages the session's graph declares.
run_composenow returns the package names its own graph resolution produced, the actor captures them atconfigure_loadout, and the check answers membership from that capture. Actors restored from disk (or with no mfile) keep the original evaluation. Expiry is now deterministic: the check measures its own budget before judging, because aDuration::ZEROdeadline loses tokio's poll-the-future-before-the-timer race against judging the captured names.Verification
cargo fmt --all --check— clean.cargo clippy --workspace --all-targets --locked -- -D warnings— clean.cargo test -p minimald— 999 passed, 11 failed. The 11 (net/switch, connection, rpc) fail identically on a clean-tree baseline run ofmain(999/11, same test names) — pre-existing sandboxed-runner flake, not a regression. All four package-check tests pass, including the zero-deadline expiry test, now deterministically.crates/minimald/**is covered by thenative-daemon-e2eandtest-kvmlanes.Summary by CodeRabbit