Skip to content

Track canonical map schema_version 5 (drop sources[].notes) - #41

Merged
Xiddoc merged 2 commits into
masterfrom
claude/schema-v4-to-v5-migration-b5j4bg
Jun 22, 2026
Merged

Track canonical map schema_version 5 (drop sources[].notes)#41
Xiddoc merged 2 commits into
masterfrom
claude/schema-v4-to-v5-migration-b5j4bg

Conversation

@Xiddoc

@Xiddoc Xiddoc commented Jun 22, 2026

Copy link
Copy Markdown
Owner

What & why

rosetta-maps owns and already publishes the canonical, language-neutral schema at schema_version: 5 (schema/rosetta-map.schema.json, "const": 5), and every published map under rosetta-maps/maps/** is v5. This Zod client was still hard-gated at literal 4, so it rejected every v5 map — real drift between the three copies of the format.

Per the project hard rule, the three copies of the format move together: the canonical schema first (already done), then both client adapters plus the shared conformance fixtures, in lockstep. This PR is the rosetta-frida half; the rosetta-xposed half is a sibling PR on the same branch name.

The v4 → v5 delta

v5's only field change is the removal of the free-form sources[].notes string. The published map is a pure real→obfuscated mapping consumed by a resolver; human provenance prose has no reader in the artifact and belongs in a signatures/<app>/signatures.yaml comment.

Changes

  • src/types/map.ts: CURRENT_SCHEMA_VERSION 4 → 5; remove notes from the MapSource type.
  • src/validate/schema.ts: drop notes from the strict source schema, so a map carrying notes is rejected as an unknown key.
  • src/validate/schema.test.ts: drop notes from accept fixtures; add a notes-is-now-rejected case (pins the removal in both directions, mirroring the existing confidence removal); flip the version-gate cases (prior version 4 rejected; "newer" bumped to 6; gate-message expectations to 5/6).
  • Bump every fixture / golden / sample / doc literal from 4 → 5 (via the check-schema-version sync script), the sample map, and the rosetta init scaffold (which also dropped its notes).
  • Re-vendor the shared conformance fixtures byte-identical with rosetta-xposed and regenerate the shared SHA-256 manifest in both repos.

npm run verify stays green at 100% coverage (1553 tests).

Downstream (out of scope here)

TickPatch/tools/generate-map.py currently pins generated maps to schema 4 and drops sources[].notes. Once both clients accept v5 and TickPatch bumps its rosetta-xposed dependency, that down-convert can target v5 (or be dropped if the rosetta-maps map becomes directly consumable). Not touched in this PR.

🤖 Generated with Claude Code

https://claude.ai/code/session_01JHk85xK6RVkw16LeLfrwBn


Generated by Claude Code

claude added 2 commits June 22, 2026 16:38
rosetta-maps already owns and publishes the canonical schema at
schema_version 5, which removes the free-form `sources[].notes` string
(human provenance prose has no reader in a resolved real->obfuscated map;
it belongs in a signatures.yaml comment). This client was hard-gated at
literal 4 and rejected every v5 map. Bring the Zod client in lockstep:

- CURRENT_SCHEMA_VERSION 4 -> 5 (the z.literal hard gate).
- Remove `notes` from the MapSource type and the strict source schema, so
  a map carrying `notes` is now rejected as an unknown key.
- Update the schema tests: drop notes from accept fixtures, add a
  notes-is-now-rejected case (pins the removal in both directions), flip
  the version-gate cases (prior version 4 rejected; newer = 6).
- Bump every fixture/sample/golden and doc literal from 4 to 5 (via the
  check-schema-version sync script) and the sample map / init scaffold.
- Re-vendor the shared conformance fixtures byte-identical with
  rosetta-xposed and regenerate the shared SHA-256 manifest in both repos.

`npm run verify` stays green at 100% coverage.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JHk85xK6RVkw16LeLfrwBn
Follow-up to the v5 client bump: the docs still showed schema_version 4
maps, a `notes` field in fenced JSON examples, and `notes?: string` on
the documented MapSource type. Bump the current-format literals to 5 and
drop the removed notes field so the docs match the shipped schema.

`npm run verify` stays green at 100% coverage.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JHk85xK6RVkw16LeLfrwBn
@Xiddoc
Xiddoc merged commit a7631ec into master Jun 22, 2026
5 checks passed
@Xiddoc
Xiddoc deleted the claude/schema-v4-to-v5-migration-b5j4bg branch June 22, 2026 18:26
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