Repository navigation
feat(mck): add a generic JSON Library profile to the MEP guest kit - #1129
Conversation
The shared MEP guest kit had only the MoonBit (Ion) and Python profiles, so an extension built with morphir-extension-sdk could not qualify without claiming another extension's identity. The new profile generic-json-library-v1 (spec/mep/mck/guest-generic-json.json) accepts any extension identity. It fixes one Bool library with one expected IR for 3.0.0 and 4.0.0, and source sets for morphir-fixture-flags, python and gleam, with URIs relative to the source folder. The runner selects the language, the IR versions and the JSON model tier from the guest's describe claim and tests each one it selects. IR is compared under three stated equivalence rules, and generated files are checked by compiling them again. report-check rebuilds the plan from the recorded claim. Existing profiles and kit digests do not change. OpenSpec change: add-generic-mep-guest-profile. Bead: morphir-ukvn.5.64.36.15
✅ Deploy Preview for angry-raman-7c44f6 canceled.
|
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 82ecb90537
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
… format Review of #1129 found two gaps in the generic profile. Only the legacy generate output was compiled again; the independent and model generate outputs were checked for shape only. Each generate case now has its own round trip. The model tier compiles with compileModel in its own session. The describe check accepted any claimsVersion string. It now accepts claimsVersion 0.1.0-draft.2 or the draft.1 statementVersion 0.1.0-draft.1, and refuses both names together, other versions and critical paths other than the version field.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e6230fb169
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Review of #1129: the IR comparison normalized a Reference object at any position, so a guest that returned a Reference as its packageName could compare equal to the expected IR. The rule now applies only at an outputType or a member of inputTypes.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d3c963c324
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Review of #1129 found two gaps in the generic model tier, both against spec/mep/model-transport.md. The selected tuples were compared as a set, so a guest could reverse the host order within an operation. They now compare in order within each operation, and operations can still interleave. Compiled models were held only to the fixed profile ceilings. They now stay inside the negotiated encoded byte, decoded byte, depth and node limits.
|
@codex review |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Problem
The shared MEP guest kit had two profiles.
moonbit-model-stable-v1needs Ion model transport.python-json-library-v1needs the extension idmorphir-pythonand a Python frontend and backend. An extension built withmorphir-extension-sdkcould not qualify without claiming another extension's identity. Bead:morphir-ukvn.5.64.36.15.Change
OpenSpec change
openspec/changes/add-generic-mep-guest-profile(proposal, spec deltamep/generic-guest-profile, design with decisions GKP-1 to GKP-8, tasks).openspec validate --strictpasses.generic-json-library-v1, kitspec/mep/mck/guest-generic-json.json. It accepts any extension identity.mck/generic, modulemain,ready = true,blocked = false), one expected IR for3.0.0and one for4.0.0, and a source set and malformed source per language:morphir-fixture-flags,python,gleam. URIs are relative to the source folder (main.py). The kit refuses absolute URIs, schemes,src/prefixes and dot segments.describeclaim: the first kit language claimed as both frontend language and backend target, each IR version that both the frontend and the backend claim, and the JSON model tier when the guest claims0.2.0-draft.1with JSON tuples. A claim that selects nothing fails.report-checkrebuilds the plan from the recorded claim.0.1): compile, generate and independent generate for each selected IR version, each generate followed by its own round trip; malformed source, unknown method, describe stability, after-shutdown, notifications, exit. Model tier: compile model, generate from it and from an independent model, each followed by acompileModelround trip; bad digest.claimsVersion0.1.0-draft.2or the draft.1statementVersion0.1.0-draft.1, with nocriticalpath other than that field (GKP-8).modules/types/valueslist order, and the IR 4Referenceshort form at anoutputTypeor a member ofinputTypes. Generated files are compiled again and must give the expected IR; the kit fixes no generated bytes.Kit::plan(records)replaces the fixed case list inrun_processandadjudicate; the static profiles keep their lists.guest-moonbit-bool.json8b641376…,guest-python-json.json9b4b5079…).Evidence
Guests run through
morphir extension workerof the native MoonBit CLI (finos/morphir-moonbit109ee20,c76886c6…), with the CLI and the module pinned by--identity-file. Kit sha256f16f2a4c577b507527a77a19a383c2c0083b4db1db131cd06d170e65a88598ae.guest-runreport-checkmorphir-sdk-fixture0.1.0 (apps/morphir/fixtures/sdk-guest,f5e1c9cd…, from finos/morphir-moonbit#298)extism-kernel-v1qualified=trueextension/python/v0.4.2,10acafa0…)extism-kernel-v1qualified=trueextension/gleam/v0.4.0,12349dac…)morphir-bytes-v1roundtrip-vfourFindings in other guests (not fixed here):
main.gleamhaspub fn ready() { True }without the type annotation, and the frontend compiles it with output typeUnit. The model-tier round triproundtrip-model-vfourshows the same defect. A local-only build that skipped the legacy v4 round trips passed every other Gleam case up to that one, includingcompileModel,generateModeland the bad-digest refusal. The fix belongs to finos/morphir-gleam.invalid type: string "mck:describe", expected u64). JSON-RPC 2.0 allows string ids. That is why this profile uses numeric ids. The fix belongs to finos/morphir-python.Regression: the MoonBit kit still qualifies the native and portable MoonBit guests (47 observations each,
report-checkexit 0).Gates:
cargo test --locked -p morphir-mck: pass (9 new tests: plan selection, IR equivalence, tampering and removed cases, URI rules, kit shape, claims formats, negotiated limits, tuple order)cargo clippy -p morphir-mck --all-targets -D warnings: passmise run check: pass (includesopenspec:verify,mck:check,spec:mep-check)Review: five Codex findings verified and fixed: round trip after every generate case and the claims format (
e6230fb1); theReferenceshort form only at type positions (d3c963c3); tuple order within an operation and negotiated model limits (latest commit).No other repository changed.