jason810496 opened a new pull request, #73187: URL: https://github.com/apache/airflow/pull/73187
- related ADR: `ts-sdk/adr/0001-mixed-lang-dag-interface.md` (decision 2) - **Depends on `refactor/ts-sdk/handler-getters` get merged first** (only the last commit is new here). - **Diff for early review**: https://github.com/jason810496/airflow/compare/refactor/ts-sdk/handler-getters...refactor/ts-sdk/bundle-registration - **next**: `feature/ts-sdk/task-handler-class` ## Why A mixed-language bundle provides task handlers for a Dag that Python owns and registers no Dag at all, so a collection named `DagRegistry` and a free `serveDags(registry)` are both about to be wrong. ## How - `Bundle` replaces `DagRegistry`: what this bundle process provides, and the thing that serves it. - `register(...items: Registerable[])` is the one registration verb, over a union that gains an arm per kind rather than a verb per kind. Today the union is just `Dag`, and registration keeps the path it already had: `instanceof Dag` to narrow, the shared brand to tell a second resolved copy from a stray object, and a call that throws registering none of its items. - `bundle.serve()` replaces `serveDags(registry)`, keeping the existing intent that authors never name the coordinator. The one-shot serve latch stays in the runtime with the sockets it protects. - The argument guard `serveDags` performed becomes a receiver guard, which still catches a detached `const { serve } = bundle`, and reports a bundle from a second resolved copy by its cause. - The coordinator subpath now exports no entry point at all. ## Note `sdk/bundle.ts` and `coordinator/runtime.ts` now reference each other. Both directions are hoisted function declarations referenced from inside function bodies, so neither module touches the other's bindings while it is still evaluating. The `--airflow-metadata` path in the packed example bundle exercises it. --- ##### Was generative AI tooling used to co-author this PR? - [x] Yes, with help of Claude Code Opus 5 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]
