Skip to content

Command poll sleeps until the latest task deadline #1826

Closed

Description

@FlorentinDUBOIS

The loop removes expired tasks, then computes Poll::poll from the maximum remaining deadline. With a silent worker and no unrelated readiness, an earlier task is not revisited until the later deadline.

Evidence: source-only. Not executed. Minimal check: hold two worker-backed commands silent with deadlines A < B and assert A completes at A rather than B.

Worker replies and buffered work wake poll, but neither exists in the stated silent-worker precondition; no periodic tick supplies the missing wakeup.

Acceptance criteria: Use the earliest outstanding deadline for the next poll wakeup. Add a regression with two silent worker-backed tasks whose deadlines differ, and verify that the earlier one terminates on time without unrelated I/O.

Source checked at bd19a78e2831fa9b3bc099eff96359f1bd457958 on 2026-10-03:

Runtime evidence, where stated, was collected on 8ed38435c6e80dc374de421116d8b145f1e5ce6a; the reviewed mechanisms remain unchanged at the source revision above. Audit regression tests are prepared locally and are not yet published on main.

Activity

  1. FlorentinDUBOIS commented on Oct 3, 2026

    @FlorentinDUBOIS
    CollaboratorAuthor

    Reproduced on the frozen bd19a78e2831fa9b3bc099eff96359f1bd457958 base and included in #1843.

    command::server::tests::poll_wakes_for_the_earliest_silent_worker_task_deadline is red: task A with an approximately 100 ms remaining deadline completes only after task B's approximately 2 s deadline. The combined suite reports the same unique failure in the Sōzu lib/bin targets. A controlled .max() to .min() mutation made the focused test green, then the production source was restored before the branch snapshot.

    This comment records the test evidence; the draft contains no product fix.

  2. added a commit that references this issue on Oct 4, 2026
    d7b5f14
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