Skip to content

fix(orchestrator): let --affected run in a sparse checkout - #5908

Merged
Exelord merged 3 commits into
mainfrom
claude/project-thread-n3ce4o
Dec 1, 2026
Merged

Exelord merged 3 commits into
mainfrom
claude/project-thread-n3ce4o

Conversation

@Exelord

@Exelord Exelord commented Dec 1, 2026 •

Copy link
Copy Markdown
Member

Requested by M · project thread

--affected works in a sparse checkout

Before: in a sparse checkout that leaves project b out, every --affected run was refused, even with no change at all, and so was a --filter that walks the graph or reads tags:

$ git sparse-checkout set --no-cone '/*' '!/b/'
$ vx run build --affected=HEAD
✗ vx run  b is outside this sparse checkout, but this run needs it — run `git sparse-checkout add b`

After: the run refuses b only when a task the diff reaches is b's or depends on one of b's. Otherwise it runs:

$ vx run build --affected=HEAD
› vx run  nothing affected since HEAD — …
$ echo z >> a/src/a.txt && vx run build --affected=HEAD
  tasks     1 success · 1 total

How it works

Selection's staged load (for a graph walk or tag:) now loads with sparseLater: a left-out project's config comes from the lock (where a run reads it anyway) and is named in sparseLeft; such a load is never handed to the run. An --affected run loads the same way, and after the diff narrows the graph it refuses with the same message when a kept node is that project's. Runs without --affected refuse at load as before. docs/cli.md § sparse checkout.

Breaking changes

None

Proof

  • Tests (each fails without this change): tests/sparse-checkout-config.test.ts "--affected refuses the excluded project only when what it reaches needs it"
  • Perf: the new work runs only on a failed load or when a sparse checkout left a project out; no warm-path change
  • Docs updated: docs/cli.md

https://claude.ai/code/session_01W6xuYZxNabyhMT7Q9Qhf5m


Generated by Claude Code

Every --affected run, and every --filter that walks the graph or reads
tags, loaded each locked project and refused one a sparse checkout left
out, though the diff reached none of it. Selection now reads such a
project's config from the lock, and an --affected run refuses it only
when a task it keeps is that project's or depends on one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W6xuYZxNabyhMT7Q9Qhf5m
@Exelord Exelord self-assigned this Dec 1, 2026
The first cut fell back to the raw lock on any failed staged load, which
hid a deleted project's or unreadable directory's refusal and skipped
the root spelling and default build. The selection's load now takes
sparseLater, and a load that left a project out is never handed to the
run, whose own load refuses what it needs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01W6xuYZxNabyhMT7Q9Qhf5m
@Exelord
Exelord enabled auto-merge (squash) December 1, 2026 06:10
@Exelord
Exelord merged commit 64d939f into main Dec 1, 2026
10 of 14 checks passed
@Exelord
Exelord deleted the claude/project-thread-n3ce4o branch December 1, 2026 06:19
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