Repository navigation
fix(minimald): fail session activation when the project graph cannot resolve - #1890
Conversation
min session activate previously succeeded (exit 0) when the daemon could not resolve the project's package graph: the failure was downgraded to a warn! and the session came up missing every package contribution (no env_state_wiring vars, no env_dir/file_mappings patches). Surface the graph error as InvalidInput instead so activation fails loudly. - resolve_project_ctx_and_graph now returns the graph error as InvalidInput rather than ProjectResolution::MFileOnly. - Remove the MFileOnly variant and the graph-less branch in build_composables; box mctx::Context in Full to keep the enum small. - Replace the MFileOnly unit test with one asserting run_compose returns InvalidInput for a [stdlib] minimum_version = "999.0.0" workspace. - Update COMPOSITION.md to describe the hard-error behavior. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Warning Review limit reached
This review includes 4 billable files and costs up to $1.00. Or wait 44 minutes for your next included review. View limit detailsLimit details: You’ve used all 2 included reviews currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (4)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (3)
Included review availability: This review used your included allowance. 2 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. 📝 WalkthroughWalkthroughGraph-resolution failures now return ChangesGraph resolution and composition
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to Activation now fails rather than starting a session without package contributions when graph resolution fails. No actionable merge-blocking risk is established. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
A rabbit checks the graph with care, Comment |
The CLI activate fixtures declared an [upstream] with no locked_commit, which never resolves. They passed only because the daemon downgraded the graph error to MFileOnly; now that activation fails on it, the fixtures must resolve. Without an upstream the graph loads from the project layer and the stdlib alone, which needs no network.
…path Rewriting the MFileOnly test into the InvalidInput regression dropped the only assertion that a ProjectComposable stamps Source::Project with the declared path. Re-add it against a stdlib-only mfile that resolves to ProjectResolution::Full, and tighten the resolve_project_ctx_and_graph doc comment.
|
/review |
|
Approved: no findings at Nothing to do. Clobber: none: |
…ct test configure_loadout now fails when the project graph cannot resolve, so the test's Ready outcome also proves the fixture's graph resolves.
|
/review |
There was a problem hiding this comment.
Approved at b773f0f: minimal-review approved at head, 0 open threads, all lanes green.
Routing-Key: inbox-route/I_kwDOSUhdos8AAAABUyOhdQ
min session activatesucceeds (exit 0) when the daemon cannot resolvethe project's package graph, leaving only a WARN and a session missing
every package contribution.
resolve_project_ctx_and_graphdowngradedthe graph error to
ProjectResolution::MFileOnly, andbuild_composablesthen returned no package composables. This change returns the graph error
as
InvalidInputso activation fails loudly, removes theMFileOnlyvariant and its graph-less branch, and updates
COMPOSITION.md.Verification
cargo fmt --all -- --checkpasses.cargo build --workspace --lockedpasses.run_compose_returns_invalid_input_when_graph_resolution_failspasses.cargo clippy -p minimald --locked --no-deps -- -D warningsreports only pre-existing lints innet/switch.rsandsession_host.rs(sandbox toolchain 1.99.0 vs pinned 1.97.0), none in the changed code.Summary by CodeRabbit