Repository navigation
fix(cli): show every cache folder and its size in gaia cache status - #7132
Conversation
gaia cache status listed only Context7, with no sizes, so it could not answer what is using the disk, which the CLI reference says it does. It now lists each folder under GAIA's cache root with its size and file count, largest first, then the Context7 sections. It doesn't follow symlinks. The CLI reference gives the real cache location and says that clear only covers Context7 today, and gaia init's vision-profile hint points to gaia download --list --agent vlm instead. Closes amd#3221
|
Verdict: Approve with suggestions
One small honesty gap: if a folder inside the cache can't be opened, its contents are silently left out of the size, even though unreadable files are flagged. Counting that folder in the same "unreadable" note would keep the total from quietly under-reporting. Real-world evidenceN/A here: this run produced no evidence bundle. The PR description includes real 🔍 Technical detailsIssues found 🟢 Folders that can't be listed are dropped without a note ( 🟢 A top-level cache file deleted between Checks done
Strengths
|
A cache folder that couldn't be read dropped out of the size without a note, while unreadable files were flagged. A top-level file removed while the listing ran aborted the whole report. Both are now counted as unreadable and the rest of the report still prints.
Summary
gaia cache statusnow lists every cache GAIA keeps under~/.gaia/cache, each with its size and file count, largest first. Before, it showed only Context7, with no sizes, so it couldn't answer "what is using my disk", which is what the CLI reference says it does.Why
The issue's audit ran
gaia cache statusagainst the CLI reference and found the reference promised sizes and every cache directory. The reference also gave a Windows path (%LOCALAPPDATA%) that GAIA doesn't use; caches live under~/.gaia/cache/on every platform.Linked issue
Closes #3221
Changes
gaia cache statuslists each cache folder with size and file count, plus a total, then the Context7 sections as before. It doesn't follow symlinks, so a link out of the cache can't inflate the size or walk the disk.statusprints, and thatclear(including--all) only clears Context7 today. Whetherclear --allshould cover the other caches is left to the maintainers.gaia init's vision-profile hint said to rungaia cache statusto check the vision model is available, which it never showed. It now points togaia download --list --agent vlm.Test plan
Run in a
python:3.12container:pytest tests/unit/test_cache_status_cli.py: 6 passed. The 3 new tests fail onmain.pytest tests/unit: 38,401 passed, 584 skipped, 15 failed, of 38,904 collected, with no crashed workers. The 15 fail the same way onmainin this container: 14 shell-guardrail and skill-grant tests refuseghandnpmbecause neither is installed there, and one expects a folder it can't create, but the container runs as root. 44 tests have::inside their parameters, so they were rerun by file to account for them.python util/lint.py --all: passes.Evidence
gaia cache statuson a real~/.gaia(sizes from that machine):On
mainthe same command prints only the Context7 sections.Checklist
Closes #N/Fixes #N/Refs #N).python util/lint.py --all,pytest tests/unit/).