fix(dsl): v0.11.0 -> v0.14.0 grammar migration (0.14.1)#46
Merged
Conversation
Register the extension-only hop between the v0.11.0 grammar and
the v0.14.0 grammar in the migration chain. v0.14.0 adds two
productions to the `_draw_arg` choice, `family_call_arg` (nested
`Family(...)` at draw-arg position, e.g.
`Mixture([0.3, 0.7], [PointMass(0), Poisson(rate)])`) and
`list_arg` (bracketed list literal at draw-arg position). Every
other rule keeps its v0.11.0 shape: no rule is renamed, removed,
or reshaped.
Every `.qvr` source that parses under v0.11.0 also parses under
v0.14.0, so `v0_11_0_to_v0_14_0.migrate` is byte-identity. The
empty SOURCE_RULE_COVERAGE reflects "no removed rules to cover":
`qvr migrate --check` reports the hop's added_rules as
`family_call_arg`, `list_arg` and uncovered_removed as `[]`.
Rebuild panproto VCS snapshots + tree-sitter parser libraries so
the chain terminates on v0.14.0's grammar:
python grammars/qvr/vcs/build_schemas.py --reset
python grammars/qvr/vcs/build_parsers.py
The rebuild produces the v0.14.0 snapshot under
`grammars/qvr/vcs/parsers/v0.14.0/` and updates the panproto VCS
object store under `grammars/qvr/vcs/.panproto/`. Chain integrity
verified end-to-end: `check_chain_coverage(CHAIN, COVERAGE)`
returns no uncovered_removed rules on any adjacent pair;
`compose_migration("v0.2.0", "v0.14.0")` composes cleanly;
`v0.11.0` source round-trips byte-identically through the
`v0.11.0` -> `v0.14.0` hop; every fenced `.qvr` doc block in
`tests/test_doc_blocks.py` (160 fixtures) parses under HEAD.
Bump to 0.14.1 for the patch release.
995bc13 to
dde903c
Compare
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
Register the v0.11.0 -> v0.14.0 grammar migration hop that the 0.14.0 release should have shipped. v0.14.0 changed the grammar (added
family_call_argandlist_argproductions to_draw_arg) but no migration was written; this restores the invariant that every grammar-changing release ships a corresponding hop insrc/quivers/cli/migrations/.Motivation
The migration chain in
src/quivers/cli/migrations/__init__.pyis the tool that lets a user with a.qvrfile written against any historical grammar walk their source forward through every intermediate release to head-of-tree viaqvr migrate --from <TAG> --to HEAD. The CI gate that keepscheck_chain_coverage(CHAIN, COVERAGE)clean (no removed rules without a converter) ensures that migration is real, not aspirational.v0.14.0 was tagged without adding to
CHAINorMIGRATORS. The chain still terminated at v0.11.0 and a caller pointing at v0.14.0 grammar would fall out of the composition. This PR closes that gap.Changes
src/quivers/cli/migrations/v0_11_0_to_v0_14_0.py(new): the hop between the two grammar revisions. v0.14.0 adds two productions to the_draw_argchoice (family_call_arg,list_arg) and touches no other rule. Every v0.11.0 source that parses under v0.11.0 also parses under v0.14.0, somigrateis byte-identity.SOURCE_RULE_COVERAGE = frozenset()reflects "no removed rules to cover", matching the extension-only pattern inv0_9_0_to_v0_10_0.py.src/quivers/cli/migrations/__init__.py: append"v0.14.0"toCHAIN, register the hop inMIGRATORSandCOVERAGE.grammars/qvr/vcs/parsers/v0.14.0/(new): tree-sitter parser snapshot for the v0.14.0 grammar (qvr.dylib+ regeneratedparser.c,grammar.json,node-types.json).grammars/qvr/vcs/.panproto/: panproto VCS object store rewritten bybuild_schemas.py --reset, with the v0.14.0 commit added on top of the v0.11.0 commit (v0.14.0 introduces 2 rules, 5 field edges).API impact
The public
CHAINtuple lengthens by one. Every previously-composed migration path still works and yields the same output. Callers targetingqvr migrate --to HEADnow traversev0.11.0 -> v0.14.0as an extra hop, but the hop is byte-identity.Tests
qvr migrate --checkreturns exit 0 for the full chain; the v0.11.0 -> v0.14.0 pair reportsadded_rules: family_call_arg, list_arganduncovered_removed: [].compose_migration("v0.2.0", "v0.14.0")composes without error.pytest tests/test_doc_blocks.py -qruns 160 tracked.qvrfenced fixtures against HEAD grammar: 160 passed.python grammars/qvr/vcs/build_schemas.py --resetandpython grammars/qvr/vcs/build_parsers.pysucceed and produce the expected v0.14.0 snapshot.grammars/qvr/changed).Documentation
docs/updated.docs/developer/changelog.mdhas aUnreleasedentry for this change.docs/semantics/updated (if the change affects the meaning of any DSL construct).The migration itself does not add behaviour that needs user-facing documentation beyond the existing
qvr migrateCLI help. Follow-up PR can add a CHANGELOG entry if maintainers want the migration fix noted in the next release notes.Checklist
.panproto/objects/**files are content-addressed schema snapshots produced bybuild_schemas.py --reseton every grammar bump; that's the accepted repo pattern.)