Skip to content

mu B3: analyze cache guard + CleanTarget.roots - #5

Merged
baroitrung merged 2 commits into
mainfrom
quaqua/mu-integ
Oct 26, 2026
Merged

baroitrung merged 2 commits into
mainfrom
quaqua/mu-integ

Conversation

@baroitrung

Copy link
Copy Markdown
Owner

B3 items 1-2:

  • c9ec708 analyze: bypassing scans skip cache; 64 MiB cache cap
  • 4d777a3 clean: CleanTarget carries roots; badge roots derived from it

Verify: make test 473 unit + 59 integration pass; make lint clean.

from therealTINHTUTE with love ❤️❤️❤️

A scan that bypasses the cache (--json) never reads it, so writing the
result was pure waste: a --json run of a big tree paid a full
serialize+fsync+rename for a file nothing would open. The walker now
skips the save whenever bypass_cache is set; a warm TUI run still loads
from cache, and R still invalidates then rescans and saves.

Payloads are also bounded by MAX_CACHE_BYTES (64 MiB) before the rename,
so scanning $HOME or / cannot dump hundreds of MB into
$XDG_CACHE_HOME/mu/analyze. An oversized payload is a silent no-op
(Ok(None), no output, no exit-code change) and an oversized file left by
an older build is dropped on load as a miss.
…an_target_roots

- Add roots: Vec<PathBuf> field to CleanTarget
- Populate roots in all target constructors from existing bound paths
- Derive clean_target_roots_in from all_targets_in(deps) flat_map roots
- Remove parallel hardcoded root enumeration in clean_target_roots_in
- Add equality and badge equivalence characterization tests against legacy roots
@baroitrung
baroitrung merged commit c214b45 into main Oct 26, 2026
1 check failed
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