Skip to content

feat(task): add affected JSON output - #11593

Merged
jdx merged 1 commit into
agent/explain-affected-tasksfrom
agent/affected-json
Aug 1, 2026
Merged

jdx merged 1 commit into
agent/explain-affected-tasksfrom
agent/affected-json

Conversation

@jdx

@jdx jdx commented Aug 1, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • add mise run --affected --affected-json for machine-readable project and task selection
  • include stable revision, project-root, reason, and task-to-project fields
  • exit before dependency expansion, tool installation, or task execution
  • document the schema and mark the affected-output tracker item complete

Validation

  • mise run lint
  • cargo clippy --workspace --all-features --all-targets -- -D warnings
  • mise run test:e2e e2e/tasks/test_task_affected
  • mise run render

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

Stack created with GitHub Stacks CLI • Give Feedback 💬


Note

Low Risk
Additive CLI and output path on existing experimental affected selection; early exit avoids side effects and is covered by e2e.

Overview
Adds --affected-json to mise run (with --affected) so CI and other tools can get the same pre-expansion selection as --affected-explain, but as stable pretty-printed JSON. The payload includes base/head, affected projects (id, root, reasons), and matched tasks (name, projects).

When JSON mode is on, the run path returns immediately after emitting output—no dependency expansion, tool install, or task execution. --affected-json and --affected-explain are mutually exclusive. Call sites that construct Run (bootstrap, shorthand task routing) pass affected_json: false.

Docs, usage spec, man pages, monorepo guide, the task-cache parity tracker, and an e2e assert_json check cover the flag and schema.

Reviewed by Cursor Bugbot for commit 9eeb815. Bugbot is set up for automated code reviews on this repo. Configure here.

@coderabbitai

coderabbitai Bot commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

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

Review profile: CHILL

Plan: Pro Plus

Run ID: aaeec405-eef6-4a46-b55b-80b4627d7463

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@greptile-apps

greptile-apps Bot commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds machine-readable affected-project and affected-task selection to mise run, returning before dependency expansion, tool installation, or execution.

  • Introduces the mutually exclusive --affected-json output mode.
  • Serializes revisions, affected projects and reasons, and task-to-project associations.
  • Updates generated CLI documentation, monorepo documentation, and end-to-end coverage.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains within the eligible follow-up review scope.

Important Files Changed

Filename Overview
src/cli/run.rs Adds the affected-selection JSON schema, serialization, CLI flag validation, and early non-executing return.
src/cli/mod.rs Initializes the new flag in the synthetic task-run command path.
src/cli/bootstrap.rs Initializes the new flag to false for internally constructed bootstrap task runs.
e2e/tasks/test_task_affected Verifies the JSON schema, affected project reasons, task associations, and absence of task execution.
docs/tasks/monorepo.md Documents invocation and the stable pre-dependency-expansion JSON contract.

Reviews (6): Last reviewed commit: "feat(task): add affected JSON output" | Re-trigger Greptile

@jdx
jdx force-pushed the agent/affected-json branch from cf4b78b to bafe082 Compare August 1, 2026 19:40
@jdx
jdx force-pushed the agent/affected-json branch from bafe082 to 2557883 Compare August 1, 2026 19:41
@jdx
jdx force-pushed the agent/affected-json branch from 2557883 to 94c60f4 Compare August 1, 2026 19:48
@jdx
jdx force-pushed the agent/affected-json branch from 94c60f4 to 96e2d79 Compare August 1, 2026 19:57
@github-actions

github-actions Bot commented Aug 1, 2026 •

Copy link
Copy Markdown
Contributor

Instruction counts

benchmark trend instructions Δ wall (min) Δ
env ▂▁▁▁▃▄▂▂▅▅▄▄▃▄▄▄█ 84,800,951 → 84,965,968 +0.19% 20.13 → 18.04ms -10.41%
hook-env ▄▁▆▅▆▆▅▄▇█▇▇▅▆▆▆█ 87,123,100 → 87,204,134 +0.09% 20.55 → 19.48ms -5.23%
ls ▂▁▃▄▅▄▃▃▆▅▅▅▄▅▅▅█ 76,712,060 → 76,860,743 +0.19% 17.17 → 15.76ms -8.24%
registry ▁█▄▂▃▃▆▅▄▄██▇███▆ 50,433,521 → 50,343,022 -0.18% 12.34 → 11.33ms -8.19%
startup ▁▁▅▅▅▅▆▅▆▆▆▆▆▆▆▆█ 16,102,016 → 16,158,373 +0.35% 8.81 → 8.15ms -7.49%

No instruction-count regression above 1%.

Only instruction counts gate. Wall clock is shown for context — on identical hardware it moves 4-20% run to run.

Measured by tak — instruction-counted CLI benchmarks, stored in this repository's git notes.

9eeb815bdcc2 vs 4bd4185b65ce · measured on the runner, not pushed to the history.

@jdx
jdx force-pushed the agent/affected-json branch from 96e2d79 to 248dc1a Compare August 1, 2026 20:03
@jdx
jdx force-pushed the agent/affected-json branch from 248dc1a to 9eeb815 Compare August 1, 2026 20:16
@jdx
jdx merged commit 7f614f7 into main Aug 1, 2026
30 checks passed
@jdx
jdx deleted the agent/affected-json branch August 1, 2026 20:42
This was referenced Aug 1, 2026
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.

1 participant