fix(migration): cache the parity clone outside the repository - #5
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
PR #4 made the parity harnesses self-contained, but cached the frozen-source clone under
.parity-cache/inside the working tree. That clone containspackages/spec/schema/v1.jsonand the old ambient@workspacejson/specdeclaration — exactly the contentscripts/check-architecture.mjsexists to reject. So on any machine that has run a parity harness:pnpm check:architectureexits 1 with 2 violations (copied-schema,shadowed-standard-types)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 viaWORKSPACEJSON_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.gitignoreentry stays so a stale pre-move cache never gets committed.Verification (cache relocated, all from documented entry points)
node scripts/check-architecture.mjsnode scripts/check-architecture.test.mjsnode migration/parity-datahub-shim.mjsmigration/parity-agents-audit-runtime.shmigration/parity-agents-audit-pack.sh.parity-cache/after all runs