Skip to content

feat: add public cache management API#10

Merged
justinmerrell merged 5 commits intomainfrom
feat/cache-management-api
Mar 29, 2026
Merged

feat: add public cache management API#10
justinmerrell merged 5 commits intomainfrom
feat/cache-management-api

Conversation

@justinmerrell
Copy link
Copy Markdown
Contributor

Summary

  • Add CacheInfo, CachedBundle, and CachedBundleVersion frozen dataclasses for structured cache inspection
  • Add scan() method to BundleCache for walking and summarizing cache contents
  • Expose 5 cache management methods on Client: cache_info(), cache_remove(), cache_clear(), cache_clean(), cache_path()
  • Add module-level convenience functions (musher.cache_info(), etc.) that work without auth credentials
  • 22 new tests covering types, scan logic, module-level functions, and Client delegation

Test plan

  • task check passes (format + lint + types + tests)
  • All 219 tests pass with 95% coverage
  • Verify musher.cache_info() works against a real populated cache
  • Verify musher.cache_remove("ns/slug:version") removes only the target version
  • Verify musher.cache_clear() removes the entire cache directory

🤖 Generated with Claude Code

justinmerrell and others added 5 commits March 29, 2026 21:17
Expose cache inspection and management to users via module-level
convenience functions and Client methods. Users can now scan cache
contents, remove specific bundles, clean expired entries, and clear
the entire cache — all without requiring auth credentials for
read-only operations.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add dorny/paths-filter to skip devcontainer build, shellcheck, and
  compose validation when their respective files haven't changed
- Add GHCR-based cacheFrom for devcontainer builds to reuse layers
- Add validate-status rollup job for branch protection compatibility
- Bump actions/checkout to v6 and use dorny/paths-filter@v4

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@justinmerrell justinmerrell merged commit 4038930 into main Mar 29, 2026
6 checks passed
@justinmerrell justinmerrell deleted the feat/cache-management-api branch March 29, 2026 22:09
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