Repository navigation
test(extension): qualify the MEP 0.2.0-draft.1 model line and prepare 0.6.0 - #80
Merged
Merged
Conversation
… 0.6.0 Extension 0.5.0 already serves morphir.frontend.compileModel and morphir.backend.generateModel on MEP 0.2.0-draft.1 and keeps 0.1. Add the tests that it lacked: - a host that prefers Ion but also offers JSON agrees on JSON; - a host that offers only Ion gets no model tuple and keeps 0.1 compile; - compile admission does not grant generation; - a wrong envelope version is refused in each direction; - golden envelopes, exact payload bytes and generated files for IR 3.0.0 and 4.0.0 through a negotiated session; - the process executable serves both model operations and stops by itself. Keep the golden files byte-exact (no line-ending conversion, no whitespace hooks). Set the compiler crate to 0.6.0 for the release with Ruff 0.0.20 and the current dependencies. Add the OpenSpec change qualify-mep-model-line with the host-default scenario.
… line The candidate passes describe, model compile, generate, consumer check and recompile from the native and npm CLIs as WASM and process guests. Record that the host refuses IR 3 on the model line and that a WASM worker on the npm CLI stops by thread termination.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Refusals now assert the JSON-RPC code and reason: -32013 for an operation the session did not negotiate and -32602 unsupported_tuple for a wrong envelope version. The compile-only and wrong-envelope tests first show the unchanged generate request succeeds, so a malformed request cannot pass as a refusal.
Member
Author
Review findings and release dry runThe review findings were checked one by one:
CI is green at d70053a. Release dry run. Run 41267831018 at d70053a succeeded:
Every publish job was skipped.
MoonBit worker host, dry-run bytes. finos/morphir-moonbit Merge and the |
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
Extension
0.5.0(released 2026-10-28, PR #54) already declares MEP0.2.0-draft.1and keeps0.1. It servesmorphir.frontend.compileModelandmorphir.backend.generateModel, with claims version0.1.0-draft.2. This PR adds the tests and the host qualification that were missing, and prepares release0.6.0with the current dependencies (Ruff0.0.20). The protocol, claims and tuples do not change.OpenSpec change:
openspec/changes/qualify-mep-model-line· beadmorphir-ukvn.1.6.9Model transport tuples
morphir.frontend.compileModelmorphir-irmorphir-json0.1.0-draft.13.0.0,4.0.0morphir.backend.generateModelmorphir-irmorphir-json0.1.0-draft.13.0.0,4.0.0Ion: not offered. The extension advertises no Ion tuple. It refuses Ion payloads and Ion evidence on WASM and native alike, and it never converts Ion to JSON.
Changes
model_session.rs: tests for a host that prefers Ion and also offers JSON (the guest agrees on JSON in the host's order, as test(rust): show the guest negotiates an advertised model format morphir-gleam#31 does); an Ion-only host (no model tuple, no conversion,0.1compile still works); compile admission that does not grant generation; wrong envelope version in the output tuple, the input tuple and the model.model_golden.rsandtests/golden/: golden envelopes, exact payload bytes and generated files forcompileModelandgenerateModelat IR3.0.0and4.0.0, through a negotiated session. Each payload file's SHA-256 equals the envelope digest.MORPHIR_UPDATE_GOLDEN=1writes them again. The files are-textin.gitattributesand excluded from the whitespace hooks.model_transport.rs: wrong envelope version refusals on the direct path.morphir-python-extension/tests/session.rs: the process executable runs both model operations in a0.2.0-draft.1session and exits by itself.morphir-python-binding0.6.0.python/model-transportgains the "Host default not supported" and "Host offers only formats the extension does not serve" scenarios.Qualification
MoonBit worker host, finos/morphir-moonbit
main40623b8 (clean), macOS arm64, native CLI and npm CLI (Node v24.22.1). Contract0.2.0pins:mise run test:cli-extism-python(MEP0.1path, Python0.4.1and0.4.2)0.6.0model line, WASM (82c5d35e…) and process executable, both CLIs0.5.0WASM, same model lineThe model-line rows check:
describe: protocols0.1and0.2.0-draft.1, and the JSON4.0.0tuples.compileat IR 4: negotiates0.2.0-draft.1and the tuplemorphir-ir/morphir-json/0.1.0-draft.1/4.0.0, andmodel.jsonis the payload (78b00954…).generate, a consumer check of the generated Python, and a recompile to the samemodel.jsonbytes.exited-after-exit, except for WASM on the npm CLI, where it isthread-termination, the host's documented stop method for a Node worker thread.finos/morphir Rust host
0.4.0-beta.10(MEP0.1, the compatibility pin):mise run extension:bundlewith the candidate passes the offline v3 and v4 round trips and the installed-integrity check.Local checks:
mise run rust:checkandmise run checkpass (2639 tests, 34 BDD scenarios).Finding (host, not changed here)
The MoonBit CLI selects the model line for any guest that declares
0.2.0-draft.1, and then it refuses--ir-version 3("a model compile returns IR 4.0.0",apps/morphir/cli/extension.mbt:841). With0.4.2the host compiled IR 3 on MEP0.1. The Python guest still offers IR3.0.0tuples and the0.1compile method. This PR does not change that host. The finding is tracked as beadmorphir-oeas.Release plan
After CI is green: a manual Release workflow run (dry run) on this branch. After maintainer approval: merge, then tag
extension/python/v0.6.0at the reviewed commit. The release keeps its current shape: WASM and five process executables,release.jsondescriptors,.sha256files, attestations, MCK reports andSHA256SUMS. finos/morphir keeps itsextension/python/v0.4.2pin. Its bundle pins move in a separate PR.The published CLI
morphir-python0.1.2keeps compiler0.5.0until there is a native and CLI release. That release is not part of this PR.