Commit Graph
4 Commits
Author SHA1 Message Date
nesquena-hermes 7160cc26b5 test(#4912): make async_delegation wakeup test CI-robust
The first cut asserted against the REAL tools.process_registry.format_process_notification,
which isn't importable in WebUI-only CI shards (shard 2 failed: returned None).
Inject a stub agent module via sys.modules so the test validates the delegation
WIRING independent of agent-module availability, plus a graceful-degradation
test confirming async_delegation returns None (not raise) when the agent
formatter can't be imported. Production behavior is unchanged: async_delegation
events only occur when the agent is running, so the import resolves where the
events actually exist.
2026-06-25 11:53:13 +00:00
nesquena-hermesandmydelren 0cecfb13a3 fix(#4912): deliver async_delegation completions to the parent chat
format_wakeup_prompt() in api/background_process.py returned None for any event
type other than 'completion'/watch_*, so async_delegation events (produced when
a background delegate_task subagent finishes) were silently dropped — the
subagent showed as perpetually 'running' and its consolidated result never
re-entered the parent conversation.

Add an async_delegation branch that delegates to the agent-side
tools.process_registry.format_process_notification (which already knows the
async_delegation shape), so the subagent result is rendered into the wakeup
prompt and re-enters chat. Scoped to async_delegation specifically (not all
unknown types) so genuinely-unrecognized events are still skipped — preserving
the existing skip-unknown-event contract.

Reported + root-caused by @mydelren.

Co-authored-by: mydelren <mydelren@users.noreply.github.com>
2026-06-25 11:38:02 +00:00
ai-ag2026 352e1893cb test: cover malformed wakeup edge cases 2026-06-18 19:30:24 +02:00
ai-ag2026 ff0ac7c7a4 fix: ignore malformed process wakeup events 2026-06-18 16:17:27 +02:00