Part of #100 (EPIC). Workstream N. One issue = one PR.
Source: zmem deep audit 2026-09-10 (https://claude.ai/code/artifact/39012f75-25f0-441b-978f-cc90a3bd3a9d) and issue plan v3 (https://claude.ai/code/artifact/59e74242-17da-4416-9b00-0b0cf347837c); dependency DAG computed over all open PRs (edge kinds: Depends on = merged artifact, Schema after = migration lane, Gated on = #100 measurement/decision gate).
Labels: bug, severity:high. Depends on: none. Blocks: N-2 (#185).
Problem. The scheduled updater (~/.codex/scripts/update-zmem.ps1) only runs codex plugin add; Claude and ZCode caches drift (evidence/desktop-evidence.txt: Codex 0.28.0, Claude and ZCode 0.27.0, ZCode marketplace clone 0.14.0).
Design. scripts/refresh_hosts.py --checkout <path> [--hosts …] [--dry-run] --report <json>: mirrors the checkout into each host cache with the drift-runbook exclusions, updates version/gitCommitSha in both registry formats (Claude v2 dict-of-scopes, ZCode v1 list; exported readers reused by N-2 (#185)), refreshes the ZCode marketplace clone manifests, writes a report JSON validated by scripts/refresh-report-schema.json, exits non-zero on any mismatch; the scheduled task calls it after codex plugin add.
Acceptance criteria. (a) tests/fixtures/hosts/ (three fake cache roots and registries) → expected post-state files, byte-identical. (b) --dry-run writes nothing (tree SHA-256 compare). (c) Unknown registry schema version refused. (d) Report JSON from a run on the fixture validates against the schema and lists three hosts; the PR body attaches one real report from the operator box validated the same way.
Part of #100 (EPIC). Workstream N. One issue = one PR.
Source: zmem deep audit 2026-09-10 (https://claude.ai/code/artifact/39012f75-25f0-441b-978f-cc90a3bd3a9d) and issue plan v3 (https://claude.ai/code/artifact/59e74242-17da-4416-9b00-0b0cf347837c); dependency DAG computed over all open PRs (edge kinds: Depends on = merged artifact, Schema after = migration lane, Gated on = #100 measurement/decision gate).
Labels: bug, severity:high. Depends on: none. Blocks: N-2 (#185).
Problem. The scheduled updater (
~/.codex/scripts/update-zmem.ps1) only runscodex plugin add; Claude and ZCode caches drift (evidence/desktop-evidence.txt: Codex 0.28.0, Claude and ZCode 0.27.0, ZCode marketplace clone 0.14.0).Design.
scripts/refresh_hosts.py --checkout <path> [--hosts …] [--dry-run] --report <json>: mirrors the checkout into each host cache with the drift-runbook exclusions, updatesversion/gitCommitShain both registry formats (Claude v2 dict-of-scopes, ZCode v1 list; exported readers reused by N-2 (#185)), refreshes the ZCode marketplace clone manifests, writes a report JSON validated byscripts/refresh-report-schema.json, exits non-zero on any mismatch; the scheduled task calls it aftercodex plugin add.Acceptance criteria. (a)
tests/fixtures/hosts/(three fake cache roots and registries) → expected post-state files, byte-identical. (b)--dry-runwrites nothing (tree SHA-256 compare). (c) Unknown registry schema version refused. (d) Report JSON from a run on the fixture validates against the schema and lists three hosts; the PR body attaches one real report from the operator box validated the same way.