refactor(disk-hygiene): share the unreferenced plugin-cache-version logic with claude-ops - #5632
Conversation
…eader with claude-ops Refs: #5221 Move registry parsing, installPath resolution and the .orphaned_at marker age into one lib/plugin_cache_versions.py, carried byte-identical by claude-ops and disk-hygiene and registered in the cross-plugin source registry. Each caller keeps its own row shape and passes its own reader; disk-hygiene now reads through a guard that refuses a symlinked marker, as claude-ops does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lugin-cache-versions
…e-version module Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Claude finished @kyle-sexton's task in 3m 25s —— View job Claude code review complete
No blocking findings. This is a clean extract of the unreferenced-plugin-cache-version logic into one shared module, consumed identically by both engines. Notes from the review:
Verification status: I could not execute the test suite or the pinned ruff wrapper in this session ( |
|
Claude finished @kyle-sexton's task in 1m 26s —— View job Security review: no issues found
Scope reviewed: This PR is a pure refactor that extracts the "which plugin cache versions are unreferenced" logic into one byte-identical module ( Notably, the refactor improves the security posture rather than regressing it:
No CRITICAL, IMPORTANT, or SUGGESTION findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f0eb4fe5e1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…sweep-window notes at the shared module Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Claude finished @kyle-sexton's task in 1m 57s —— View job CI security review (
|
|
Claude finished @kyle-sexton's task in 2m 59s —— View job Code review complete
No blocking findings. The latest commit (
Also verified independently://
One non-blocking observation, not a regression from this PR so not filed as a blocking finding: That's pre-existing (unchanged before/after this PR), so the claude-ops engine doesn't get the same fail-closed protection against a corrupted Verification status: test execution and script execution ( |
… heading Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Claude finished @kyle-sexton's task in 55s —— View job CI security review (
|
|
Claude finished @kyle-sexton's task in 46s —— View job Code review (
|
Closes #5221
Summary
Items 1, 2, 4, 5 and 7 of #5221 landed in #5585. This PR completes item 3 (reuse the unreferenced-cache-version logic from the claude-ops install-state audit) and item 6 (coordination with the related deep-inventory work).
disk-hygiene's deep inventory carried its own plugin-cache-version logic, a divergent copy of the claude-opsaudit-install-staterule: it readinstalled_plugins.jsonwithout the guarded read the audit uses.Fix
lib/plugin_cache_versions.py, is carried byte-identical inplugins/claude-ops/lib/andplugins/disk-hygiene/lib/.install_state.pyanddeep_inventory.pyboth call it, so both apply one rule for which cache versions are unreferenced.scripts/cross-plugin-source-registry.txt, soscripts/check-cross-plugin-source-drift.shfails if the copies diverge.claude-ops0.77.3 anddisk-hygiene0.40.1, each with a CHANGELOG entry./disk-hygiene:audit(feat(disk-hygiene): add model-invocable read-only audit skill #5590), reads the scanchildren_rollup. The shared listing schema for the managed-state lane (disk-hygiene: add a gated managed-state lane with a bundled owner registry #4006) lives inplugins/disk-hygiene/skills/clean/scripts/deep_inventory.py(ROW_COLUMNS). disk-hygiene: add a gated managed-state lane with a bundled owner registry #4006 is not folded in and its scope is unchanged.Verification
bash scripts/check-changelog-parity.sh --check: passbash scripts/check-changelog-parity.sh --check-order: pass (102 changelogs)bash scripts/check-changelog-parity.sh --check-bump origin/main: passbash scripts/validate-plugins.sh: all manifests and the catalog validatedbash scripts/check-changed-skills.sh origin/main: 2 skills checked, 0 failedbash scripts/check-cross-plugin-source-drift.sh: exit 0;lib/plugin_cache_versions.pyIDENTICAL [registered]python3 -m unittestontest_deep_inventory.py(52 tests) andtest_install_state.py(91 tests): OKRelated
children_rollup, so there is no second listing to alignROW_COLUMNSinplugins/disk-hygiene/skills/clean/scripts/deep_inventory.py, for the managed-state lane to emit. Not folded in here.🤖 Generated with Claude Code