Repository navigation
Content in more than one language, edition groups and store states (moca-spec 0.8.0) - #33
Closed
petecleary wants to merge 7 commits into
Closed
petecleary wants to merge 7 commits into
petecleary wants to merge 7 commits into
Conversation
added 7 commits
November 28, 2026 22:14
The vendored schemas match moca-spec's again: tracks, and a node's own language. New codes C012, A011, O006, O007 and S011 to S014. The core relation types gain translationOf and editionOf, which only report.
Ported from the reference Reader for moca-spec 0.8.0. MOCA_VERSION is 0.8. - A locale is a tag or a priority list (package spec §5.4), capped at 16 entries of 35 characters (S014). The lookup tags the default file with its node's language and takes the lowest longer tag, with a script guard. - A translation inherits what it does not write from its default file, and a retired one falls back as a missing one does (contract §9.2 step 5.4). - localeMode first and only (contract §9). - Edition groups (package spec §7.4): one edition per slot with a locale, editions and choose_edition on the structure (contract §10). - Package states carry what a store search needs to choose alike, and a missing state withholds records (contract §9.4, S011). - Caption tracks, a node's own language, and locale coverage.
Follows moca-spec 0.8.0's adapter: localeMode and editions in a search, options.withhold for a store, the editions and chooseEdition structure operations, and localeCoverage.
What the corpus does not reach: the caps of 16 entries and 35 characters, lengths counted in UTF-16 code units, S014 naming no language, the bound for localeMode first, SemVer precedence.
A package can be a composite with members and a trust root, and a scenario can set locale, localeMode and editions. The search's own codes are compared too. New scenarios over moca-spec's language fixtures.
Contributor
Author
|
This work continues in 0.8.0 |
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.
Brings the Python Reader to moca-spec 0.8.0 (release-0.8.0 at a296758), the same as the reference Reader at a433f2a: content in more than one language, edition groups and store states.
What it adds (ported module for module from the reference Reader's lib/):
locale.py,inherit.py,editions.pyandavailability.py;localeas a priority list (capped at 16 entries of 35 characters,S014),localeModefirst and only;editions,choose_edition);StoreScope(allow=);locale_coverage.Schemas are copied from the reference Reader (byte-identical to
schemas/v1).MOCA_VERSIONis0.8; the package version is unchanged.Pins:
MOCA_SPEC_REFa296758 andMOCA_READER_TYPESCRIPT_REFa433f2a (release-0.8.0); moca-tools stays at v0.7.0. The getting-started guide job still runs locally.Corpus, before and after: 527 of 645 cases passed before (118 failed, 23 of them by crashing the runner); now:
The parity run was 87 queries in 18 scenarios before. The new ones cover locale lists (including one over the cap),
localeModeon the lexical backend and on a store with states, retired translations, a node's own language, and a signed edition group. Unit tests are intests/test_languages.py.Not changed here: the LangChain and LlamaIndex bindings still take
localeas one string;pyproject.toml's description still says moca-spec 0.7.