[core-be-agent] fix(#354): wire delegation-results consumer into a2a executor #358

Merged
infra-sre merged 3 commits from fix/354-a2a-delegation-auto-resume into main 2026-05-11 02:50:42 +00:00

3 Commits

Author SHA1 Message Date
173a642f9e ci: re-trigger after tier downgrade
All checks were successful
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 2s
sop-tier-check / tier-check (pull_request) Successful in 3s
audit-force-merge / audit (pull_request) Successful in 3s
Co-Authored-By: infra-sre
2026-05-11 02:49:32 +00:00
177c4ef18c ci: re-trigger after runner recovery
Co-Authored-By: infra-sre
2026-05-11 02:49:32 +00:00
99f3cf7c8f [core-be-agent] fix(#354): wire delegation-results consumer into a2a executor
Close the A2A delegation auto-resume gap.

Root cause: heartbeat.py's _check_delegations already writes completed
delegation rows to DELEGATION_RESULTS_FILE and sends a self-message to
wake the agent. executor_helpers.read_delegation_results() was defined to
atomically consume that file, but a2a_executor._core_execute() never
called it — so delegation results were written but the agent never saw
them.

Fix: call read_delegation_results() at the top of _core_execute() and
prepend the results to the user input context so the agent can act on
them without an explicit check_task_status call. The Temporal durable
workflow path is also covered because it calls _core_execute() directly.

Test: two new cases — delegation results injected when file exists;
user input passed through unchanged when file is empty.

Closes molecule-core#354.
2026-05-11 02:49:32 +00:00