fix(ci): publish worker trigger schemas instead of "unknown" - #290
Conversation
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
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
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 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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
skill-check — worker0 verified, 22 skipped (no docs/).
Four for four. Nicely done. |
Problem
Every published worker trigger shows
invocation_schema: {}andreturn_schema: {}, which the registry renders as "unknown". Confirmed live across all workers — e.g. session-managersession::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:engine::triggers::list, which returns aTriggerTypeSummary(id/worker_name/description) with no schemas. The typed schemas live solely onengine::triggers::info(TriggerTypeDetail)..trigger_request_format::<T>()→configuration_schema,.call_request_format::<T>()→request_schema.build_publish_payload.pystill read the obsoletetrigger_request_format/call_request_formatkeys.So every trigger normalized to
{}. Nothing caught it: the--assert-typed-schemasgate only checks functions, and there was no trigger test coverage.This is the trigger-side twin of #285, which enriched functions from
engine::functions::infobut left triggers on the schema-less::list.Fix
collect_worker_interface.py—enrich_trigger_types_with_schemasfetchesengine::triggers::infoper publishable trigger type and merges the typed schemas into the rows before normalizing (mirrors the existingenrich_functions_with_schemas). Emits a non-fatal warning for any trigger still publishing without a typedinvocation_schema.build_publish_payload.py—_normalize_registry_trigger_typereadsconfiguration_schema→invocation_schemaandrequest_schema→return_schema, keeping the legacy keys as a fallback.test_enrich_trigger_schemas.pyplus trigger field-mapping cases intest_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-changeregister notrigger_request_format), so a hard--assert-typed-schemason triggers would block their release. Functions stay a hard gate.Verification
{}→ the real typed schema.pytest .github/scripts/tests/→ 107 passed.0.17.0(the version the publish workflow installs) already returnsconfiguration_schema/request_schemafromengine::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