Repository navigation
Sync the TS SDK supervisor schema from its Task SDK source - #74415
Merged
pierrejeambrun merged 3 commits intoOct 8, 2026
Merged
Conversation
pierrejeambrun
force-pushed
the
sync-ts-sdk-supervisor-schema
branch
from
October 7, 2026 17:17
da85755 to
c09bcf2
Compare
The TS SDK read the supervisor wire schema straight from the Task SDK source and had no hook watching that source, so a schema change there — a new comms message, say — regenerated the Go SDK (whose sync hook does watch the source) but left `src/generated/supervisor.ts` stale, with nothing to catch it until some unrelated ts-sdk change happened to run the local check. That is how apache#73806 reddened main. Vendor the supervisor schema into `ts-sdk/schema/` alongside the Dag schema, and sync both from their Python sources in one `sync-ts-sdk-schemas` hook — a `VENDORED_SCHEMAS` list the way `sync-go-sdk-schemas` does it, replacing the single-schema `sync-ts-sdk-dag-schema`. A schema change now refreshes the vendored copy and fails loudly in the same commit instead of shipping a stale generated file.
pierrejeambrun
force-pushed
the
sync-ts-sdk-supervisor-schema
branch
from
October 7, 2026 17:21
c09bcf2 to
9351668
Compare
pierrejeambrun
marked this pull request as ready for review
October 7, 2026 17:28
pierrejeambrun
requested review from
jason810496
and
a balanced review from Copilot
October 7, 2026 17:28
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The new hook lacks regression tests and leaves several hook triggers and documentation references inconsistent.
5 open findings
What changed in this PR
Vendors the Task SDK supervisor schema in the TypeScript SDK and adds synchronization safeguards.
Changes:
- Generates supervisor types from the vendored schema.
- Consolidates Dag and supervisor schema synchronization.
- Expands prek triggers for schema drift detection.
| File | Description |
|---|---|
.pre-commit-config.yaml |
Adds the combined schema-sync hook. |
ts-sdk/.pre-commit-config.yaml |
Watches the vendored supervisor schema. |
ts-sdk/schema/supervisor-schema.json |
Adds the vendored schema snapshot. |
ts-sdk/scripts/generate-supervisor.mjs |
Uses the vendored schema. |
ts-sdk/scripts/ci/prek/check_supervisor_schema.py |
Updates drift-check messaging. |
ts-sdk/scripts/ci/prek/sync_dag_schema.py |
Removes the superseded single-schema sync. |
ts-sdk/scripts/ci/prek/sync_ts_sdk_schemas.py |
Synchronizes both vendored schemas. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Update comments to reflect the correct hook name for syncing schemas. Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
jason810496
approved these changes
Oct 8, 2026
jason810496
left a comment
Member
There was a problem hiding this comment.
Thanks, the direction LGTM.
Addresses the review on apache#74415: - Move sync_ts_sdk_schemas.py to scripts/ci/prek/ beside sync_go_sdk_schemas.py and add test_sync_ts_sdk_schemas.py mirroring the Go sync's tests, so the refresh and report logic is covered (in-sync, stale, missing copy/source, and the per-schema and combined reports). - List the script itself in the sync-ts-sdk-schemas files filter, so a change to its paths or report logic re-runs the hook, as sync-go-sdk-schemas does. - Point generate-dag-schema.mjs at the renamed sync-ts-sdk-schemas hook. - Update the selective-check comment and 04_selective_checks.md, which still described the dropped "defer ts-sdk regeneration to a follow-up PR" policy.
pierrejeambrun
requested review from
amoghrajesh,
ashb,
bugraoz93,
choo121600,
ephraimbuddy,
gopidesupavan,
jedcunningham,
jscheffl,
potiuk and
vatsrahul1001
as code owners
October 8, 2026 09:06
hkc-8010
added a commit
to hkc-8010/my-airflow-repository
that referenced
this pull request
Oct 10, 2026
Drop the API date from the older-server comment, move the migrator test imports to module level, and add first_task_reschedule_start_date to the TS SDK's vendored supervisor schema that apache#74415 introduced. Co-Authored-By: Claude <noreply@anthropic.com>
hkc-8010
added a commit
to hkc-8010/my-airflow-repository
that referenced
this pull request
Oct 12, 2026
Drop the API date from the older-server comment, move the migrator test imports to module level, and add first_task_reschedule_start_date to the TS SDK's vendored supervisor schema that apache#74415 introduced. Co-Authored-By: Claude <noreply@anthropic.com>
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.


Related
Why
The TS SDK read the supervisor wire schema straight from the Task SDK source (
generate-supervisor.mjspointed at../task-sdk/.../execution_time/schema/schema.json) and no hook watched that source. So when #73806 added theSetExecutionTimeoutcomms message:sync-go-sdk-schemas(watches the Task SDK source) refreshed the Go SDK → Go stayed correct.src/generated/supervisor.tswent stale and reddenedmain, caught only once an unrelated ts-sdk change happened to run the local check.This is the same drift class #74091 closed for the Dag schema on Go/Java — just the one cell the net was never stretched to: supervisor × TS.
How
Make the TS SDK vendor and sync both schemas in one hook, exactly the way
sync-go-sdk-schemasdoes:ts-sdk/schema/supervisor-schema.json(raw copy, likedag-schema.json), and pointgenerate-supervisor.mjsat it instead of reaching cross-project.sync-ts-sdk-dag-schemawithsync-ts-sdk-schemas, backed by onesync_ts_sdk_schemas.pyholding aVENDORED_SCHEMASlist of both entries and a refresh loop — modeled onsync_go_sdk_schemas.py. It is triggered by both Python sources, refreshes whichever vendored copy drifted, and fails loudly so the refresh gets reviewed and the types regenerated in the same commit.check-ts-sdk-supervisor-schemanow also triggers on the vendored copy, so a refreshed schema regenerates the types (the second, separate hook — regeneration can be a decision, not just a copy).No change to
supervisor.tsin this commit — the generator reads the vendored copy, which is byte-identical to the source, so output is unchanged from #74412.How I verified it
sync-ts-sdk-schemaswith both copies in sync exits 0 ("both match").pnpm run generate:*recipe, exited 1, and self-healed.supervisor.tsunchanged.No newsfragment: CI/build tooling only, no user-facing behavior change.
Was generative AI tooling used to co-author this PR?
Generated-by: Claude Code (Claude Opus 4.8) following the guidelines