Skip to content

Flaky: test_answered slow-answer test reads active_turns before the parked turn leaves it #518

Closed

Description

@lydakis

tests.test_answered.AnsweredToolTests.test_a_slow_answer_parks_the_turn_and_its_error_is_the_result failed once on CI, in the runtime job of this run, for #515. That PR changes only Sonny's browser tool and its tests, nothing the daemon runs.

File "tests/test_answered.py", line 124
    self.assertEqual((stats['active_turns'], stats['waiting_turns']), (0, 1))
AssertionError: Tuples differ: (1, 1) != (0, 1)

The turn already counts as waiting while it still counts as active. So the stats read lands between the turn parking and its active slot being released. The test likely needs to poll stats until active_turns is 0, within a deadline, instead of reading it once.

Activity

  1. lydakis commented on Nov 14, 2026

    @lydakis
    OwnerAuthor

    Fixed by #767 (8c8c578): the test now polls stats until active_turns is 0 before reading waiting_turns, instead of reading once right after turn_waiting. It hasn't failed since. Closing.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    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