#771 Agentic durable leaves crash on activity worker: ActivityContext has no jumper_client
Description
Editdurable_leaves=true routes tools.agent.execute_leaf_agent to the activity worker (agent_leaf DSL, 600s timeout). execute_leaf_agent + the LLM cost rails (engine/tools/llm/usage.py) + agent_trace assume DurableContext (ctx.conn held, ctx.jumper_client present). On ActivityContext ctx.conn is None and jumper_client is absent -> AttributeError on the counter-join record; and even patched, token usage/budget ceilings/leaf traces silently no-op (cost-safety regression). Fix: context_connection(ctx) helper (held conn for durable, short-lived pooled conn for activity), add lazy jumper_client to ActivityContext, route the 3 usage.py fns + agent_trace + execute_leaf_agent join-record through it. Durable path byte-identical; re-test golden demos (v2, ultimate, disaster recovery).
Comments
Loading comments...
Context
Loading context...
Audit History
View AllLoading audit history...