mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-22 10:32:00 +00:00
test(gateway): assert queued outcome, not merge_pending_message_event call
The subagent-demotion busy-handler test asserted the internal merge_pending_message_event call, which the FIFO refactor replaced with _queue_or_replace_pending_event. Assert the behavioral outcome (the follow-up lands in the pending slot for the next turn) instead — same fix already applied to the two steer-fallback tests.
This commit is contained in:
parent
c11c510b42
commit
b4b512c507
1 changed files with 4 additions and 4 deletions
|
|
@ -221,13 +221,13 @@ class TestBusyHandlerDemotesInterruptForSubagents:
|
|||
runner._running_agents[sk] = parent
|
||||
runner.adapters[event.source.platform] = adapter
|
||||
|
||||
with patch("gateway.run.merge_pending_message_event") as merge_mock:
|
||||
handled = await runner._handle_active_session_busy_message(event, sk)
|
||||
handled = await runner._handle_active_session_busy_message(event, sk)
|
||||
|
||||
assert handled is True
|
||||
parent.interrupt.assert_not_called()
|
||||
# Message must still be queued so it gets picked up on the next turn.
|
||||
merge_mock.assert_called_once()
|
||||
# Message must still be queued so it gets picked up on the next turn
|
||||
# (stored via the FIFO path — its own turn, no destructive merge).
|
||||
assert adapter._pending_messages.get(sk) is event
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_ack_explains_the_demotion(self) -> None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue