Skip to content

it_protocol: two more fixed-wall-clock-window first-frame waits, same shape as #446 #448

Description

@mkovero

context

#446 fixed a flake in modes.rs's two loudness tests: they waited a fixed wall-clock window for a first frame and asserted on whatever arrived (or didn't) inside it, so the test went red on machine load rather than on a defect. #446's acceptance criteria required a survey of ac-rs/crates/ac-daemon/tests/it_protocol/ for every other site with the same shape ("a loop or sleep that exits on wall clock and then asserts on whatever arrived"), with each one either fixed to the same mutation-check bar or filed here. #446's file manifest was modes.rs only, so these two are out of scope for that PR.

From the architect's read of origin/main at 9869d49, unchanged as of this issue:

  • monitor.rs ~336, in monitor_spectrum_emits_scope_frames: collects visualize/scope frames for a fixed Duration::from_secs(3), then asserts !frames_by_idx.is_empty(). Same shape as the loudness tests' bug — a fixed window that a slow/starved run could exhaust before the first frame arrives, with a "got nothing" assertion that can't tell "too short a window" apart from "frame never coming."
  • warmup.rs ~58, in warmup_leaves_every_capture_ring_at_the_same_phase: thread::sleep(Duration::from_millis(600)), then asserts on accumulated per-tick log lines (≥3 expected). Same shape: a fixed sleep that a loaded machine could have the daemon still be inside its first tick when it ends.

what this issue asks for

For each site: work out the stream-time (or otherwise load-independent) event that should end the wait instead of the wall clock — analogous to #446's "wait for the Nth frame after the momentary window fills," but derived from what visualize/scope frames and warmup's per-tick log lines actually depend on — then apply #446's shape: wall clock becomes a hang guard only, and the mutation check (remove or degrade the awaited signal, confirm the test fails on its own terms without hanging, confirm via binary hash that the mutated build is really different) is the acceptance bar, same as #446 required for the loudness tests.

out of scope for this issue

related

Activity

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

    needs-designArchitect must review before implementationscope-nonedaemon, CLI, wire, build, docs — nothing a standard governs

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions