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

   # TS SDK: declare task dependencies by calling tasks
   
   - **next**: `feature/ts-sdk/dag-schema-codegen`
   
   ## Why
   
   A Dag declared in TypeScript has no Python stub to lay out its graph, so the 
SDK needs a way to say which task feeds which. `dag.task()` returned an inert 
handle and `inputs` was an unused option.
   
   ## How
   
   - `dag.task()` returns a **factory**. Calling it places the task in the Dag 
and supplies its arguments by name, the way calling a TaskFlow function does in 
Python.
   - The call graph is the task graph. A `TaskRef` exists only once its 
producing call has returned, so a cycle through arguments is unrepresentable 
rather than rejected by a validator.
   - Every task has to be called exactly once. An uncalled task fails when the 
Dag is read, so none can be silently left out.
   
   ## What
   
   - `TaskFactory<TArgs>`, `TaskInputs<TArgs>`, and a branded `TaskRef`, so a 
hand-written `{dagId, taskId}` is a literal argument rather than an edge.
   - An input takes an upstream reference or a JSON literal, restricted to the 
part of the argument's type JSON can carry.
   - `inputs` is gone from the task options; wiring belongs to the factory call.
   - Reading a bundle closes its native Dags, which is what enforces the 
every-task-is-called rule.
   
   ---
   
   ##### 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]

Reply via email to