Skip to content

[Fix] Tests fail intermittently under scheduler and hardware variation - #2

Draft
roomote-researcher-roomote-ai[bot] wants to merge 1 commit into
masterfrom
fix/deterministic-flaky-tests-2r6xryuqkrfch
Draft

roomote-researcher-roomote-ai[bot] wants to merge 1 commit into
masterfrom
fix/deterministic-flaky-tests-2r6xryuqkrfch

Conversation

@roomote-researcher-roomote-ai

Copy link
Copy Markdown

​Created by Roomote. View the task or mention @roomote for follow-up asks.

What changed

  • Replaced scheduler-dependent playback sleeps with an event that waits for the output stream to open.
  • Ensured playback queue items are acknowledged even when audio playback fails, preventing blocked joins.
  • Reset reusable worker state between runs and made the integration, CLI, and audio tests independent of hardware, randomness, and global sleep patches.
  • Added regression coverage for playback failures and stream-start coordination.

Why this change was made

The audio tests and measurement workflow contained timing, hardware, and shared-state assumptions that can fail intermittently under different schedulers or test order. The integration fixture also did not match the current four-value measurement contract.

Impact

The affected tests now use deterministic fixtures and mocks, while production measurement waits on an explicit playback readiness signal instead of an arbitrary delay. Full pytest execution could not be run in this sandbox because pytest and the project dependencies are unavailable; compileall and git diff --check pass.

Known flakes not fixed in this PR: external-service and concurrency risks in Virtual_Therapist archived LLM integration tests, and hardware interrupt timing in Pycharm-MicroPython. They require their external services or hardware to reproduce safely and had no comparable host-only CI evidence.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant