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

   - related: #69288
   
   ## Why
   
   `registerTask({ dagId, taskId }, handler)` binds one handler to a Python 
stub Dag/task pair at a time and leaves no object that can carry native 
TypeScript Dag declaration later (#69288). This PR changes only the user-facing 
authoring interface so it can grow into native Dag support without another 
breaking change.
   
   ## How
   
   - `new Dag(dagId, spec?)` takes a positional id plus an optional trailing 
spec object; `dag.task(taskId, handler, spec?)` returns an opaque `Task` 
handle. Both `DagSpec` and `TaskSpec` are empty extension points today, so 
future fields (schedule, tags, retries, dependency wiring) land without 
signature changes.
   - A `Dag` instance retains its spec and each task's `(taskId, handler, 
spec)`, so a future `serialize()` can produce the serialized Dag JSON for 
`DagFileParsingResult.serialized_dags`. Producing that JSON is intentionally 
out of scope here; `handleParse` still returns `serialized_dags: []`.
   - Variadic `registerDags(...dags)` records Dag instances in the default 
registry; lookups delegate live to each Dag's task map. `startCoordinator()`, 
the coordinator wire protocol, and the bundle manifest shape 
(`{supervisor_schema_version, dags: {<dagId>: {tasks: [...]}}}`) are unchanged.
   - Remove`registerTask`, `listRegisteredTasks`, and `TaskRegistration`.
   
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [x] Yes, with help of Claude Code Fable 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