Repository navigation
test(cli): qualify the published extensions on the worker host (group 7) - #298
Merged
Merged
Conversation
Add scripts/extension-qualification.mbtx and its driver apps/morphir/scripts/extension-qualification.ts. They run the Elm extension v0.4.1, the Python extension 0.4.1 and 0.4.2, the MoonBit guest (native and portable) and a new morphir-extension-sdk fixture guest from the native and npm CLIs, and write one receipt per suite. Downloads go into new directories and are used only after their SHA-256 equals the pin in apps/morphir/fixtures/qualification. Rewrite test:cli-extism-python, test:portable-mep-cli and test:cli-native-prerequisites for 0.2.0 pins on the worker host, and add test:cli-extension-elm, test:extension-conformance and test:extension-qualification. All accept --json. They stay manual.
Add .github/workflows/extension-qualification.yml, started only by workflow_dispatch, to run scripts/extension-qualification.mbtx on one runner and keep its receipts. It tests the command and its JSON help first. No pull request, merge queue, push or schedule starts it. Apply the build-master review: run npm through Node, unpack the MCK runner with the system tar on Windows, give Windows process workers the variables they need, check that the Node probe finds Node on the npm CLI path, and bound each download. Tick tasks 7.1 to 7.4.
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: f9ef5b6515
ℹ️ 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".
4 of 5 tasks
Move the step's logic (make the directories, save the JSON result, write it to the log, keep the exit status) out of the workflow shell block into scripts/extension-qualification-run.mbtx, which has --json and --self-test. The workflow now runs one command per step.
… module Add the elm-classic v0.5.1 executables, which accept a package with no exposedModules (bead morphir-ukvn.5.64.36.16), and the Elm v0.5.0-preview.2 module (morphir-bytes-v1, model line) to the elm suite. Pin both releases by SHA-256. The WASM guest needs module names under the package name, so it gets its own fixture. The Elm 0.4.1 compile stays as a recorded failure.
In --json mode, scripts/extension-qualification-run.mbtx now catches any error of the run, such as a --result path that is a directory, and writes a failed command-result with error code command_failed and exit status 1. The default mode keeps the runtime's error output. The self-test checks that an unwritable result path raises.
The workflow's step helper makes the evidence directory before it runs scripts/extension-qualification.mbtx, and @fs.mkdir refuses a directory that exists. Make it only when it is missing.
On Windows the embedding build of the portable guest fails before any suite runs. A packaging failure now fails only the moonbit-portable suite, with its cause in the summary, and the other suites still run.
A Windows checkout converted the SDK fixture's Cargo.toml to CRLF, so its digest no longer matched the build receipt. Check the qualification fixtures out with LF on every platform.
The Windows x64 run of task 7.5 failed at output publication (bead morphir-ukvn.5.64.36.19) and could not package the portable guest (bead morphir-ukvn.5.64.36.18), so 7.5 stays open. Every receipt is recorded on bead morphir-ukvn.5.64.36.7.
On a host with Node in /usr/bin or /bin, the native CLI's PATH exposed node and the no-Node rows failed for the host's layout. On Unix the native PATH is now one new, empty directory: the native CLI starts its workers by path and needs no program from PATH. The check asserts that each native PATH entry is empty, that the probe finds no node there and that it finds node on the npm CLI PATH, and the receipt says so.
This was referenced Nov 1, 2026
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
Group 7 of the OpenSpec change
host-extensions-as-workers(beadmorphir-ukvn.5.64.36.7): qualify the published extensions, and an independent fixture guest, on the CLI's worker host from the native CLI and the npm CLI.scripts/extension-qualification.mbtx(argparse,--json) builds the native CLI, the npm package (npm pack, unpacked as a user installs it) and the MoonBit guests, then runs the driverapps/morphir/scripts/extension-qualification.tsonce per suite. The driver downloads each pinned artifact ofapps/morphir/fixtures/qualification/published.jsoninto a new, empty directory, uses it only after its SHA-256 equals the pin, and writes one receipt per suite: one row per operation with extension, version, CLI, platform, operation, result, guest SHA-256, descriptor SHA-256 and output digests.v0.4.1and of elm-classicv0.5.1(the fix of bead .16) as process workers, and the Elmv0.5.0-preview.2WASM module (morphir-bytes-v1, model line) as a second Elm guest.--json:test:cli-extension-elm(7.1),test:cli-extism-python(7.2, rewritten for0.2.0pins),test:cli-native-prerequisitesandtest:portable-mep-cli(7.3, rewritten for the worker host),test:extension-conformance(7.4),test:extension-qualification(all).morphir-extension-sdkat finos/morphir-rustde35f596, forwasm32-wasip1, inapps/morphir/fixtures/sdk-guestwith its source,Cargo.lock, build receipt and the module (752 KB; one narrow.gitignoreexception). It imports WASI preview 1, the Extism kernel and all four Morphir host functions, and claims a language no host knows (morphir-fixture-flags,.flags). It runs with no host change. Two clean builds give the same SHA-256.scripts/extism-python.mbtx,scripts/portable-mep-cli.mbtx,apps/morphir/scripts/test-extism-python.ts,apps/morphir/scripts/extism-python-api.py;tools/portable-command-json.test.tsdrops itsportable-mep-clicase.scripts/native-services.mbtx --acceptanceis unchanged (group 9 removes that route)..github/workflows/extension-qualification.yml(workflow_dispatchonly) for the Windows x64 run of 7.5 and later per-platform runs. Its step logic is inscripts/extension-qualification-run.mbtx(--json,--self-test), so the workflow has one command per step. The same two files are in ci: add the manual extension qualification workflow #299, which lands first so the workflow can be dispatched.apps/morphir/docs/extension.md#qualification,docs/MISE_TASKS.md, fixture READMEs. Tasks 7.1 to 7.4 ticked with notes.Findings and follow-ups
_WIN32directory rename is a stub, and the Node publication creates the destination before it renames onto itextension.output_failed); task 7.5 stays openmorphir-ukvn.5.64.36.19(separate PR)pkgs/morphir-host/embedding/build.mts) fails on Windows with ENOENTmoonbit-portablenot run on Windowsmorphir-ukvn.5.64.36.18v0.4.1requirespackage.exposedModulesinmorphir.frontend.compile(cli2/mep/protocol.ts); the MEP Smithy model makes it optional, and the host, which conforms, does not send itv0.4.1compile fails with-32602and stays as a recorded failure. elm-classicv0.5.1fixes it: its compile passes from both CLIs with no host changemorphir-ukvn.5.64.36.16(passing receipt on the bead)spec/mep/mck/guest-moonbit-bool.jsonasks for the frontend profilemoonbit-model-bool-library-v1, which the MoonBit guest retired in #181compile-ionfor the native guest (direct) and the portable guest (native CLI worker mode) after describe, initialize and notifications pass.mise run test:portable-mep-mckis broken on main for the same reasonmorphir-ukvn.5.64.36.17(finos/morphir)morphir-ukvn.5.64.36.15; the public stdio command is issue #297A known failure does not fail its suite, and it fails the suite if the operation starts to pass. The shared kit runs through the native CLI's internal
morphir extension workeras its stdio host; no public command is added (#297).Receipts
Full receipts, with exact digests, are on bead
morphir-ukvn.5.64.36.7.b8277b5f)ubuntu-24.04, run 41240756333,8b0ab3c5)windows-latest, run 41241517957,52ce3720)morphir-ukvn.5.64.36.18All three CLIs-and-platforms run every guest session. Windows fails at publication, a host defect: the native CLI's
morphir_host_rename_directory_new(pkgs/morphir-host/platform/platform.c) is a_WIN32stub that returns 1 (publication.destination_unavailable), and the npm CLI'srename_directory_new_jscreates the destination before it renames onto it, which Windows refuses (publication.create_failed). This is beadmorphir-ukvn.5.64.36.19, fixed in its own PR ("fix(host): publish command output on Windows"), not here. Task 7.5 stays open and there is noTested-on:trailer. A Windows checkout also turned the SDK fixture'sCargo.tomlinto CRLF;.gitattributesnow keeps the qualification fixtures LF.The earlier Linux run in Docker under Rosetta failed every native-CLI WASM row with SIGILL; the real-hardware run passes them all, so that was an emulation artifact.
Guest digests: Elm 0.4.1
7b4ea687…(aarch64-apple-darwin),2f172a7f…(x86_64-unknown-linux-gnu), descriptor152ee03d…; elm-classic 0.5.143716cdf…(aarch64-apple-darwin),9cfcaf23…(x86_64-unknown-linux-gnu),b21d4b6c…(x86_64-pc-windows-msvc), descriptorccf251ff…; Elm 0.5.0-preview.2 module4d3ea176…, descriptor4bc11967…; Python 0.4.1a04722e1…, 0.4.210acafa0…; SDK fixturef5e1c9cd…; MCK runner v0.4.0-beta.11, kit59485eb1….CI impact (maintainer rule)
No new job in PR or merge-queue CI. The only workflow change is a new file whose sole trigger is
workflow_dispatch:No existing PR or merge-queue step downloads extension bundles or Elm executables.
tools/portable-command-json.test.tsgets shorter. This PR itself selects the full CI run once, because it edits.config/mise/config.tomland adds a workflow file (existing selector rule).Build-master review
Verdict: no PR, merge-queue or push workflow gains a job or a slower step (
ci-platforms.mbtxreports no violations;actionlint,mise run test:cipass). Findings and what I did:npm packcannot start on Windows (npm isnpm.cmd): fixed, npm now runs asnode <prefix>/…/npm/bin/npm-cli.js..zip: fixed, the driver uses%SystemRoot%\System32\tar.exeon Windows.bun/uvmay be missing on Windows: fixed, the workflow runs the script throughmise exec --.moon test scripts/extension-qualification.mbtxand--help --jsonfirst. Adding them totest:ciis left to the maintainer.workflow_dispatchstarts only a file onmain: the Windows run (7.5) waits for the merge, or for a separate PR with only the workflow file. 7.5 stays open; I will ask before starting it.--retry, timeouts,--max-filesize,--proto-redir. L2 Windows environment and the Node probe: addedPATHEXT,ComSpecand others,where.exe node.exe, and a positive control on the npm CLI path. L3/L5:retention-days: 30,if-no-files-found: error, line-length. L4 (docs say macOS, Linux) is updated after 7.5 passes. I6 (no release gate reads the receipts) is outside group 7.Not done here
Tested-on:trailer.morphir-ukvn.5.64.36.7.Test plan
mise run test:extension-qualification -- --jsonon macOS arm64 atb8277b5f: all suites passedf9ef5b65: Elm and MoonBit native suites passed; npm CLI rows passed in every suite; native-CLI WASM rows fail under emulation (SIGILL)8b0ab3c5, every suite passed52ce3720failed at output publication (host defect); see Receiptsmoon test scripts/extension-qualification.mbtx; help and refusal JSON (exit 2)moonx scripts/extension-qualification-run.mbtx --self-test --jsonbun tools/portable-command-json.test.tsbunx tsc -p tsconfig.node.json(no errors in new files)lint,lint:moonbit,validate