8000 fix(minimald): reuse the compose-time graph names in the finalize package check by gominimal-aw-bot[bot] · Pull Request #2304 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

fix(minimald): reuse the compose-time graph names in the finalize package check - #2304

Merged
norrietaylor merged 2 commits into
mainfrom
inbox-patch/fix/minimald-reuse-compose-graph-e063bf3d954ffa05
Oct 18, 2026
Merged

norrietaylor merged 2 commits into
mainfrom
inbox-patch/fix/minimald-reuse-compose-graph-e063bf3d954ffa05

Conversation

@gominimal-aw-bot
@gominimal-aw-bot gominimal-aw-bot Bot commented Oct 17, 2026 •
Copy link
Copy Markdown
Contributor

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_compose now returns the package names its own graph resolution produced, the actor captures them at configure_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 a Duration::ZERO deadline 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 of main (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.
  • CI lane: crates/minimald/** is covered by the native-daemon-e2e and test-kvm lanes.

Summary by CodeRabbit

  • Bug Fixes
    • Composition checks now recognize packages identified during loadout configuration, including when the composition graph does not need to be re-evaluated.
    • Expired time limits are now respected before package checks begin. Compositions containing unknown packages continue to be skipped when the check’s time limit has expired.

…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>
@gominimal-aw-bot
gominimal-aw-bot Bot requested a review from a team as a code owner October 17, 2026 14:14
@gominimal-aw-bot gominimal-aw-bot Bot added the agent:fix Agentic fix PR eligible for review iteration; min-aw's worker-iterate gates on it. label Oct 17, 2026
@coderabbitai
coderabbitai Bot commented Oct 17, 2026 •
Copy link
Copy Markdown
Contributor

Review in Change Stack →

Warning

Review limit reached

  • Run on-demand review

This review includes 5 billable files and costs up to $1.25.

Or wait 39 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available. Your 56 included PR review attempts over the past 7 days set your current allowance at 2 reviews per hour.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: ff007ad9-5d6f-4eff-8853-6b37cf638b28
📥 Commits

Reviewing files that changed from the base of the PR and between cccbbd0 and fd1e742.

📒 Files selected for processing: 5
  • crates/minimald/src/box_actor.rs
  • crates/minimald/src/box_actor/kind.rs
  • crates/minimald/src/box_manager.rs
  • crates/minimald/src/box_manager/composables.rs
  • crates/minimald/src/env.rs

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: ceb3e029-09c5-4c30-9a13-2fadbd446d57
📥 Commits

Reviewing files that changed from the base of the PR and between 11b0b44 and cccbbd0.

📒 Files selected for processing: 3
  • crates/minimald/src/box_actor.rs
  • crates/minimald/src/box_manager.rs
  • crates/minimald/src/box_manager/composables.rs

Included review availability: This review used your included allowance. 3 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 5 reviews per hour.

📝 Walkthrough

run_compose now returns package names from the resolved graph. BoxActor retains those names for package checks, which measure the deadline before validation and use graph evaluation as a fallback when names were not captured.

Changes: Composed Package Validation

Layer / File(s) Summary
Capture graph package names
crates/minimald/src/box_manager/composables.rs, crates/minimald/src/box_actor.rs
run_compose returns optional graph package names. configure_loadout stores them on BoxActor for later checks.
Check package names within the time budget
crates/minimald/src/box_actor.rs, crates/minimald/src/box_manager.rs
check_composed_packages checks the deadline before validating package names. It uses captured names when available and retains graph evaluation as a fallback. Comments describe the deadline behavior and fallback.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Suggested reviewers: norrietaylor, twitchyliquid64

Merge Risk: ⚪ Minimal · up to cccbb

The change reuses package names from composition instead of re-evaluating the graph, and keeps the original path as a fallback. No concrete merge-blocking risk was found.

Pre-merge checks: Passed 5
Check name Status Explanation
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 3 files.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly and concisely describes the main change: reusing compose-time graph names during the finalize package check.
Description check Passed The description explains the change, motivation, fallback behavior, expiry handling, and verification results. It does not use the template headings exactly and omits the checklist, but it is substant…
Full details: Description check

Explanation

The description explains the change, motivation, fallback behavior, expiry handling, and verification results. It does not use the template headings exactly and omits the checklist, but it is substantially complete.

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the names in view,
Then checks the clock before it’s through.
If names were saved, they guide the way,
If not, the graph has more to say.
Hop, hop—the check steps on its way!

Comment @coderabbitai help to get the list of available commands.

@gominimal-aw-bot gominimal-aw-bot Bot added the agent:resolve Consent gate: pr-conflict-resolver may rewrite this branch label Oct 17, 2026
@norrietaylor norrietaylor changed the title fix: fix(minimald): reuse the compose-time graph names in the finalize package check fix(minimald): reuse the compose-time graph names in the finalize package check Oct 18, 2026
…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.
@norrietaylor
Copy link
Copy Markdown
Member

/review

@minimal-foundry
minimal-foundry Bot commented Oct 18, 2026 •
Copy link
Copy Markdown
Contributor

Approved: no findings at fd1e7420b8be.

Nothing to do.

Clobber: none: git log on both box_actor.rs and composables.rs shows the two commits of this PR and two prior renames, no reverted fix.

@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

< 8000 /option>

minimal-review — advisory review

Verdict COMMENT — No findings.

Panel: 1 of 3 personas ran (correctness); did not complete: security, supply-chain.

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Oct 18, 2026
@norrietaylor norrietaylor left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved on ARCH PASS at fd1e742.

@norrietaylor
norrietaylor added this pull request to the merge queue Oct 18, 2026
Merged via the queue into main with commit b45039a Oct 18, 2026
47 of 51 checks passed
@norrietaylor
norrietaylor deleted the inbox-patch/fix/minimald-reuse-compose-graph-e063bf3d954ffa05 branch October 18, 2026 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent:fix Agentic fix PR eligible for review iteration; min-aw's worker-iterate gates on it. agent:resolve Consent gate: pr-conflict-resolver may rewrite this branch review:approved minimal-review approved the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0