Repository navigation
Description
Agent Brief
Type: Task
Summary: Move the plugin-cache-version reader that harness-ops and disk-hygiene keep identical by hand into lib/, so scripts/sync-shared-copies.sh generates both plugin copies (part of restructuring pass #14622).
Current behavior:
plugins/harness-ops/lib/plugin_cache_versions.py and plugins/disk-hygiene/lib/plugin_cache_versions.py are kept byte-identical by hand; both are blob 1bb33df4, 110 lines. scripts/cross-plugin-source-registry.txt:586-591 registers them with "No dedicated check", names the harness-ops file as the canonical, and says to "copy it into plugins/disk-hygiene/lib/ to fix a drift failure". The module's docstring says it "is carried byte-identical by every plugin that uses it" (:13-14). Each caller imports it by module name from its own plugin's lib/: plugins/harness-ops/skills/audit-install-state/scripts/install_state.py:48-52 and plugins/disk-hygiene/skills/clean/scripts/deep_inventory.py:41-45.
Desired behavior:
The canonical moves with git mv to lib/plugin_cache_versions.py, so history follows it. Two rows in scripts/shared-copies.txt, lib/plugin_cache_versions.py plugins/harness-ops/lib/plugin_cache_versions.py and the same for plugins/disk-hygiene/lib/, register both copies, and scripts/sync-shared-copies.sh regenerates them at their current paths. Each copy differs from the canonical only by the 2-line GENERATED header before the docstring, the .py form at plugins/harness-ops/lib/spawn_noise.py:1-2 (rows scripts/shared-copies.txt:21-22). The registry entry (:586-591) says "Dedicated check: scripts/sync-shared-copies.sh --check" and gains the cluster line lib/plugin_cache_versions.py -> plugins/*/lib/plugin_cache_versions.py, as lib/spawn_noise.py has (:183-188). The docstring sentence at :13-14 says the plugin copies are generated from lib/plugin_cache_versions.py.
Dependencies: this item appends to scripts/shared-copies.txt; if another change appending there lands first, rebase on it.
Files:
lib/plugin_cache_versions.py(moved fromplugins/harness-ops/lib/; docstring sentence only)scripts/shared-copies.txtscripts/cross-plugin-source-registry.txtplugins/harness-ops/lib/plugin_cache_versions.py(generated)plugins/disk-hygiene/lib/plugin_cache_versions.py(generated)- a new
patchfragment in.changes/harness-ops/and one in.changes/disk-hygiene/:### Changed, "Internal restructuring, no behavior change."
Key interfaces:
- Both callers keep importing the copy in their own plugin's
lib/at its current path, and the module's code, names and return values are unchanged. - No canonical stays inside a plugin: a canonical without a header beside a copy with one would read as drifted.
plugins/harness-ops/skills/audit-install-state/SKILL.md:177-178andplugins/disk-hygiene/skills/clean/reference/scan-flags.md:83name the plugin-relative path, which does not move, and the two plugin copies stay identical to each other; neither file changes.
Acceptance criteria:
- The canonical lives at
lib/plugin_cache_versions.py, both plugin copies are generated byscripts/sync-shared-copies.sh, and the registry entry names that check. - Behavior is unchanged: the same outputs, exit codes and printed results for the same inputs.
- The diff edits only the listed files and the lines of a test that assert on them when the change breaks that assertion.
- The pull request stays within 400 changed lines, not counting the moved canonical and regenerated copies, and 15 hand-edited files.
-
scripts/sync-shared-copies.sh --checkandscripts/check-cross-plugin-source-drift.sh --checkpass. -
plugins/harness-ops/skills/audit-install-state/scripts/install_state.test.shandplugins/disk-hygiene/skills/clean/scripts/deep_inventory.test.shpass. - ci-status is green.
Out of scope:
- The module's code, the callers, test code and assertions, other duplication, eval cases, fixtures, and skill and agent text.
Metadata
Metadata
Assignees
Labels
Type
Fields
Work status
Priority
Activity
melodic-automation-lanes commentedon Nov 12, 2026
{"v":1,"actor_id":337595936,"title_sha256":"1d23d629952ce5b6f11691622fb2050fa4ad912fafc08a50286fba0d8016b34d","body_sha256":"7e09688941e4aa49a69349aab4cb3ca1d861f33098f8a5312a2749b11e1230cf"}
github-actions commentedon Nov 12, 2026