Skip to content

docs: correct run.rs widen condition in CLAUDE.md (unreachable, not diverged) - #47

Open
cargo-affected-bot wants to merge 3 commits into
mainfrom
docs/claude-md-run-widen-divergence
Open

docs: correct run.rs widen condition in CLAUDE.md (unreachable, not diverged)#47
cargo-affected-bot wants to merge 3 commits into
mainfrom
docs/claude-md-run-widen-divergence

Conversation

@cargo-affected-bot

Copy link
Copy Markdown
Collaborator

The run.rs architecture bullet in CLAUDE.md said run "Widens to all tests only when every sha is diverged." That conflicts with run.rs's own vocabulary: CacheStatus::HitWithDivergence / any_divergence() describe the reachable-but-not-equal case, and that path does not widen — it proceeds with the partial selection. Widening to the full suite happens on the MissNoReachableSha path, which fires only when reach.reachable.is_empty() — i.e. every stored collect_sha is missing (rebased/pruned/gc'd/beyond a shallow-clone boundary), per the Reachability::missing doc in src/selection.rs.

So a reader following run.rs's terms would expect a diverged sha to trigger a full rerun, when it actually keeps the narrow selection. This updates the bullet to say widening happens only when no collect_sha is reachable, and that a reachable-but-diverged sha keeps the partial hit-with-divergence selection.

Docs-only change — no regression test (nothing executable changed). Grounded in src/run.rs (the reach.reachable.is_empty() guard and classify_hit_status/any_divergence) and src/selection.rs (the Reachability field docs).

Adjacent to the selection.rs bullet edited by #36 but a distinct line and concern.

🤖 Generated with Claude Code

…iverged)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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