pierrejeambrun opened a new pull request, #74415:
URL: https://github.com/apache/airflow/pull/74415

   ## Related
   
   - Stacked on #74412 (the urgent regen that unblocks main); only the last 
commit here is new.
   - Closes the prevention gap that #73806 exposed, following the pattern 
#74091 established for the Dag schema / Go SDK.
   
   ## Why
   
   The TS SDK read the supervisor wire schema straight from the Task SDK source 
(`generate-supervisor.mjs` pointed at 
`../task-sdk/.../execution_time/schema/schema.json`) and **no hook watched that 
source**. So when #73806 added the `SetExecutionTimeout` comms message:
   
   - `sync-go-sdk-schemas` (watches the Task SDK source) refreshed the Go SDK → 
Go stayed correct.
   - Nothing fired on the TS side → `src/generated/supervisor.ts` went stale 
and reddened `main`, 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, the way the Go SDK does:
   
   - Vendor the supervisor schema into `ts-sdk/schema/supervisor-schema.json` 
(raw copy, like `dag-schema.json`), and point `generate-supervisor.mjs` at it 
instead of reaching cross-project.
   - Add `sync-ts-sdk-supervisor-schema`, triggered by the **Task SDK source**, 
mirroring `sync-ts-sdk-dag-schema` and `sync-go-sdk-schemas`. It refreshes the 
vendored copy and fails loudly when it had to, so the refresh gets reviewed and 
the types regenerated in the same commit.
   - `check-ts-sdk-supervisor-schema` now also triggers on the vendored copy, 
so a refreshed schema regenerates the types.
   
   No change to `supervisor.ts` in 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
   
   - Corrupted the vendored copy and ran `sync-ts-sdk-supervisor-schema`: it 
refreshed from source and exited 1 (drift caught, self-healed). With them in 
sync it exits 0.
   - Regenerating from the vendored copy leaves `supervisor.ts` unchanged.
   - ruff + YAML checks pass on the new script and configs.
   
   No newsfragment: CI/build tooling only, no user-facing behavior change.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Code (Claude Opus 4.8)
   
   Generated-by: Claude Code (Claude Opus 4.8) following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to