jason810496 opened a new pull request, #76539: URL: https://github.com/apache/airflow/pull/76539
- related: https://github.com/apache/airflow/pull/76364 ## How - Declare a loop on a task group with `loop()`: a gate handler plus `maxIterations`, or only `maxIterations` for a fixed count. Inside the loop, `getLoop()` gives the iteration, the bound and the previous iteration's result. Outside it, a reference to a loop task reads every iteration as an `XComSequence`. ```ts const refine = dag.taskGroup("refine"); const evaluated = refine.task(evaluate)({ estimate: refine.task(improve)() }); refine.loop(accurateEnough, { result: evaluated }, { maxIterations: 10 }); ``` - Core recognizes a loop gate from a language SDK, so its stop decision drives the next iteration. The supervisor masks the gate's reason before it is shown in the UI. - TypeScript tasks now record that they are not mapped, as the Python serializer does, because core reads that flag of a loop's terminal task when it starts any task of the loop. - The serialization check compares a TypeScript loop Dag against the Python Dag it stands for. Go and Java declare no loops yet, so their checks are unchanged. - Add the TypeScript loop example, docs, and an e2e test. --- ##### Was generative AI tooling used to co-author this PR? - [x] Yes, with help of Claude Code Sonnet 5.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]
