Skip to content

Wait on state, not on a 1.2s window, in the one-panel-at-a-time check - #23

Merged
systemslibrarian merged 1 commit into
mainfrom
fix/timing-concurrency-wait-on-state
Oct 3, 2026
Merged

systemslibrarian merged 1 commit into
mainfrom
fix/timing-concurrency-wait-on-state

Conversation

@systemslibrarian

Copy link
Copy Markdown
Owner

"only one panel is ever being timed at once" polled a fixed 120 x 10ms window
starting the instant the page loaded, then asserted the window had caught a
panel mid-measurement. On a slower or loaded runner the queue had not started
inside that 1.2 seconds, sawBusy stayed 0, and the suite failed with

at least one panel must have been caught measuring

which is a statement about the runner's speed, not about the invariant. It is
why this lab's Dependabot bumps sat unmerged against a bump that changed nothing
relevant.

WHAT IT ASSERTS IS UNCHANGED. maxConcurrent must still be exactly 1, the poll
must still have caught a panel measuring, and all four panels must still reach a
verdict. The window is what changed: it now begins when the first panel actually
enters the Running state and ends when the last one leaves it, so it covers the
whole measurement instead of an arbitrary span. That makes the non-vacuity
assertion true by construction rather than by luck, and it WIDENS what the
concurrency check observes rather than narrowing it.

A second time-dependence was behind it: a panel re-enables its button a tick
before its verdict is painted, so counting verdicts at that instant read 3 of 4.
Same remedy -- the count waits for four rather than sampling once.

4 consecutive runs of the named test pass; full Playwright suite 16 passed;
unit tests pass.

Co-Authored-By: Claude Opus 5 noreply@anthropic.com

🤖 Generated with Claude Code

"only one panel is ever being timed at once" polled a fixed 120 x 10ms window
starting the instant the page loaded, then asserted the window had caught a
panel mid-measurement. On a slower or loaded runner the queue had not started
inside that 1.2 seconds, sawBusy stayed 0, and the suite failed with

  at least one panel must have been caught measuring

which is a statement about the runner's speed, not about the invariant. It is
why this lab's Dependabot bumps sat unmerged against a bump that changed nothing
relevant.

WHAT IT ASSERTS IS UNCHANGED. maxConcurrent must still be exactly 1, the poll
must still have caught a panel measuring, and all four panels must still reach a
verdict. The window is what changed: it now begins when the first panel actually
enters the Running state and ends when the last one leaves it, so it covers the
whole measurement instead of an arbitrary span. That makes the non-vacuity
assertion true by construction rather than by luck, and it WIDENS what the
concurrency check observes rather than narrowing it.

A second time-dependence was behind it: a panel re-enables its button a tick
before its verdict is painted, so counting verdicts at that instant read 3 of 4.
Same remedy -- the count waits for four rather than sampling once.

4 consecutive runs of the named test pass; full Playwright suite 16 passed;
unit tests pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@systemslibrarian
systemslibrarian merged commit 3f02341 into main Oct 3, 2026
4 checks passed
@systemslibrarian
systemslibrarian deleted the fix/timing-concurrency-wait-on-state branch October 3, 2026 11:30
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