IB-1: freeze security and 11-language foundation - #27
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Introduces a frozen v1 Identity Bridge contract set (security + locale registry) and synchronizes deployable, byte-identical locale registry copies across backend, frontend, and the WordPress companion plugin. Adds locale resolution with English fallback and RTL support for Arabic and Urdu, plus CI/tests to prevent drift and enforce preservation/localization boundaries.
Changes:
- Added versioned contract sources under
contracts/(Identity Bridge v1 + localization policy) and tooling/tests to validate and synchronize runtime copies. - Added shared locale registry copies to backend/frontend/WordPress plugin and implemented locale resolution + direction helpers in each runtime.
- Updated CI and WordPress plugin release packaging/tests to include and validate the registry artifacts.
Reviewed changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/ci.yml | Adds contract validation + locale registry tests to CI. |
| README.md | Links to the new versioned contract documentation locations. |
| backend/app/data/locales.json | Adds backend deployable locale registry copy. |
| backend/app/locales.py | Implements backend locale resolution + direction helpers. |
| backend/tests/test_locales.py | Tests backend locale membership, resolution, fallback, and RTL set. |
| contracts/identity-bridge/v1/README.md | Documents v1 identity bridge and locale contract boundaries. |
| contracts/identity-bridge/v1/locales.json | Adds canonical v1 locale registry source of truth. |
| contracts/identity-bridge/v1/locales.schema.json | Defines JSON schema for the locale registry contract. |
| contracts/identity-bridge/v1/security.json | Adds canonical v1 security contract (TTLs, origin policy, claims, etc.). |
| contracts/localization/v1/README.md | Documents historical-image localization invariants and workflow. |
| contracts/localization/v1/asset-localization.json | Adds localization policy contract for historical assets. |
| contracts/localization/v1/asset-variants.schema.json | Adds schema for localized-asset variant manifests. |
| frontend/config/locales.json | Adds frontend deployable locale registry copy. |
| frontend/lib/locales.ts | Implements frontend locale resolution + direction helper using registry. |
| tools/build_wordpress_plugin_release.py | Ensures plugin release packaging includes config JSON files. |
| tools/sync_identity_contracts.py | Adds tool to validate/synchronize runtime contract copies and reject drift. |
| tools/tests/identity_locales.test.mjs | Validates canonical registry and byte-identical runtime copies (Node). |
| tools/tests/test_build_wordpress_plugin_release.py | Extends release reproducibility test to include locales.json. |
| tools/tests/test_identity_contracts.py | Validates contracts sync and security TTL parity with runtime defaults. |
| tools/tests/test_localization_contracts.py | Validates localization contract invariants and shared locale usage. |
| tools/tests/wordpress_locale_registry.test.php | Adds PHP test to validate WP locale registry resolution + direction. |
| wordpress-plugins/calorieapp-identity-bridge/README.md | Updates plugin documentation for v0.3.0 locale registry support. |
| wordpress-plugins/calorieapp-identity-bridge/calorieapp-identity-bridge.php | Bumps plugin version constant/header to 0.3.0. |
| wordpress-plugins/calorieapp-identity-bridge/config/locales.json | Adds WordPress deployable locale registry copy. |
| wordpress-plugins/calorieapp-identity-bridge/includes/class-calorieapp-identity-bridge-integrated-login.php | Updates embedded asset version default to 0.3.0. |
| wordpress-plugins/calorieapp-identity-bridge/includes/class-calorieapp-identity-bridge-locale-registry.php | Adds WP locale registry loader + resolver + direction helper. |
| wordpress-plugins/calorieapp-identity-bridge/includes/class-calorieapp-identity-bridge.php | Requires the new locale registry class in the plugin bootstrap. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Summary
Naming correction
Gallery Token/gallery-tokenidentifiers introduced by this PR without changing runtime behaviorcalorieapp.locale-registryfor the shared CalorieApp and Identity Bridge locale registrycalorietoken.asset-localizationfor the historical-image localization policyReview follow-up
Safety boundaries
Verification
cdf171c: all four required jobs passed