Skip to content

test(agent): add COV-03 scheduler-loop integration test for non-cancel message queuing#1699

Merged
bug-ops merged 1 commit intomainfrom
test-add-scheduler-loop-integr
Mar 13, 2026
Merged

test(agent): add COV-03 scheduler-loop integration test for non-cancel message queuing#1699
bug-ops merged 1 commit intomainfrom
test-add-scheduler-loop-integr

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Mar 13, 2026

Summary

Test design

The test uses:

  1. A MockChannel pre-loaded with a "hello" message (non-cancel)
  2. A DagScheduler backed by a graph in Running status with one task in TaskStatus::Runningtick() returns no actions on the first call (no Ready tasks, running_in_graph_now > 0 suppresses the Done check), so the loop reaches the select! where channel.recv() delivers the message
  3. Channel exhaustion (recv() returning None on the second call) terminates the loop with GraphStatus::Failed — acceptable since the test verifies queuing behavior, not completion status

Closes #1611

Test plan

  • cargo +nightly fmt --check — clean
  • cargo clippy --workspace --features full -- -D warnings — clean
  • cargo nextest run --config-file .github/nextest.toml --workspace --features full --lib --bins — 5301 passed
  • New test passes: scheduler_loop_queues_non_cancel_message

@github-actions github-actions bot added documentation Improvements or additions to documentation tests Test-related changes rust Rust code changes core zeph-core crate size/M Medium PR (51-200 lines) labels Mar 13, 2026
…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
@bug-ops bug-ops force-pushed the test-add-scheduler-loop-integr branch from 61c5302 to 6f733e1 Compare March 13, 2026 21:45
@bug-ops bug-ops enabled auto-merge (squash) March 13, 2026 21:45
@github-actions github-actions bot added tests Test-related changes and removed tests Test-related changes labels Mar 13, 2026
@bug-ops bug-ops merged commit e37d4a4 into main Mar 13, 2026
15 checks passed
@bug-ops bug-ops deleted the test-add-scheduler-loop-integr branch March 13, 2026 21:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core zeph-core crate documentation Improvements or additions to documentation rust Rust code changes size/M Medium PR (51-200 lines) tests Test-related changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: add scheduler-loop integration test for non-cancel message queuing during plan execution

1 participant