Skip to content

test(branch-flow): remove the 3s Wait timeout race in start_wait #2228

Done

Description

@eric8810

Part of #2217.

Context

start_wait in crates/dim-agent-capabilities/tests/branch_flow.rs starts tool:wait {"timeoutMs":3000}, waits for the ToolUse event, then asserts that no ToolResult has landed yet. The test uses that state to prove a branch notice reaches a wait that is still waiting.

Under load the 3 s tool timeout can fire before until_events observes the ToolUse, so the assertion sees a ToolResult and fails with the wait is still waiting at branch_flow.rs:8056. This happened in PR #2223's Linux verify job; the test and implementation were unchanged there.

The three callers are:

  • an_idle_line_wakes_the_wait_of_the_main_that_opened_it
  • an_ended_line_wakes_the_wait_of_the_main_that_opened_it
  • a_steer_message_from_a_line_wakes_the_wait_of_the_main_that_opened_it

All three expect the wait to end from a branch notice, not from its timeout.

Scope

  • Change start_wait to use the Wait tool's default timeout instead of 3 s, so the test does not race the timeout before the notice.
  • Keep the existing bounded until_events / soon waits: a missing wake must still fail promptly with the current messages.
  • No production code change.

Acceptance

  • The three tests no longer encode a 3 s race.
  • A missing wake still fails within the existing bounded wait, with a clear message.
  • The three tests pass; run each at least twice.

Activity

  1. self-assigned this
    on Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions