Track canonical map schema_version 5 (drop sources[].notes) - #41
Merged
Conversation
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
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.
What & why
rosetta-mapsowns and already publishes the canonical, language-neutral schema atschema_version: 5(schema/rosetta-map.schema.json,"const": 5), and every published map underrosetta-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[].notesstring. 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 asignatures/<app>/signatures.yamlcomment.Changes
src/types/map.ts:CURRENT_SCHEMA_VERSION4 → 5; removenotesfrom theMapSourcetype.src/validate/schema.ts: dropnotesfrom the strict source schema, so a map carryingnotesis rejected as an unknown key.src/validate/schema.test.ts: dropnotesfrom accept fixtures; add anotes-is-now-rejected case (pins the removal in both directions, mirroring the existingconfidenceremoval); flip the version-gate cases (prior version 4 rejected; "newer" bumped to 6; gate-message expectations to 5/6).check-schema-versionsync script), the sample map, and therosetta initscaffold (which also dropped itsnotes).npm run verifystays green at 100% coverage (1553 tests).Downstream (out of scope here)
TickPatch/tools/generate-map.pycurrently pins generated maps to schema 4 and dropssources[].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