8000 fix(minimald): fail session activation when the project graph cannot resolve by gominimal-aw-bot[bot] · Pull Request #1890 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

fix(minimald): fail session activation when the project graph cannot resolve - #1890

Merged
norrietaylor merged 5 commits into
mainfrom
inbox-patch/graph-resolution-activation-5b32b8fd36ab6f4b
Oct 4, 2026
Merged

norrietaylor merged 5 commits into
mainfrom
inbox-patch/graph-resolution-activation-5b32b8fd36ab6f4b

Conversation

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

Routing-Key: inbox-route/I_kwDOSUhdos8AAAABUyOhdQ

min session activate succeeds (exit 0) when the daemon cannot resolve
the project's package graph, leaving only a WARN and a session missing
every package contribution. resolve_project_ctx_and_graph downgraded
the graph error to ProjectResolution::MFileOnly, and build_composables
then returned no package composables. This change returns the graph error
as InvalidInput so activation fails loudly, removes the MFileOnly
variant and its graph-less branch, and updates COMPOSITION.md.

Verification

  • cargo fmt --all -- --check passes.
  • cargo build --workspace --locked passes.
  • New regression test run_compose_returns_invalid_input_when_graph_resolution_fails passes.
  • cargo clippy -p minimald --locked --no-deps -- -D warnings reports only pre-existing lints in net/switch.rs and session_host.rs (sandbox toolchain 1.99.0 vs pinned 1.97.0), none in the changed code.

Summary by CodeRabbit

  • Bug Fixes
    • Project activation now fails with an input error when dependency graph resolution fails, rather than continuing with an incomplete project configuration.
    • When a project requires a newer standard library version, the error includes a diagnostic explaining that requirement.
    • Missing packages continue to be reported and skipped individually.

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>
@gominimal-aw-bot
gominimal-aw-bot Bot requested a review from a team as a code owner October 3, 2026 13:59
@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 3, 2026
@coderabbitai
coderabbitai Bot commented Oct 3, 2026 •
Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Warning

Review limit reached

  • Run on-demand review

This review includes 4 billable files and costs up to $1.00.

Or wait 44 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.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 65db1a49-c57d-46e1-b53c-63c2db22e6a7
📥 Commits

Reviewing files that changed from the base of the PR and between e0b6202 and b773f0f.

📒 Files selected for processing (4)
  • crates/minimal/tests/cli.rs
  • crates/minimald/src/sessions.rs
  • crates/minimald/src/sessions/composables.rs
  • crates/sessions/docs/COMPOSITION.md

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: af4ea03f-e9e7-4eb9-9498-a29bc0e92b6c
📥 Commits

Reviewing files that changed from the base of the PR and between 3bf6b09 and e0b6202.

📒 Files selected for processing (3)
  • crates/minimald/src/sessions.rs
  • crates/minimald/src/sessions/composables.rs
  • crates/sessions/docs/COMPOSITION.md

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.


📝 Walkthrough

Walkthrough

Graph-resolution failures now return InvalidInput instead of continuing with project-only contributions. Composition uses a resolved graph, and a regression test checks the error for a project that requires an unsupported stdlib version.

Changes

Graph resolution and composition

Layer / File(s) Summary
Resolution contract and error handling
crates/minimald/src/sessions/composables.rs
ProjectResolution now contains NoMFile and Full. Graph-resolution failures return contextualized InvalidInput.
Composition and regression coverage
crates/minimald/src/sessions/composables.rs, crates/minimald/src/sessions.rs, crates/sessions/docs/COMPOSITION.md
Composition uses the resolved graph. The regression test checks the error for an unsupported stdlib version. Documentation describes the activation failure and retains per-package missing-package warnings.

Priority: ➖ Normal

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

Change: Bug fix

Suggested reviewers: norrietaylor

Merge Risk: ⚪ Minimal · up to e0b62

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)
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 4 functions across 2 files. (1 skipped: 1 …
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 states the main change: session activation fails when the project graph cannot resolve. It follows the repository’s Conventional Commit format.
Description check ✅ Passed The description explains the problem, the behavior change, and the reported verification. It uses “Verification” instead of the template’s “Testing” heading and omits the checklist, but it is otherwis…
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the graph with care,
No missing path can pass from there.
An error marks the failed resolve,
The test confirms the stated goal.
The package notes stay clear and bright,
Then hops away into the night.

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 3, 2026
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.
@norrietaylor norrietaylor changed the title fix: fail session activation when project graph cannot resolve fix(minimald): fail session activation when the project graph cannot resolve Oct 4, 2026
…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.
@norrietaylor
Copy link
Copy Markdown
Member

/review

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

Approved: no findings at b773f0f07f31.

Nothing to do.

Clobber: none: git log on composables.rs shows only this PR's own iteration commits; no recent fix reverted.

@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.

minimal-review — advisory review

Verdict COMMENT — 1 finding, 1 inline.

…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.
@norrietaylor
Copy link
Copy Markdown
Member

/review

@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.

minimal-review — approved

Verdict APPROVE — No findings.

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Oct 4, 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 at b773f0f: minimal-review approved at head, 0 open threads, all lanes green.

@norrietaylor
norrietaylor added this pull request to the merge queue Oct 4, 2026
Merged via the queue into main with commit c695b39 Oct 4, 2026
35 checks passed
@norrietaylor
norrietaylor deleted the inbox-patch/graph-resolution-activation-5b32b8fd36ab6f4b branch October 4, 2026 03:20
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