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

   - related ADR: `ts-sdk/adr/0001-mixed-lang-dag-interface.md` (decision 4)
   
   ## Why
   
   A handler's only parameter was `TaskHandlerArgs`, so `ctx` and `client` 
occupied the top level of the namespace that TaskFlow argument binding needs, 
forcing every typed handler to spell its parameter `TArgs & TaskHandlerArgs`.
   
   ## How
   
   - `getContext()` and `getClient()` read an `AsyncLocalStorage` store the 
runtime installs around the single dispatch site in `coordinator/runtime.ts`.
   - The store propagates across every `await` and into every promise created 
inside the call, so a helper several frames deep reads it without anything 
being threaded through.
   - Storage is keyed on a global symbol, as the serve latch already is, so two 
resolved copies of the package share one store.
   - Both throw outside a handler, naming the accessor.
   
   ---
   
   ##### 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