Context
Issue #1603 added tokio::select! in run_scheduler_loop() to poll channel.recv() concurrently with scheduler.wait_event(). Non-cancel messages received during plan execution are queued via enqueue_or_merge().
Missing test (COV-03)
There is no integration test that verifies this queuing behavior end-to-end: that a non-cancel message delivered to the channel during scheduler loop execution appears in message_queue after the plan completes.
The enqueue_or_merge() unit tests in message_queue.rs cover the queue logic in isolation, but not the scheduler loop path.
Acceptance criteria
- A
#[tokio::test] in agent/tests.rs that:
- Builds an agent with a MockChannel pre-loaded with a non-cancel message (e.g. "hello")
- Runs the scheduler with a graph that completes on the first tick
- Asserts that
agent.message_queue contains the queued message after plan completion
Labels
enhancement, testing
Context
Issue #1603 added
tokio::select!inrun_scheduler_loop()to pollchannel.recv()concurrently withscheduler.wait_event(). Non-cancel messages received during plan execution are queued viaenqueue_or_merge().Missing test (COV-03)
There is no integration test that verifies this queuing behavior end-to-end: that a non-cancel message delivered to the channel during scheduler loop execution appears in
message_queueafter the plan completes.The
enqueue_or_merge()unit tests inmessage_queue.rscover the queue logic in isolation, but not the scheduler loop path.Acceptance criteria
#[tokio::test]inagent/tests.rsthat:agent.message_queuecontains the queued message after plan completionLabels
enhancement, testing