Skip to content

[Workstream N] PR 1 of 6: Updater refreshes every host cache and the ZCode marketplace clone #184

Description

@zaxbysauce

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingseverity:highHigh-severity finding from codebase review

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions