Skip to content

fix(scanner): constrain generic cache marker evidence - #4

Merged
farhan-syah merged 2 commits into
ml-rust:mainfrom
jmylchreest:fix/require-cargo-cache-evidence
Oct 11, 2026
Merged

farhan-syah merged 2 commits into
ml-rust:mainfrom
jmylchreest:fix/require-cargo-cache-evidence

Conversation

@jmylchreest

Copy link
Copy Markdown
Contributor

Any directory containing CACHEDIR.TAG is currently classified as a Cargo target, regardless of its name or whether it belongs to a Rust project. A non-Cargo cache containing release/deps files can consequently produce deletion candidates under the balanced policy.

Require the conventional target basename before accepting generic CACHEDIR.TAG evidence, matching the existing source comment. Explicitly configured Cargo output directories and directories containing .rustc_info.json remain supported. Tests cover direct classification and recursive planning, preserving an unrelated cache fixture.

Validation

  • cargo fmt --all
  • cargo clippy --all-targets --all-features (no warnings)
  • cargo test -q -- --test-threads=1: 540 tests passed
  • git diff --check

Base: b81f7ce
Branch: fix/require-cargo-cache-evidence
Commit: 8784480

Require the conventional target basename before treating CACHEDIR.TAG as Cargo evidence. Preserve generic caches while retaining configured output paths and rustc markers. Cover direct classification and recursive cleanup planning.

@farhan-syah farhan-syah left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No findings. Generic cache markers now require the conventional target name. Configured paths and .rustc_info.json retain precedence. Formatting, Clippy with warnings denied, 540 serial tests, and diff whitespace checks pass.

@farhan-syah
farhan-syah merged commit 9702227 into ml-rust:main Oct 11, 2026
10 checks passed
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