Skip to content

fix(deps): honor source and output overrides - #11896

Merged
jdx merged 1 commit into
jdx:mainfrom
Marukome0743:pr11896
Aug 13, 2026
Merged

jdx merged 1 commit into
jdx:mainfrom
Marukome0743:pr11896

Conversation

@Marukome0743

@Marukome0743 Marukome0743 commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • preserve whether deps provider sources and outputs were omitted or explicitly configured
  • let built-in providers replace their default tracked paths, including disabling tracking with an empty array
  • resolve built-in and custom path overrides through one config-root-aware implementation
  • suppress built-in optional outputs whenever outputs is explicitly configured

Motivation

Built-in deps providers accepted sources and outputs in the configuration schema, but their implementations always returned provider-specific defaults. This made custom virtualenv locations and isolated monorepo layouts impossible to track accurately.

The new behavior is a full replacement: omitted fields retain the built-in defaults, explicit arrays replace them, and [] intentionally disables that category of tracking. Applicability still uses each provider's canonical lockfile or manifest.

Verification

  • mise exec -- cargo test --all-features deps::
  • mise run test:e2e e2e/cli/test_deps_builtin_path_overrides e2e/cli/test_deps e2e/config/test_schema_deps_provider_arrays
  • mise exec -- cargo check --all-features
  • mise exec -- cargo clippy --workspace --all-features --all-targets -- -D warnings
  • Rustfmt, ShellCheck, shfmt, Prettier, and markdownlint checks for the changed files

The E2E coverage verifies pnpm-style isolated outputs, an explicit empty uv output list, and independent relative path resolution for monorepo config roots.

Addresses #8762

AI-assisted — Tool: Codex; model: OpenAI/GPT-5; version: unavailable.

Summary by CodeRabbit

  • New Features

    • Added configurable dependency source, required-output, and optional-output paths for built-in providers.
    • Supports relative and absolute paths, wildcard patterns, and explicitly empty lists.
    • Relative paths resolve from the configured project root.
    • Custom providers now use configured paths without automatic glob expansion.
    • Dependency checks detect missing outputs, track output changes, and rerun as needed.
  • Documentation

    • Added configuration guidance and workspace examples.
  • Tests

    • Added coverage for overrides, glob patterns, output suppression, freshness reruns, and missing-output recreation.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Dependency providers now support configurable source and output paths. ProviderBase resolves relative and glob paths, preserves absolute paths, and distinguishes omitted values from explicit empty lists. Freshness checks now track output rules and recorded outputs.

Changes

Dependency path overrides

Layer / File(s) Summary
Path resolution contract
src/deps/rule.rs, src/deps/providers/mod.rs
Configuration distinguishes omitted paths from explicit empty arrays. ProviderBase resolves relative, absolute, and glob patterns and computes output-rule hashes.
Provider integration
src/deps/providers/*.rs
Built-in and custom providers delegate source, required-output, and optional-output construction to ProviderBase.
Output freshness validation
src/deps/engine.rs, src/deps/state.rs
Successful runs record resolved outputs and output-rule hashes. Freshness checks validate recorded outputs when the rules match.
Override validation and documentation
e2e/cli/test_deps_builtin_path_overrides, docs/dev-tools/deps.md
Tests and documentation cover path replacement, empty outputs, glob paths, caching, reruns, output recreation, and config-root resolution.

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

Sequence Diagram(s)

sequenceDiagram
  participant DepsProviderConfig
  participant PnpmDepsProvider
  participant ProviderBase
  participant DepsEngine
  DepsProviderConfig->>PnpmDepsProvider: load source and output overrides
  PnpmDepsProvider->>ProviderBase: resolve sources(...) and outputs(...)
  ProviderBase-->>PnpmDepsProvider: return tracked paths and output-rule hash
  PnpmDepsProvider->>DepsEngine: provide dependency paths
  DepsEngine->>DepsEngine: record and validate required and optional outputs
Loading

Possibly related PRs

  • jdx/mise#11886: Also modifies dependency provider configuration and source/output handling.
  • jdx/mise#11849: Also modifies dependency freshness tracking.

Poem

A rabbit maps each source and route,
While globs reveal the paths they scout.
Empty outputs stay out of sight,
Rule hashes keep the state aligned.
Hop, hop—fresh checks run right!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 10.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes honoring dependency source and output overrides, which is the main change.
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.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/deps/providers/mod.rs`:
- Around line 94-115: Update resolve_path_patterns to treat '[' as a glob
metacharacter alongside '*', '{', and '?', allowing bracket character classes
such as inputs/[ab].lock to be expanded through glob; add a regression test
covering matching bracket-pattern files.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 4e4eade8-8038-46bd-95a8-30d41cdedad6

📥 Commits

Reviewing files that changed from the base of the PR and between eb04e1d and ce1ffae.

📒 Files selected for processing (19)
  • docs/dev-tools/deps.md
  • e2e/cli/test_deps_builtin_path_overrides
  • src/deps/providers/aube.rs
  • src/deps/providers/bun.rs
  • src/deps/providers/bundler.rs
  • src/deps/providers/composer.rs
  • src/deps/providers/custom.rs
  • src/deps/providers/dart.rs
  • src/deps/providers/deno.rs
  • src/deps/providers/git_submodule.rs
  • src/deps/providers/go.rs
  • src/deps/providers/mod.rs
  • src/deps/providers/npm.rs
  • src/deps/providers/pip.rs
  • src/deps/providers/pnpm.rs
  • src/deps/providers/poetry.rs
  • src/deps/providers/uv.rs
  • src/deps/providers/yarn.rs
  • src/deps/rule.rs

Comment thread src/deps/providers/mod.rs Resolved
@Marukome0743
Marukome0743 force-pushed the pr11896 branch 2 times, most recently from c863c52 to ae6cdbc Compare August 11, 2026 14:52
@Marukome0743
Marukome0743 marked this pull request as ready for review August 12, 2026 02:36
@greptile-apps

greptile-apps Bot commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds replacement semantics for dependency-provider source and output overrides and persists expanded output matches to detect deleted glob members.

  • Preserves omitted versus explicitly empty path configuration.
  • Resolves built-in and custom overrides relative to each provider’s config root.
  • Adds output-rule identities and persisted required-output tracking.
  • Extends unit and end-to-end coverage for overrides, monorepos, and output deletion.

Confidence Score: 4/5

The PR is not yet safe to merge because an incomplete recovery run can permanently forget a deleted required glob output.

Persisted output matches correctly trigger the first recovery run, but the successful-run save path replaces that history with only currently existing matches, allowing subsequent checks to report freshness when the command did not recreate every previously tracked output.

Files Needing Attention: src/deps/engine.rs

Important Files Changed

Filename Overview
src/deps/engine.rs Persists and enforces expanded output matches, but a successful incomplete recovery run can discard a missing match from state.
src/deps/providers/mod.rs Centralizes config-root-aware path and glob resolution while distinguishing omitted, explicit, and empty overrides.
src/deps/state.rs Adds backward-compatible persistence for output-rule identities and observed output paths.
src/deps/rule.rs Changes source and output arrays to optional values so omission remains distinguishable from an explicit empty list.
e2e/cli/test_deps_builtin_path_overrides Covers built-in path replacement, empty output tracking, changed output rules, glob deletion, and monorepo config roots.

Comments Outside Diff (1)

  1. src/deps/engine.rs, line 786 (link)

    P1 Recovery forgets missing glob outputs

    When a required output glob previously matched multiple files and the recovery command exits successfully without recreating one of them, set_seen_outputs replaces the prior set with only the currently existing matches. Subsequent freshness checks then report the provider as fresh while the generated file remains missing.

Reviews (7): Last reviewed commit: "fix(deps): honor source and output overr..." | Re-trigger Greptile

Comment thread src/deps/providers/mod.rs Resolved
@Marukome0743
Marukome0743 marked this pull request as draft August 12, 2026 02:40
@Marukome0743
Marukome0743 marked this pull request as ready for review August 12, 2026 02:59
Comment thread src/deps/providers/mod.rs Resolved

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/deps/engine.rs (1)

719-729: 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Bind recorded outputs to the active output configuration.

Line 1027 enforces every historical seen_outputs path even when the current configuration replaces those outputs or sets outputs = []. If a prior default output was recorded and then deleted, an explicit empty override still returns OutputsMissing and reruns the provider. A replacement override has the same problem for its removed old paths.

Persist a stable identity for the declared output rules with seen_outputs. Ignore or replace historical paths when that identity differs. Do not derive the identity from expanded glob matches, because that would hide deletion of a glob match.

  • src/deps/engine.rs#L719-L729: Store the declared output-rule identity with the observed output paths.
  • src/deps/engine.rs#L1027-L1039: Enforce historical paths only when their stored identity matches the active output rules.

This conflicts with the stated requirement that explicit output arrays replace defaults and empty arrays disable tracking.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/deps/engine.rs` around lines 719 - 729, In src/deps/engine.rs lines
719-729, update the DepsState persistence in the provider output-recording flow
to store a stable identity of the declared output rules alongside seen_outputs,
derived from the configured rules rather than expanded glob matches. In
src/deps/engine.rs lines 1027-1039, update the historical-output enforcement to
require a matching stored identity before checking prior paths, so changed,
replacement, or explicitly empty output configurations do not enforce stale
paths; preserve enforcement when the identities match.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@src/deps/engine.rs`:
- Around line 719-729: In src/deps/engine.rs lines 719-729, update the DepsState
persistence in the provider output-recording flow to store a stable identity of
the declared output rules alongside seen_outputs, derived from the configured
rules rather than expanded glob matches. In src/deps/engine.rs lines 1027-1039,
update the historical-output enforcement to require a matching stored identity
before checking prior paths, so changed, replacement, or explicitly empty output
configurations do not enforce stale paths; preserve enforcement when the
identities match.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: 4ea914bd-4302-45a5-a348-362e40bdd874

📥 Commits

Reviewing files that changed from the base of the PR and between 43a2f53 and 128a559.

📒 Files selected for processing (3)
  • e2e/cli/test_deps_builtin_path_overrides
  • src/deps/engine.rs
  • src/deps/state.rs
🚧 Files skipped from review as they are similar to previous changes (1)
  • e2e/cli/test_deps_builtin_path_overrides

Comment thread src/deps/engine.rs Resolved

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/deps/providers/mod.rs`:
- Around line 115-120: Update resolve_path_patterns at the glob invocation to
expand brace alternatives before calling glob, preserving all expanded source
and required-output patterns instead of dropping them on glob errors. Add
regression tests covering brace patterns for both sources and required outputs,
then run mise run test:unit.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited), Organization UI (inherited)

Review profile: CHILL

Plan: Pro Plus

Run ID: ace3f712-4c4b-4afb-b2ee-8d7bcc9e8f81

📥 Commits

Reviewing files that changed from the base of the PR and between 128a559 and 3ae11da.

📒 Files selected for processing (4)
  • e2e/cli/test_deps_builtin_path_overrides
  • src/deps/engine.rs
  • src/deps/providers/mod.rs
  • src/deps/state.rs
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/deps/engine.rs

Comment thread src/deps/providers/mod.rs Resolved
@Marukome0743
Marukome0743 marked this pull request as ready for review August 13, 2026 18:05
@jdx
jdx merged commit a269dbf into jdx:main Aug 13, 2026
31 checks passed
@Marukome0743
Marukome0743 deleted the pr11896 branch August 13, 2026 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants