Skip to content

feat(clang-tidy): add cache pruning for full-repo runs#404

Draft
xmfcx wants to merge 1 commit intomainfrom
feat/clang-tidy-cache-prune
Draft

feat(clang-tidy): add cache pruning for full-repo runs#404
xmfcx wants to merge 1 commit intomainfrom
feat/clang-tidy-cache-prune

Conversation

@xmfcx
Copy link
Copy Markdown
Contributor

@xmfcx xmfcx commented Apr 9, 2026

  • Parent Issue: feat(clang-tidy): add clang-tidy-cache support for faster CI runs #402
  • Add clang-tidy-cache-prune input that removes stale ctcache entries not accessed during the current run
  • Uses a timestamp marker before analysis to identify entries that were not hit by ctcache
  • Includes grouped diagnostic logging showing cache entries/size before analysis, after analysis, and after prune

Why

The ctcache directory grows over time as files are added, renamed, or deleted across commits. In practice the full-repo cache is only ~7 MB so this is not urgent, but it's cheap to keep tidy. This input is intended for main branch runs that analyze all files — PR runs that only touch a subset should not prune, since they wouldn't access entries for files outside their scope.


Test plan

  • Monitor cache size over several main branch runs before enabling pruning
  • Once growth is observed, enable clang-tidy-cache-prune: true on a main branch run and verify the ctcache prune log group shows correct stale entry removal
  • Verify that cache entries accessed during the run survive pruning (compare entry counts before/after)

Add `clang-tidy-cache-prune` input that removes stale cache entries
not accessed during the current run. Uses a timestamp marker before
analysis to identify entries that were not hit. Intended for main
branch runs that analyze all files, not for PR runs that only touch
a subset.

Signed-off-by: Mete Fatih Cırıt <mfc@autoware.org>
@xmfcx xmfcx self-assigned this Apr 9, 2026
@xmfcx xmfcx marked this pull request as draft April 9, 2026 07:42
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