Skip to content

Make timing-sensitive tests reliable on busy machines #228

Closed

Description

@itsskofficial

Several tests fail when the machine is busy (for example while desktop builds or other suites run in parallel) and pass when run alone. They have also failed on CI runners. Timing-based assertions should not depend on machine speed.

Seen so far:

  • tests/tasks/test_stuck_runs.py, the slow-model test (also seen failing on main)
  • tests/evolution/...::test_profile_upkeep_appends_without_clobbering
  • tests/sandbox/test_sandbox.py::test_bridge_rejects_wrong_token
  • tests/memory/test_user_model.py::test_refresh_adds_insights_with_evidence_and_summary
  • (fixed in test(voice): measure first-clause speed from the first token, not from start-up #222: the voice first-clause timing test)

Idea: make each one deterministic: fake clocks instead of wall time, events instead of sleeps, generous bounds measured relative to an internal reference (as #222 did), and no reliance on ports or timing between processes.

Done when: each test passes 20 runs in a row while the full suite runs in parallel with a desktop build, on Windows and Linux.

Activity

  1. added
    bug
    help wanted
    area: engine
    priority: P1
    size: S
    on Oct 9, 2026
  2. added a commit that references this issue on Oct 10, 2026
    59c848e
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

    area: enginebughelp wantedpriority: P1size: S

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions