Skip to content

(MOT-4516) fix(opengantry): type response schemas so the release can publish - #853

Merged
andersonleal merged 1 commit into
mainfrom
feat/open-gantry-ci
Aug 20, 2026
Merged

(MOT-4516) fix(opengantry): type response schemas so the release can publish#853
andersonleal merged 1 commit into
mainfrom
feat/open-gantry-ci

Conversation

@andersonleal

Copy link
Copy Markdown
Collaborator

opengantry landed in #814 but has never been released — it is the only bundle worker with no opengantry/v* tag. This makes its first release possible.

There is no release pipeline to add. Release here is one generic, manifest-driven machine: release.yml parses the <worker>/vX.Y.Z tag, reads iii.worker.yaml, and fans out on deploy:. ci.yml's discover job enumerates workers off the filesystem and buckets them on language:. No workflow names a worker, and grep -rn opengantry .github/ returns nothing — correctly so. opengantry already declares language: javascript + deploy: bundle and has the build:bundle script _bundle.yml needs, so it is routed fine.

It just isn't publishable.

The blocker

_publish-registry.yml downloads the built tarball, boots the worker against a real engine, and runs collect_worker_interface.py --assert-non-empty --assert-typed-schemas. That rejects any request/response schema lacking a schema-defining keyword (SCHEMA_DEFINING_KEYS in .github/scripts/collect_worker_interface.py:22).

Two responses were z.unknown(), which z.toJSONSchema compiles to {}:

Function Was Now
gantry::middleware z.unknown() z.record(z.string(), z.unknown())
gantry::on-trigger-type-registration z.unknown() z.object({}).strict()

middleware is a pass-through gate — on allow the response is whatever the forwarded call returned (middleware.js:86), so it is typed as an open object, the shape openwiki/src/lib/configuration.mjs:89 already uses for open payloads. Widen to anyOf if a governed function ever returns a bare scalar or array; it is registry documentation, not a runtime validator. onTriggerTypeRegistration throws GantryDenied unconditionally (registration-hooks.js:36) and has no success shape at all.

That assertion only runs after the tag, the GitHub Release, and the tarball upload — so this would have failed mid-operation and needed a Release Control recovery.

The guard

tests/formats.test.mjs asserts every FUNCTION_FORMATS entry compiles to a typed schema, mirroring the CI keyword set with a comment pointing back at the script. No workflow changes needed: ci.yml's node job already runs npm test for changed workers in the node bucket.

Verified it discriminates — reverting MiddlewareResponseSchema to z.unknown() fails with gantry::middleware.response_schema.

Verification

From opengantry/, using the release path's own commands:

  • pnpm install --frozen-lockfile --ignore-workspace
  • pnpm test — 42/42 pass
  • pnpm lint — biome 2.4.10 clean
  • pnpm run build:bundle — 1.2mb
  • pnpm run verify:sandbox — boots and registers

All ten schemas now carry type.

Not in scope

  • gantry::verdict publishes with no invocation schema and renders as "unknown" in the registry. Warning, not a blocker (_untyped_trigger_names warns; _typed_schema_violations fails), and not fixable here: RegisterTriggerTypeInput in iii-sdk 0.22.1 is {id, description} only, with no JS equivalent of Rust's .trigger_request_format::<T>().
  • ci.yml's node job installs with npm install (opengantry ships only a pnpm-lock.yaml) while _bundle.yml and release_train.py use pnpm install --frozen-lockfile --ignore-workspace, so PR CI resolves deps unpinned. Pre-existing, affects all five JS workers, deliberately left alone.
  • No version bumpcreate-tag.yml owns that.

After merge

Cutting opengantry/v0.1.0 is a Release Control dispatch (create-tag.yml, then release.yml). It requires opengantry in the Release Control typed release policy first (docs/sops/new-worker.md §6) — that is outside this repo and cannot be done from here.

Fixes MOT-4516

@vercel

vercel Bot commented Aug 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
workers Ready Ready Preview Aug 20, 2026 2:46pm
workers-tech-spec Ready Ready Preview Aug 20, 2026 2:46pm

Request Review

@coderabbitai

coderabbitai Bot commented Aug 20, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@andersonleal, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 35 minutes

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

Wait for the limit to reset, then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: cac4ae68-73ab-4924-af8e-3aaabcd2d1a9

📥 Commits

Reviewing files that changed from the base of the PR and between 2d44541 and c6c4790.

📒 Files selected for processing (2)
  • opengantry/src/formats.js
  • opengantry/tests/formats.test.mjs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

skill-check — worker

0 verified, 62 skipped (no docs/).

Layer Result
structure
vale
ai
render

Four for four. Nicely done.

…publish

opengantry has never been released. It routes correctly through the
generic pipeline (deploy: bundle + language: javascript), but its first
registry publish would hard-fail: _publish-registry.yml boots the built
bundle and runs collect_worker_interface.py --assert-typed-schemas, which
rejects any request/response schema lacking a schema-defining keyword.

Two responses were z.unknown(), which z.toJSONSchema compiles to {}:

  gantry::middleware                   -> z.record(z.string(), z.unknown())
  gantry::on-trigger-type-registration -> z.object({}).strict()

middleware is a pass-through gate, so on allow the response is whatever
the forwarded call returned; typed as an open object, the shape openwiki
already uses for open payloads. Widen to anyOf if a governed function
ever returns a bare scalar or array. onTriggerTypeRegistration throws
GantryDenied unconditionally and has no success shape at all.

That assertion only runs after the tag, the GitHub Release, and the
tarball upload, so the failure would land mid-operation and need a
Release Control recovery. tests/formats.test.mjs pins the invariant
locally instead, mirroring SCHEMA_DEFINING_KEYS from the CI script. No
workflow changes: ci.yml's node job already runs npm test for changed
workers in the node bucket.

gantry::verdict still publishes without an invocation schema and renders
as "unknown" in the registry. That is a warning rather than a blocker,
and is not fixable here: RegisterTriggerTypeInput in iii-sdk 0.22.1 is
{id, description} only, with no JS equivalent of Rust's
.trigger_request_format::<T>().
@andersonleal
andersonleal merged commit f0ad63c into main Aug 20, 2026
19 checks passed
@andersonleal
andersonleal deleted the feat/open-gantry-ci branch August 20, 2026 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant