You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
scripts: cap install_state.py stdout and unreferenced_versions (child of #3615) #5513
Found by the claude-ops leg of the scripts audit (#5290), checklist item "output-size truncation limits". Part of #3615.
Problem
plugins/claude-ops/skills/audit-install-state/scripts/install_state.py prints its whole report with json.dump(report, sys.stdout, indent=2) (:2060). On the audit machine that is about 99 KB: unreferenced_versions 29 KB, entries 31 KB, numeric_names 9 KB. unreferenced_versions (:1647, emitted at :1858) returns every unreferenced plugin cache version with no cap. The code's own comment at :2052-2056 says a model reads this JSON end to end, so an install with many stale cache versions lands all of them in context.
Capping the list changes the output schema and the unreferenced_versions contract documented at audit-install-state/SKILL.md:154-159. It needs a SCHEMA bump (claude-install-state/3 to /4), a truncation count, and SKILL.md and test updates. Size S to M.
Proposed remedy
Cap unreferenced_versions at N entries (already sorted largest first); emit unreferenced_versions_total and unreferenced_versions_truncated.
Write the complete list into the --csv companion when given.
Bump SCHEMA to claude-install-state/4.
Consumers found: SKILL.md:154-159 and the CHANGELOG entry for unreferenced_versions; git grep unreferenced_versions finds no other reader.
Acceptance criteria
stdout for an install with hundreds of unreferenced versions stays under a documented size.
The truncation is visible in the JSON (total and truncated fields) and the complete list is reachable through a file artifact.
SCHEMA, SKILL.md and test_install_state.py updated together; the plugin CHANGELOG says the contract changed.
scripts/affected-tests.sh --run and the python3 -m unittest suite in audit-install-state/scripts pass.
Activity
fix(claude-ops): audit bundled scripts against the using-scripts chec…
docs(claude-ops): document the capped unreferenced_versions contract
chore(claude-ops): bump to 0.76.0 for the capped unreferenced_version…