Document parity infrastructure in CLAUDE.md; guard settings:check against unguarded keys#14
Merged
Merged
Conversation
Records the spec/, tokens/, settings-schema/, copy/, and test/desktop/ work merged in PR #13 so future sessions know it exists and how to not break it: - spec/ is the platform-neutral source of truth (F1–F24 / D1–D14 / the substrates / blocking-backends design) - the three source-of-truth substrates generate mobile Swift/Kotlin and GUARD the desktop against drift — the critical rule being that changing a token in styles.css/pages.css, a default/enum in settings.js, or a slash-command hint in overlay.js/shortcuts.js requires updating the matching JSON (or substrate:check / CI fails), since the desktop is guarded, not generated - test/desktop/ + the BLANC_TEST-gated (unpackaged, exactly "1") test-hook.js, the only parity change to shipping code - parity-guards.yml enforces it all on push/PR Follow-up after the PR #13 squash-merge; branch restarted from the merged main (0.12.0, which also carries PR #12's profile sync). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FUj45U1QdpG7LWgXRwxA6W
The settings guard validated known schema keys but ignored EXTRA keys in settings.js DEFAULTS, so a newly added user-facing setting could slip through unguarded (surfaced by PR #12's internal `_syncMeta` clock, which the check silently accepted). Now every DEFAULTS key must be a known schema setting or listed in schema.json's new `internalDefaults` allowlist (desktop-only keys not synced to mobile — `_syncMeta` today). The allowlist is a forcing function: adding a settings key now requires deciding whether it's mobile-facing (→ schema) or internal (→ allowlist). Verified: substrate:check green (with _syncMeta allowlisted); negative- tested — a bogus DEFAULTS key fails the check with an actionable message. No generated files changed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FUj45U1QdpG7LWgXRwxA6W
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.
Follow-up to the merged parity work (#13).
spec/, the tokens/settings/copy substrates (and the critical guard rule: change a desktop value → update its source-of-truth JSON orsubstrate:check/CI fails), thetest/desktop/harness + theBLANC_TEST-gated hook, and the parity-guards CI.settings:checkhardening — the settings guard validated known schema keys but ignored extra keys insettings.jsDEFAULTS, so a new user-facing setting could slip through unguarded (surfaced by Ship end-to-end encrypted profile sync (v1: Favorites + settings) #12's internal_syncMetaclock, which the check silently accepted). Now everyDEFAULTSkey must be a schema setting or listed inschema.json's newinternalDefaultsallowlist (desktop-only keys not synced to mobile).Verified:
substrate:checkgreen; the extra-key detection negative-tested (a bogusDEFAULTSkey fails with an actionable message); no generated files changed.🤖 Generated with Claude Code
https://claude.ai/code/session_01FUj45U1QdpG7LWgXRwxA6W
Generated by Claude Code