Summary
all_scope_reproduces_the_whole_tree_ranking asserts that --file-types all ranks "every tracked, non-binary, non-symlink file", but the shared fixture contains neither a binary blob nor a symlink, so the production binary/symlink skip is never exercised — a regression in it would pass green.
Location
tests/vcs_file_types.rs:31-40 (fixture()), tests/vcs_file_types.rs:75-85 (all_scope_reproduces_the_whole_tree_ranking)
Evidence
The fixture writes only plain UTF-8 text files:
const TRACKED_FILES: &[&str] = &[
"src/lib.rs", "app/main.py", "README.md",
"Cargo.toml", "Cargo.lock", "Makefile",
];
fn fixture() -> Repo {
let repo = Repo::init();
for rel in TRACKED_FILES {
repo.write(rel, "one\ntwo\nthree\n");
}
...
}
The all test then asserts:
"`all` ranks every tracked, non-binary, non-symlink file"
But the binary/symlink skip lives in production at src/vcs/git/repo.rs:152, independent of FileTypeScope:
if entry_mode.is_blob() && !entry_mode.is_link() {
...
}
Since the fixture has zero binary blobs and zero symlinks, that guard is never triggered. The module doc (lines 2-3) and the assertion message both advertise a binary/symlink contract the suite does not verify.
Expected Behavior
A test whose message claims "non-binary, non-symlink" filtering should include at least one symlink and one binary blob in the tracked set and assert they are excluded under all (the broadest scope, where only the binary/symlink guard — not the extension filter — can drop them).
Actual Behavior
No binary or symlink entry exists in the fixture. Deleting the !entry_mode.is_link() guard (ranking symlinks) or breaking the is_blob() binary handling would leave every test in tests/vcs_file_types.rs green.
Impact
The --file-types extension scoping (issue #576, the suite's primary subject) is well covered and genuinely discriminating. The adjacent enumeration guard at repo.rs:152 — which the all-scope test's own message claims to cover — is untested here, so a silent regression in symlink/binary handling under any scope would not be caught by this suite. Risk is mild (the extension filter is the file's focus) but the assertion message overstates what is verified.
Summary
all_scope_reproduces_the_whole_tree_rankingasserts that--file-types allranks "every tracked, non-binary, non-symlink file", but the shared fixture contains neither a binary blob nor a symlink, so the production binary/symlink skip is never exercised — a regression in it would pass green.Location
tests/vcs_file_types.rs:31-40(fixture()),tests/vcs_file_types.rs:75-85(all_scope_reproduces_the_whole_tree_ranking)Evidence
The fixture writes only plain UTF-8 text files:
The
alltest then asserts:"`all` ranks every tracked, non-binary, non-symlink file"But the binary/symlink skip lives in production at
src/vcs/git/repo.rs:152, independent ofFileTypeScope:Since the fixture has zero binary blobs and zero symlinks, that guard is never triggered. The module doc (lines 2-3) and the assertion message both advertise a binary/symlink contract the suite does not verify.
Expected Behavior
A test whose message claims "non-binary, non-symlink" filtering should include at least one symlink and one binary blob in the tracked set and assert they are excluded under
all(the broadest scope, where only the binary/symlink guard — not the extension filter — can drop them).Actual Behavior
No binary or symlink entry exists in the fixture. Deleting the
!entry_mode.is_link()guard (ranking symlinks) or breaking theis_blob()binary handling would leave every test intests/vcs_file_types.rsgreen.Impact
The
--file-typesextension scoping (issue #576, the suite's primary subject) is well covered and genuinely discriminating. The adjacent enumeration guard atrepo.rs:152— which theall-scope test's own message claims to cover — is untested here, so a silent regression in symlink/binary handling under any scope would not be caught by this suite. Risk is mild (the extension filter is the file's focus) but the assertion message overstates what is verified.