Skip to content

Windows: the outcome deadline test can elapse before its reader starts #511

Closed

Description

@hellices

Problem

windows-test failed twice in a row on #509 (run 40940288086, attempts 1 and 2) in a test that #509 does not touch:

FAILED tests/ui/test_deployment_outcome_controller.py::test_absolute_deadline_reaps_reader_that_suppresses_cancellation - TimeoutError
tests/ui/test_deployment_outcome_controller.py:914: await asyncio.wait_for(started.wait(), timeout=HANG_GUARD_SECONDS)

Cause

The test builds the controller with deadline_seconds=0.01 and waits for the reader to start. DeploymentOutcomeController._observe computes remaining = deadline_seconds - (clock() - started) before the first read, and returns with the deadline marked elapsed when remaining <= 0. On a loaded runner, more than 10 ms passes between registering the observer and the worker running, so the reader is never called. started is then never set, and the test times out after 30 s.

So the test asserts a timing it does not control. Production is unaffected: the default deadline is 300 s.

Done when

The test reaches the reader before the deadline can elapse, independent of runner speed, by controlling the clock the controller reads rather than relying on 10 ms of wall time. It still proves that the absolute deadline reaps a reader that suppresses cancellation.

Activity

  1. self-assigned this
    on Oct 29, 2026
  2. added
    area: uiTextual application, screens, widgets, and interaction design
    concern: testingTest infrastructure, evaluation, and quality measurement
    status: needs-triageNew issue waiting for a maintainer to accept or close it
    status: acceptedConfirmed bug or accepted change; a pull request may follow once the issue is assigned
    and removed
    status: needs-triageNew issue waiting for a maintainer to accept or close it
    on Oct 29, 2026
  3. added this to the v0.7.0 milestone on Oct 29, 2026
  4. added a commit that references this issue on Oct 29, 2026
    68365a8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area: uiTextual application, screens, widgets, and interaction designconcern: testingTest infrastructure, evaluation, and quality measurementstatus: acceptedConfirmed bug or accepted change; a pull request may follow once the issue is assigned

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions