Skip to content

fix(cache): show details for verbose size#346

Open
OnlyYu1996 wants to merge 1 commit into
CortexLM:mainfrom
OnlyYu1996:fix-cache-size-verbose-output
Open

fix(cache): show details for verbose size#346
OnlyYu1996 wants to merge 1 commit into
CortexLM:mainfrom
OnlyYu1996:fix-cache-size-verbose-output

Conversation

@OnlyYu1996
Copy link
Copy Markdown

Fixes PlatformNetwork/bounty-challenge#53106.

Changes:

  • Passes the global --verbose flag into the cache command handler.
  • Keeps default cortex cache size output as the single human-readable size line.
  • Adds verbose cache size details: cache directory, existence, total item count, and per-category size/item/path rows.
  • Returns full cache stats for cortex --verbose cache size --json, while preserving the existing compact JSON shape for non-verbose JSON.
  • Adds regression tests for verbose text and verbose JSON details.
  • Fixes a stale test import so the cortex-cli test target builds on current main.

Validation:

  • cargo +stable fmt --package cortex-cli --check
  • cargo +stable test --package cortex-cli cache_cmd::tests::test_cache_size_verbose -- --nocapture
  • cargo +stable check --package cortex-cli --lib
  • cargo +stable build --package cortex-cli --bin Cortex
  • Smoke: target/debug/Cortex.exe cache size --color never vs target/debug/Cortex.exe --verbose cache size --color never are no longer identical; verbose output includes cache directory and categories.
  • git diff --check

Copy link
Copy Markdown

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

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.

[BUG] [v0.0.7] cortex cache size --verbose produces identical output to the default run

1 participant