From 430f92f7652cda1a92b3e62671776118db2ec601 Mon Sep 17 00:00:00 2001 From: cargo-affected-bot <282014906+cargo-affected-bot@users.noreply.github.com> Date: Mon, 8 Jun 2026 08:10:16 +0000 Subject: [PATCH 1/3] docs: refresh diff_collect.rs module summary to match its coverage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The module doc claimed the file exercises "the two error paths the project's 'fail loudly' stance demands: no prior collect, and a stored sha no longer reachable from HEAD." Both halves are stale: - A single unreachable sha is not an error. plan_diff_collect only emits a notice and proceeds as long as one sha is reachable (collect.rs:586); the bail fires only when *every* sha is unreachable — a case this file doesn't cover. Commit #9 made sibling shas reachable rather than fatal, and diff_collect_succeeds_when_sha_is_sibling now asserts exactly that. - The file has grown to ten tests covering pruning, ignored-test retention, all-phantom recovery, clean-tree short-circuit, and the run-side multi-sha behaviors — far more than "headline guarantee + two error paths." Only the no-prior-collect path is an actual hard error exercised here. Rewrite the summary to describe what the file actually tests. --- tests/functional/diff_collect.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/functional/diff_collect.rs b/tests/functional/diff_collect.rs index 2462c51..8e42c9d 100644 --- a/tests/functional/diff_collect.rs +++ b/tests/functional/diff_collect.rs @@ -4,9 +4,15 @@ //! at their original sha. //! //! This file exercises the headline guarantee — multiple shas can coexist -//! in `test_regions` for the same fingerprint after `--diff` — plus the -//! two error paths the project's "fail loudly" stance demands: no prior -//! collect, and a stored sha no longer reachable from HEAD. +//! in `test_regions` for the same fingerprint after `--diff` — along with +//! the row-maintenance and selection behaviors built on it: re-anchoring +//! only affected tests, accumulating distinct shas across rounds, pruning +//! deleted/renamed tests while keeping merely-ignored ones, recovering from +//! an all-phantom selection, and short-circuiting a clean tree. A few `run` +//! cases live here too, since they exercise the multi-sha state `--diff` +//! creates: a sibling sha is reachable rather than fatal (#9), and a single +//! diverged sha only strands its own tests instead of widening the run. +//! The one hard error covered is the "fail loudly" no-prior-collect path. use crate::{ cargo_affected, combined_output, git, git_head, init_git_with_initial_commit, replace_in_file, From 7a44b44a48316f218e2ca504d14f87f8355af59c Mon Sep 17 00:00:00 2001 From: cargo-affected-bot <282014906+cargo-affected-bot@users.noreply.github.com> Date: Mon, 3 Aug 2026 07:45:41 +0000 Subject: [PATCH 2/3] docs: say 'dropped out of the object database', not 'diverged' --- tests/functional/diff_collect.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/functional/diff_collect.rs b/tests/functional/diff_collect.rs index 8e42c9d..668dab7 100644 --- a/tests/functional/diff_collect.rs +++ b/tests/functional/diff_collect.rs @@ -10,8 +10,10 @@ //! deleted/renamed tests while keeping merely-ignored ones, recovering from //! an all-phantom selection, and short-circuiting a clean tree. A few `run` //! cases live here too, since they exercise the multi-sha state `--diff` -//! creates: a sibling sha is reachable rather than fatal (#9), and a single -//! diverged sha only strands its own tests instead of widening the run. +//! creates: a sibling sha is reachable rather than fatal (#9), and a sha +//! that has dropped out of the object database strands only the tests +//! anchored there instead of widening the run. (Divergence alone strands +//! nothing — reachability is `git cat-file -e`, not ancestry.) //! The one hard error covered is the "fail loudly" no-prior-collect path. use crate::{ From a3cb2921446b80727534f50deb4823ef3e02c735 Mon Sep 17 00:00:00 2001 From: cargo-affected-bot <282014906+cargo-affected-bot@users.noreply.github.com> Date: Mon, 3 Aug 2026 07:51:11 +0000 Subject: [PATCH 3/3] docs: drop the missing-sha clause this file has no scenario for --- tests/functional/diff_collect.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/functional/diff_collect.rs b/tests/functional/diff_collect.rs index 668dab7..a2f9d3d 100644 --- a/tests/functional/diff_collect.rs +++ b/tests/functional/diff_collect.rs @@ -10,10 +10,9 @@ //! deleted/renamed tests while keeping merely-ignored ones, recovering from //! an all-phantom selection, and short-circuiting a clean tree. A few `run` //! cases live here too, since they exercise the multi-sha state `--diff` -//! creates: a sibling sha is reachable rather than fatal (#9), and a sha -//! that has dropped out of the object database strands only the tests -//! anchored there instead of widening the run. (Divergence alone strands -//! nothing — reachability is `git cat-file -e`, not ancestry.) +//! creates: a sibling sha is reachable rather than fatal (#9), and a +//! selection spanning several shas stays narrow instead of widening to the +//! whole suite. //! The one hard error covered is the "fail loudly" no-prior-collect path. use crate::{