Repository navigation
WO20: API-plane status audit + code-only completion (engine fix, wrangler types, package guards) - #30
Merged
Merged
Conversation
…es, package guards CI on main has been red since the WO15 merge: src/ml.ts imports createPlaneModel from "interscript/ml", but the pinned engine (^4.0.0) has no plane module. Bump the engine to ^5.14.0 — the parity suite still gates byte-identical behavior, 48/48 green. Also the code-only plane-completion round: - wrangler.jsonc: canonical self-deploy config in-repo (no routes, no secrets), and the generated worker-configuration.d.ts committed with a CI freshness gate (npm run gen:types + git diff --exit-code); @cloudflare/workers-types superseded by the generated runtime types - ci.yml: build before vitest (package.test guards the packed tarball), generated-types check, and the wrangler dry-run smoke is strict (no more `|| true`) - test/package.test.ts: phantom-file guard (every files entry ships), shipped-.d.ts import-closure guard, manifest entry-point guard - package.json: ./package.json in exports - prettier: src/ml.ts, src/rest.ts, test/ml.test.ts (drift since WO15) - dist/: regenerated from current src (the committed tree had drifted)
…ngine The vitest config aliased interscript/ml to a sibling ../interscript-ts checkout, so the ml suite could only pass on machines with the full monorepo layout - CI has been unable to resolve the import since the WO15 merge (the committed engine pin had no plane module either; fixed in the parent commit by the ^5.14.0 bump). With the published 5.14.0 shipping interscript/ml, tests now resolve the real package. The plane session's node backend needs onnxruntime-node in the test environment - added as a devDependency (the Worker bundle never selects the node backend; build + dry-run remain green). 48/48 locally against the published engine, no sibling checkouts involved.
…erses the native binary CI's bundle smoke (wrangler deploy --dry-run) fails with 'No loader is configured for .node files': once onnxruntime-node entered devDependencies, it became resolvable, and wrangler's esbuild expands interscript's dynamic backend probe across all five platform onnxruntime_binding.node binaries. Fix: wrangler.jsonc 'alias' (esbuild's alias) redirects the specifier to stubs/onnxruntime-node.js, which throws on evaluation — the plane session's backend probe catches it and selects a worker-compatible backend (the node backend is unreachable in workerd by construction). The npm build also marks onnxruntime-node explicitly external, the package ships the stub, a package guard asserts the bundle never contains the native binary references, and the README documents the remedy for self-hosters.
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.
API-plane status audit + code-only completion (WO20, issue #238)
The issue names
interscript/interscript-api— that repo is the legacy Ruby GraphQL Lambda (AWS), kept as the production rollback plane. The agreed architecture (code-only npm package, maps as deployment artifacts, no-regex engine, bundled maps surface, ml surface) lives in the Cloudflare plane:interscript/api(worker software, this PR) +interscript/api.interscript.org(deployment repo). This PR targets the software repo; the table audits the whole plane.Status table (audit vs the agreed architecture)
interscript-tsnative async interpreter, no regex compilation. But CI onmainhas been red since the WO15 merge (2026-10-07), for two stacked reasons: the pinned engine^4.0.0has no plane module forsrc/ml.ts'screatePlaneModelimport, andvitest.config.tsaliasedinterscript/mlto a sibling../interscript-tscheckout that does not exist on CI runners (tests could only ever pass on machines with the full monorepo sibling layout). Bumped to^5.14.0— the published package now shipsinterscript/ml— and removed the sibling alias, so CI resolves the real published engine. Parity suite stays byte-identical, 48/48 green..d.tsimport-closure guard, and a manifest entry-point guard.unpackedSize < 1 MBholds.ASSETS-binding loader; deployment repos fetch a pinned, sha256-verifiedinterscript/mapsrelease artifact;maps/in this repo is for tests/build-time metadata only and the guards keep it out of npm.systemCodes,/v1/maps,/v1/maps/{code}; 297 asset files validated by the (now strict)wrangler deploy --dry-runsmoke./v1/models+/v1/infer(Modal proxy) + in-worker plane execution with the 100 MB workerd budget (WO15). Thesrc/generated/models.jsonsnapshot (index v5, 23 models) refresh against the currentmodels.yamlis a release-round action — not done here.wrangler.jsonc(no routes, no secrets) and the generatedworker-configuration.d.ts(committed,npm run gen:types, CI freshness gate viagit diff --exit-code).@cloudflare/workers-typesis superseded by the generated runtime types../package.jsonexport added; guards now fail CI on any manifest/tarball drift, and a new guard asserts the published bundle never absorbs the node ONNX backend's native binaries. CI also builds before vitest (the package guards needdist/), and the bundle smoke no longer swallows failures (|| trueremoved). Bundle-smoke fix (commit 3): onceonnxruntime-nodeentered devDependencies, wrangler's esbuild resolved the engine's dynamic backend probe and choked on the five platformonnxruntime_binding.nodebinaries —wrangler.jsoncnow carries analias(esbuild's alias, wrangler's canonical knob) redirectingonnxruntime-nodetostubs/onnxruntime-node.js, which throws on evaluation; the plane session's backend probe catches it and selects a worker-compatible backend (the node backend is unreachable in workerd by construction). The npm build marks it explicitly--external, and the README documents the remedy for self-hosters.wrangler deploy)Deploy commands (recorded, NOT run)
Secrets (
CLOUDFLARE_API_TOKEN,CLOUDFLARE_ACCOUNT_ID) are already installed as deployment-repo secrets; the deployment repo pins this package — after this PR merges, bump that pin to pick up the engine fix.Legacy plane
interscript/interscript-api(Ruby Lambda): unchanged, still the documented rollback path; no code changes required for this round.Verification
npm run typecheck,npm run lint,npm run format:check— cleannpx vitest run— 48/48 against the published 5.14.0 engine with no sibling checkouts involved (commit 2: drops thevitest.config.tsalias to../interscript-tsand addsonnxruntime-nodeas a devDependency for the plane decode tests — the exact condition CI runs under)npm run build+ strictnpx wrangler deploy --dry-run— green (162 KB bundle, 297 assets)