Repository navigation
test(cache): remove glob input tests that a stronger neighbour covers - #934
Open
Brooooooklyn wants to merge 1 commit into
Open
Brooooooklyn wants to merge 1 commit into
Brooooooklyn wants to merge 1 commit into
Conversation
Three `compute_globbed_inputs` unit tests can't fail on a regression that another test in the module doesn't also catch: - `test_overlapping_positive_globs_deduplicates`: the result is a `BTreeMap`, so an overlapping file can't be counted twice. Dropping the `Entry::Vacant` check passes it; ignoring negative globs fails it and four other tests. - `test_empty_positive_globs_returns_empty`: same call as `test_negative_only_returns_empty` without the negative glob. Treating empty positive globs as `**` fails both. - `test_sibling_positive_glob_matches_sibling_package`: globs are workspace-root-relative here, so "sibling" means nothing to this function; `test_sibling_negative_glob_excludes_from_sibling` asserts the same file with a wider glob. Stripping a trailing `/**` fails both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PxVsmvB9xfZKfVnUonY8kf
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
fspy benchmarklinuxmacoswindows |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Brooklyn · project thread
Before: three
compute_globbed_inputsunit tests incrates/vt/src/session/execute/glob.rscould not fail on any regression without a neighbouring test failing on it too.After: those three tests are gone. Every behaviour they asserted is still asserted by another test in the same module. Only
#[cfg(test)]code changes.How: each removal was defended by mutating
glob.rswith the most realistic regression the test could catch, running allvtlib tests, and reverting. The key mutations were re-run after the deletion.Totals
vtlib tests (76 after). Only thevtlib suite was counted, not the whole workspace.Removals
test_overlapping_positive_globs_deduplicates: the result is aBTreeMap, so a file matched by two globs can't be counted twice. Dropping theEntry::Vacantcheck and always inserting passes every test, this one included. The only regression it does catch, ignoring negative globs, also fails 5 other tests. Merging several positive globs stays covered bytest_positive_with_negative_exclusionandtest_multiple_positive_globs.test_empty_positive_globs_returns_empty: the same call astest_negative_only_returns_emptywithout the negative glob, with the same assertion. Treating an empty positive set as**fails both, and failstest_negative_only_returns_emptyafter the deletion.test_sibling_positive_glob_matches_sibling_package: globs reaching this function are already workspace-root-relative, so "sibling package" means nothing to it.test_sibling_negative_glob_excludes_from_siblingasserts the same file (packages/shared/src/utils.ts) with a wider glob. Stripping a trailing/**fails both, and after the deletion still fails 2 tests.Mutations (all in
glob.rs, each reverted)Entry::Vacantcheck)test_multiple_positive_globs,test_multiple_negative_globs*test_file_hashes_change_with_content,test_multiple_positive_globsBreakinstead ofContinueon an already-hashed file/**positive_globs.is_empty()early return**Gap found, not fixed here: returning
ControlFlow::Breakinstead ofContinuefor a file already hashed by an earlier pattern passes everyvtlib test, onmaintoo. With that regression, overlapping globs silently drop later files from the fingerprint. A test with overlapping globs plus a unique file that sorts after them would catch it.What ran and what did not
c6c91f96and on this branch:cargo test -p vt --lib(0 failures before and after), the mutations above,cargo fmt --check,cargo clippy -p vt --tests -- -D warningsandgit diff --check, all clean.just testandjust lint, macOS and Windows, the e2e/snapshot suites, andvt_subprocess_test/vt_pty_terminal.Open pull requests: none of the 57 open touches
glob.rs.Ages: all three tests were added in #104 on 2026-03-09. None was added for a bug, and none is in a permission or security suite.
To revert:
git revert 23630f0c.Generated by Claude Code