Skip to content

MeetingPromptDetector tests: make the gate suites fail when their gate breaks - #1915

Merged
r3dbars merged 1 commit into
mainfrom
claude/modest-clarke-592c5b
Sep 29, 2026
Merged

r3dbars merged 1 commit into
mainfrom
claude/modest-clarke-592c5b

Conversation

@r3dbars

@r3dbars r3dbars commented Sep 29, 2026

Copy link
Copy Markdown
Owner

Follow-up to #1906 and #1907, which fixed the MeetingPromptDetectorTests load flake with a settle signal and makeIsolatedDetector. I built the same fix in parallel, and mutation testing it turned up one gap that's still on main. Test-only change.

The gap

Four suites promise a gate keeps a live call quiet:

  • never prompts while our own capture is active
  • busy presentation state suppresses mic prompts
  • disabled mic prompt gate suppresses stale callbacks
  • already-recording suppression is reported coarsely

They all use a Chrome mic with no window titles, which is makeIsolatedDetector's default. An untitled browser waits 60 s before it prompts. So these suites stay quiet whether the gate works or not, and they can't fail when it breaks.

The fix

Each of those suites now shows a Meet tab, which prompts at once, so the gate is the only thing keeping it quiet. Also, the muted-browser suite's mic-release grace goes from 5 s to 60 s, so a slow machine can't end the browser session inside the test's gap. The mic coming back cancels it, so the test doesn't get slower.

Proof

Same detector on current main, with three gates broken on purpose:

  • M1: own-capture gate skipped
  • M4: busy-presentation gate ignored
  • M5: disabled-detection gate ignored
tests red assertions what catches what
main today 4 M4 and M5 are caught by nothing. M1 is caught only by other suites; the one named for it stays green
this PR 13 each of the three gate suites goes red for its own gate, plus the same 4

Unmutated, the filtered suite passes 138/138: on the build run and 6 more runs of that binary (load ~74).

Earlier in the session I built the parallel settle-counter version on the pre-#1906 base. Against that, the old fixed ~100 ms wait failed 72 of 72 runs at load 147–390 on 18 cores (2–53 assertions each), including 65 runs alongside bash build.sh --no-open. The counter version passed all 81 of its runs, 72 of them interleaved with those baseline runs. That's the same design #1906 merged, so that evidence backs it too.

Checks

bash check.sh: PASS (5 mapped checks)

  • build.sh --no-open
  • run-tests.sh: 19,961/19,961
  • check-test-shape.py --self-test
  • check-test-shape.py
  • check-source-pins.py --changed-only

Review: /code-review (high) on the earlier, superseded version found no correctness issues; its two small fixes went into what #1906 already does. Codex review couldn't run: ~/.codex/config.toml pins a model this login rejects. This follow-up is 17 lines of test setup.

Nothing quarantined. No mic, camera, Accessibility or real-call proof claimed or needed; detector behavior is unchanged.

🤖 Generated with Claude Code

…e breaks

The own-capture, busy-presentation, disabled-detection and already-recording
suites used a Chrome mic with no window titles (makeIsolatedDetector's
default). An untitled browser waits 60 s before it prompts, so they stayed
quiet whether or not their gate worked: removing the busy or the disabled
gate turned nothing red, and removing the own-capture gate left the suite
named for it green. Each now shows a Meet tab, which prompts at once, so the
gate is the only thing keeping it quiet.

Also raise the muted-browser suite's mic-release grace from 5 s to 60 s so a
slow machine can't end the browser session inside the test's gap; the mic
coming back cancels it.
@r3dbars
r3dbars merged commit 02f46ae into main Sep 29, 2026
8 checks passed
@r3dbars
r3dbars deleted the claude/modest-clarke-592c5b branch September 29, 2026 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant