perf(harness-ops): plugin cache holds 1,053 version folders (1.5 GB) from release cadence; report churn, reduce versions
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 22/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- python
- 領域
- performance, tooling
調査の方向性
Start with plugins/harness-ops/lib/plugin_cache_versions.py (ORPHAN_SWEEP_DAYS = 14) and the report section of plugins/harness-ops/skills/audit-install-state/SKILL.md near line 144. The only code-level item is adding a report-only line for weekly orphan creation rate and the top 10 plugins by retained versions. The release-cadence ceiling needs a maintainer decision before anyone can finish it. Done means the report shows those numbers and deletes nothing.
索引モデルが issue の本文から書いたものです。
説明
Related: #6244 (Windows performance audit tracker).
Problem
The plugin cache on the windows lane holds 1,053 version folders across 130 plugins (1.5 GB; cache/melodic-software alone is 984 MB, 940 folders). 95 plugins are enabled. The folders are not leaked: 905 carry an .orphaned_at marker and none is past the product's 14-day sweep. The volume comes from release cadence (the melodic-software plugins publish many versions per fortnight), and each version is a full copy.
This matters beyond disk: ~/.claude holds 195,094 files and a full walk took 21.5 s on this host (see melodic-software/provisioning issue on Defender exclusions); the cache is a large share of the file count that every scan, backup, and audit walks.
Measured
Method (direct, on melo-desk-001, 2026-10-08):
for m in ~/.claude/plugins/cache/*; do ls -d $m/*/*; done | wc -lreturns 1,053 (version folders);for m in ~/.claude/plugins/cache/*; do ls -d $m/*; done | wc -lreturns 130 (plugins).find ~/.claude/plugins/cache -maxdepth 4 -name .orphaned_at | wc -lreturns 905.- Marker age (days since
.orphaned_at, first 400 markers): 0 to 11 days, none at 14 or more. jq '[.enabledPlugins|to_entries[]|select(.value==true)]|length' ~/.claude/settings.jsonreturns 95.du -sh ~/.claude/plugins/cachereturns 1.5G.
What the harness offers
- Product: "When you update or uninstall a plugin, Claude Code writes an
.orphaned_atmarker into the previous version directory. It removes that directory in a background cleanup 14 days later" (https://code.claude.com/docs/en/plugins/loading, "Cleanup of previous versions"). I found no setting or flag to shorten that window. harness-ops:audit-install-statealready models this:plugins/harness-ops/lib/plugin_cache_versions.py(ORPHAN_SWEEP_DAYS = 14) classifies each folder, andplugins/harness-ops/skills/audit-install-state/SKILL.md:144marks in-window foldersproduct-managed-healthywith "Do not hand-prune". It offers report-only retention classification; deletion belongs to/disk-hygiene:cleanand only for folders past the window.
So the audit does not offer a shorter retention; it correctly refuses to hand-prune in-window orphans (a running session may still load them).
Proposed fix
Reduce what creates the folders, since retention cannot be shortened:
- Release batching: publish a plugin version only when behavior changes, and batch the fragment-only chores (the release flow in
chore(release): release N plugins). Count versions published per plugin over the last 14 days (ls -d ~/.claude/plugins/cache/melodic-software/<plugin>/* | wc -l; guardrails alone has 15) and set a per-plugin ceiling. - Fewer large plugins in the default enabled set, or a lean-profile marketplace, so 95 enabled plugins is not the baseline.
- In
audit-install-state, add a line that reports the weekly orphan creation rate and the top 10 plugins by retained version count, so the churn is visible. (Report only; no deletion.)
Basis: the 14-day product sweep above; measured marker ages. Judgment on the ceiling in item 1: no source gives a number, so the ceiling needs a decision with the evidence from the count above.
Expected saving
Folders retained scale with versions per plugin per 14 days. Halving the cadence would roughly halve the 905 orphaned folders and about 700 MB of the cache. Not a performance fix by itself; it lowers file count for every scan of ~/.claude.
Verify after the fix
- Re-run the counts above after one full 14-day window; orphan marker count and
du -shdrop proportionally. /harness-ops:audit-install-stateshows no folder past the sweep window.
- 主要言語
- Shell
- スター
- 22
- フォーク
- 2
- 平均マージ
- 8時間 41分
- マージ済み PR(30日)
- 892
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
melodic-software/claude-code-plugins のほかの issue
-
good first issue needs-human priority: low work-class: mechanical
難易度 2/5 1〜3時間 初心者へのやさしさ 92/100
melodic-software/claude-code-plugins#8023 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
needs-human work-class: mechanical
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
melodic-software/claude-code-plugins#8021 ·
メンテナーはふだん 1 日以内に返信
-
needs-human work-class: scoped
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
melodic-software/claude-code-plugins#8018 ·
メンテナーはふだん 1 日以内に返信
-
docs(planning): point the interview surface context at the surface README instead of restating itオープンneeds-human work-class: mechanical
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
melodic-software/claude-code-plugins#8015 ·
メンテナーはふだん 1 日以内に返信
-
needs-human work-class: mechanical
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
melodic-software/claude-code-plugins#8004 ·
メンテナーはふだん 1 日以内に返信
melodic-software/claude-code-plugins の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
-
good first issue packaging
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
-
help wanted let's document new command
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
tldr-pages/tldr#24773 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 63/100
メンテナーはふだん 1 日以内に返信