Skip to content

fix(ci): publish worker trigger schemas instead of "unknown" - #290

Merged
ytallo merged 1 commit into
mainfrom
fix/publish-trigger-schemas
Jun 18, 2026
Merged

fix(ci): publish worker trigger schemas instead of "unknown"#290
ytallo merged 1 commit into
mainfrom
fix/publish-trigger-schemas

Conversation

@ytallo

@ytallo ytallo commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Problem

Every published worker trigger shows invocation_schema: {} and return_schema: {}, which the registry renders as "unknown". Confirmed live across all workers — e.g. session-manager session::created, llm-router, iii-directory. Trigger descriptions publish fine; only the schemas are empty.

Root cause

The worker source and the engine are both correct — the workers register trigger types with .trigger_request_format::<…>(), and the engine exposes the schema. The bug is entirely in the publish scripts:

  • The collector reads trigger types from engine::triggers::list, which returns a TriggerTypeSummary (id/worker_name/description) with no schemas. The typed schemas live solely on engine::triggers::info (TriggerTypeDetail).
  • The engine renamed those fields: SDK .trigger_request_format::<T>()configuration_schema, .call_request_format::<T>()request_schema. build_publish_payload.py still read the obsolete trigger_request_format/call_request_format keys.

So every trigger normalized to {}. Nothing caught it: the --assert-typed-schemas gate only checks functions, and there was no trigger test coverage.

This is the trigger-side twin of #285, which enriched functions from engine::functions::info but left triggers on the schema-less ::list.

Fix

  • collect_worker_interface.pyenrich_trigger_types_with_schemas fetches engine::triggers::info per publishable trigger type and merges the typed schemas into the rows before normalizing (mirrors the existing enrich_functions_with_schemas). Emits a non-fatal warning for any trigger still publishing without a typed invocation_schema.
  • build_publish_payload.py_normalize_registry_trigger_type reads configuration_schemainvocation_schema and request_schemareturn_schema, keeping the legacy keys as a fallback.
  • Tests — new test_enrich_trigger_schemas.py plus trigger field-mapping cases in test_normalize_worker_interface.py.

Why a warning, not a hard gate

Some trigger types legitimately take no binding config (e.g. iii-directory's directory::*::on-change register no trigger_request_format), so a hard --assert-typed-schemas on triggers would block their release. Functions stay a hard gate.

Verification

  • End-to-end before/after against the real engine output shape: empty {} → the real typed schema.
  • pytest .github/scripts/tests/107 passed.
  • Confirmed iii 0.17.0 (the version the publish workflow installs) already returns configuration_schema/request_schema from engine::triggers::info.

Rollout note

This only affects the next publish. Already-published versions keep their "unknown" schemas until re-published. The collector runs at the release tag ref, so this needs a new release tag to take effect — re-running an old release run re-runs the old script.

https://claude.ai/code/session_017CciKnWZzsLprzZ6XFHZJ2

Every published worker trigger showed empty invocation_schema/return_schema
(rendered "unknown" in the registry). The publish pipeline collected trigger
types from engine::triggers::list, which returns only a TriggerTypeSummary
(id/worker_name/description) with no schemas, and build_publish_payload read
the obsolete trigger_request_format/call_request_format keys. The typed
schemas live solely on engine::triggers::info (TriggerTypeDetail), under
configuration_schema (binding config) and request_schema (delivered payload).

This is the trigger-side twin of the function-schema fix (#285), which
enriched functions from engine::functions::info but left triggers behind.

- collect_worker_interface.py: enrich each publishable trigger type from
  engine::triggers::info before normalizing (mirrors
  enrich_functions_with_schemas); warn (non-fatal) on triggers still
  publishing without a typed invocation_schema.
- build_publish_payload.py: read configuration_schema -> invocation_schema
  and request_schema -> return_schema, with the legacy keys as fallback.
- tests: trigger enrichment + normalize field-mapping coverage.

Trigger schemas are a warning, not a hard gate: some trigger types take no
binding config (e.g. iii-directory's directory::*::on-change) and are
legitimately schema-less.

Claude-Session: https://claude.ai/code/session_017CciKnWZzsLprzZ6XFHZJ2
@vercel

vercel Bot commented Jun 18, 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, Comment Jun 18, 2026 5:52pm

Request Review

@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@ytallo, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 52 minutes and 24 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 342ba0a2-b9bd-45a4-9766-e885b7a8bb69

📥 Commits

Reviewing files that changed from the base of the PR and between b2e25ab and c0b5078.

📒 Files selected for processing (4)
  • .github/scripts/build_publish_payload.py
  • .github/scripts/collect_worker_interface.py
  • .github/scripts/tests/test_enrich_trigger_schemas.py
  • .github/scripts/tests/test_normalize_worker_interface.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/publish-trigger-schemas

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 and usage tips.

@github-actions

Copy link
Copy Markdown
Contributor

skill-check — worker

0 verified, 22 skipped (no docs/).

Layer Result
structure
vale
ai
render

Four for four. Nicely done.

@ytallo
ytallo merged commit 64c1dad into main Jun 18, 2026
12 checks passed
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.

3 participants