Skip to content

fix(run): explain missing package managers - #119

Merged
kjanat merged 4 commits into
masterfrom
109-pm-missing-path-opaque-enoent
Aug 12, 2026
Merged

fix(run): explain missing package managers#119
kjanat merged 4 commits into
masterfrom
109-pm-missing-path-opaque-enoent

Conversation

@kjanat

@kjanat kjanat commented Aug 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • retain package-manager resolution provenance through process launch
  • report the selected package manager and source when its executable is absent from PATH
  • preserve generic direct-command errors and cover serial, quiet, and parallel dispatch

Fixes #109.

Reviewer notes

  • no semver version bump during PR.

Carry package-manager resolution provenance through process launch so a
missing manifest-selected executable identifies both the tool and why it
was chosen. Keep direct-command errors unchanged and cover serial, quiet,
and parallel dispatch.

Fixes #109.
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 41 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: f45589ec-fb3d-49a6-be65-cd95b4af71ce

📥 Commits

Reviewing files that changed from the base of the PR and between 341c513 and e4cedb8.

📒 Files selected for processing (2)
  • src/cmd/run/dispatch.rs
  • tests/spawn_diagnostics.rs

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: afebeef8-63b3-413e-bbea-735dece317bf

📥 Commits

Reviewing files that changed from the base of the PR and between 8c25b1c and 341c513.

📒 Files selected for processing (1)
  • CHANGELOG.md
📜 Recent review details
🧰 Additional context used
📓 Path-based instructions (1)
**/CHANGELOG.md

📄 CodeRabbit inference engine (Custom checks)

**/CHANGELOG.md: If any source code files (excluding tests, docs, CI, markdown, or comments-only changes) are modified, CHANGELOG.md MUST also be modified in the same PR.
If a version bump is detected, CHANGELOG.md MUST contain a new section header matching the exact new version number in the format: '## [X.Y.Z] - YYYY-MM-DD'.
If NO version bump is detected, the changes in the PR MUST be added under the existing '## [Unreleased]' section in CHANGELOG.md. The entry MUST describe the changes (e.g., Added, Changed, Fixed, Removed).

Files:

  • CHANGELOG.md
🔍 Remote MCP DeepWiki, GitHub Grep

Additional review context

  • watchexec uses command.command_mut() to apply working-directory, environment, and pre-execution configuration before spawning, supporting the PR’s wrapper API design.
  • nextest commonly matches io::ErrorKind::NotFound specifically while propagating other I/O errors, consistent with limiting diagnostic rewriting to missing executables.
  • Turborepo models missing package-manager executables as a dedicated error containing both the command and underlying which error: Unable to run generate - missing requirements ({command}): {source}.
  • Volta separates command construction from execution context and failure-message handling for npm, Node, pnpm, and Yarn, providing a comparable provenance-aware structure.
  • The linked kjanat/runner repository was not indexed by DeepWiki, and searches for SpawnDispatch, command_mut(), and ErrorKind::NotFound in that repository returned no results, so repository-specific independent validation was unavailable.
🔇 Additional comments (1)
CHANGELOG.md (1)

21-25: LGTM!


📝 Walkthrough

Retain package-manager provenance through process launch.

Report actionable diagnostics when a selected package-manager executable is missing from PATH. Include the executable and selection source for Node and Python package managers.

Preserve generic errors for direct commands and other launch failures. Apply the behaviour to serial, quiet, and parallel dispatch. Add regression coverage for manifest-selected and direct-command failures.

Walkthrough

Runner now uses SpawnDispatch instead of raw Command values. The wrapper retains package-manager provenance, configures stdio, spawns commands, and adds contextual errors for missing selected executables. Other I/O errors remain unchanged. Dispatch resolution and task execution paths now return wrapped commands. Tests cover package-manager, direct-command, quiet, and parallel execution.

Sequence Diagram(s)

sequenceDiagram
  participant Runner
  participant SpawnDispatch
  participant OperatingSystem
  Runner->>SpawnDispatch: resolve and configure command
  SpawnDispatch->>OperatingSystem: probe PATH and spawn command
  OperatingSystem-->>SpawnDispatch: status or I/O error
  SpawnDispatch-->>Runner: exit status or contextual diagnostic
Loading

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related issues

  • KAJ-358 — Adds provenance-aware diagnostics for missing manifest-selected package managers.

Possibly related PRs

  • kjanat/runner#75 — Handles local-file dispatches that this change now passes through SpawnDispatch.
  • kjanat/runner#92 — Modifies the dispatch resolution and Dispatch::Spawn execution flow.
  • kjanat/runner#104 — Modifies Bun and package-manager command dispatch in the same implementation area.

Poem

bun missing? Its name now rings,
SpawnDispatch explains the things.
Quiet and parallel paths stay bright,
Direct commands keep errors right.
Clear diagnostics sail through the night.

🚥 Pre-merge checks | ✅ 7 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Semver Version Bump Validation ❓ Inconclusive Investigation is still in progress; no final assessment submitted yet. Need verify the base-to-PR version diff and whether the changed Rust signatures are public API changes.
✅ Passed checks (7 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes satisfy issue [#109] by reporting missing manifest-selected package managers while preserving existing direct-command behaviour.
Out of Scope Changes check ✅ Passed The implementation, regression tests, and changelog entry directly support the linked issue and stated objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Changelog Update ✅ Passed Source files changed, and CHANGELOG.md was updated under ## [Unreleased] with a descriptive ### Fixed entry. No version bump appears in the PR diff.
Agents.Md Documentation Updated ✅ Passed No AGENTS.md file exists in the repository; the documentation-update condition is therefore not applicable to these code and CLI behaviour changes.
Description check ✅ Passed The description clearly explains the package-manager diagnostic changes and the preserved direct-command behaviour.
Title check ✅ Passed The title is concise, descriptive, uses the required fix prefix, and accurately summarises the main change.

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

@kjanat kjanat added bug Something isn't working area: cli Argument parsing, commands, and CLI UX labels Aug 12, 2026
@kjanat kjanat self-assigned this Aug 12, 2026
@kjanat kjanat added the cr:review Allow CodeRabbit review label Aug 12, 2026
coderabbitai[bot]

This comment was marked as resolved.

kjanat added 2 commits August 12, 2026 22:24
Preserve Python package-manager resolution through pyproject script
launches so missing uv, Poetry, or Pipenv executables report why they
were selected instead of returning a bare spawn error.
coderabbitai[bot]

This comment was marked as resolved.

Use each configured command's effective PATH for missing-manager
diagnostics so project-local node_modules binaries are not falsely
reported absent when launch fails for another reason.
@kjanat
kjanat merged commit 3d339a8 into master Aug 12, 2026
19 checks passed
@kjanat
kjanat deleted the 109-pm-missing-path-opaque-enoent branch August 12, 2026 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: cli Argument parsing, commands, and CLI UX bug Something isn't working cr:review Allow CodeRabbit review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Manifest-selected package manager missing from PATH produces opaque ENOENT

1 participant