Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

perf(harness-ops): plugin cache holds 1,053 version folders (1.5 GB) from release cadence; report churn, reduce versions

Abierto
#6,636 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
22/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

needs-human needs-triage

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 -l returns 1,053 (version folders); for m in ~/.claude/plugins/cache/*; do ls -d $m/*; done | wc -l returns 130 (plugins).
  • find ~/.claude/plugins/cache -maxdepth 4 -name .orphaned_at | wc -l returns 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.json returns 95.
  • du -sh ~/.claude/plugins/cache returns 1.5G.

What the harness offers

  • Product: "When you update or uninstall a plugin, Claude Code writes an .orphaned_at marker 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-state already models this: plugins/harness-ops/lib/plugin_cache_versions.py (ORPHAN_SWEEP_DAYS = 14) classifies each folder, and plugins/harness-ops/skills/audit-install-state/SKILL.md:144 marks in-window folders product-managed-healthy with "Do not hand-prune". It offers report-only retention classification; deletion belongs to /disk-hygiene:clean and 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:

  1. 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.
  2. Fewer large plugins in the default enabled set, or a lean-profile marketplace, so 95 enabled plugins is not the baseline.
  3. 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 -sh drop proportionally.
  • /harness-ops:audit-install-state shows no folder past the sweep window.
Lenguaje dominante
Shell
Estrellas
22
Forks
2
Merge medio
7 h 8 min
PR fusionados (30 d)
874

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de melodic-software/claude-code-plugins

Todos los issues de melodic-software/claude-code-plugins

Issues similares

Más issues de Shell/Bash

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.