Conversation
…l message queuing Adds scheduler_loop_queues_non_cancel_message to agent/tests.rs, verifying the tokio::select! path added in #1603: a non-cancel message received via channel.recv() during run_scheduler_loop is passed to enqueue_or_merge() and appears in agent.message_queue after the loop exits. Closes #1611
61c5302 to
6f733e1
Compare
bug-ops
added a commit
that referenced
this pull request
Mar 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scheduler_loop_queues_non_cancel_messagetoagent/tests.rs, providing an end-to-end integration test for thetokio::select!message-queuing path added in orchestration: restructure agent message loop to allow /plan cancel delivery during run_scheduler_loop (SEC-M34-002) #1603channel.recv()duringrun_scheduler_loopis passed toenqueue_or_merge()and appears inagent.message_queueafter the loop exitsTest design
The test uses:
MockChannelpre-loaded with a"hello"message (non-cancel)DagSchedulerbacked by a graph inRunningstatus with one task inTaskStatus::Running—tick()returns no actions on the first call (no Ready tasks,running_in_graph_now > 0suppresses the Done check), so the loop reaches theselect!wherechannel.recv()delivers the messagerecv()returningNoneon the second call) terminates the loop withGraphStatus::Failed— acceptable since the test verifies queuing behavior, not completion statusCloses #1611
Test plan
cargo +nightly fmt --check— cleancargo clippy --workspace --features full -- -D warnings— cleancargo nextest run --config-file .github/nextest.toml --workspace --features full --lib --bins— 5301 passedscheduler_loop_queues_non_cancel_message