Skip to content

fix(migration): cache the parity clone outside the repository - #5

Merged
qmarcelle merged 1 commit into
mainfrom
fix/parity-cache-outside-repo
Jul 26, 2026
Merged

qmarcelle merged 1 commit into
mainfrom
fix/parity-cache-outside-repo

Conversation

@qmarcelle

Copy link
Copy Markdown
Contributor

Problem

PR #4 made the parity harnesses self-contained, but cached the frozen-source clone under .parity-cache/ inside the working tree. That clone contains packages/spec/schema/v1.json and the old ambient @workspacejson/spec declaration — exactly the content scripts/check-architecture.mjs exists to reject. So on any machine that has run a parity harness:

  • pnpm check:architecture exits 1 with 2 violations (copied-schema, shadowed-standard-types)
  • the red-test baseline fails (18/19: "unmodified repository was REJECTED")

gitignoring the directory doesn't help — the guard walks the working tree, not the index. CI never saw this because it checks out clean; it bites every local run of the gate.

Fix

Default the cache to ~/.cache/workspacejson/cli-parity (XDG-aware, overridable via WORKSPACEJSON_PARITY_CACHE). The guard and its red tests are unchanged — they were correctly rejecting a frozen-source clone inside the repository; the cache location was the intruder. The .gitignore entry stays so a stale pre-move cache never gets committed.

Verification (cache relocated, all from documented entry points)

Gate Result
node scripts/check-architecture.mjs pass — 72 files, 4 manifests, 0 violations
node scripts/check-architecture.test.mjs 19/19
node migration/parity-datahub-shim.mjs 35/35
migration/parity-agents-audit-runtime.sh 27/29 — the two recorded META-236 intentional differences
migration/parity-agents-audit-pack.sh identity fields 11/11, diffs as recorded in CONTRIBUTING.md
in-repo .parity-cache/ after all runs not recreated

The parity harnesses cached the frozen-source clone under .parity-cache/
inside the working tree. That clone contains packages/spec/schema/v1.json
and the old ambient @workspacejson/spec declaration — exactly the content
scripts/check-architecture.mjs exists to reject — so running any harness
turned the architecture guard red (copied-schema, shadowed-standard-types)
and broke the red-test baseline (18/19). gitignoring the directory does not
help: the guard walks the working tree, not the index.

Default the cache to ~/.cache/workspacejson/cli-parity (XDG-aware,
overridable via WORKSPACEJSON_PARITY_CACHE). The guard and its red tests
are unchanged: they were correctly rejecting a frozen-source clone inside
the repository; the cache location was the intruder.

Verified with the cache relocated:
- check-architecture: pass (72 files, 4 manifests)
- red tests: 19/19
- parity-datahub-shim: 35/35
- parity-agents-audit-runtime: 27/29 (the two recorded META-236 differences)
- parity-agents-audit-pack: identity fields 11/11
- no .parity-cache/ recreated in-repo
Copilot AI review requested due to automatic review settings July 26, 2026 04:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@qmarcelle
qmarcelle merged commit 4055fa4 into main Jul 26, 2026
2 checks passed
@qmarcelle
qmarcelle deleted the fix/parity-cache-outside-repo branch July 26, 2026 05:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants