Skip to content

Time the dispatcher's bookkeeping as a ratio, not against a fixed limit - #73

Merged
HalRiveria-Bot merged 2 commits into
mainfrom
test/bookkeeping-ratio
Nov 19, 2026
Merged

HalRiveria-Bot merged 2 commits into
mainfrom
test/bookkeeping-ratio

Conversation

@HalRiveria-Bot

Copy link
Copy Markdown
Collaborator

What was wrong

The harness's 20,000-job bookkeeping test asserted that the run finished in under 15 s of wall clock. On the same code, CI's Windows PowerShell 5.1 runners take anywhere from about 4 to 14.5 s, so a slow runner could fail a required check with nothing wrong. A fixed limit also misses the regression the test is there for: a PowerShell-level walk of the pending queue per job (quadratic) took 20,000 jobs to 7.7 s locally on 5.1, inside the old limit.

What changed

The test times 20,000 jobs against the quicker of two 5,000-job runs, in the same process, and fails if the larger takes 8 times as long or more. Linear bookkeeping gives about 4. A 45 s ceiling on the 20,000-job run (about 3 times CI's slowest 5.1 time) stays for a slowdown that's the same for every job, which a ratio can't see. Harness only.

How it was tested

  • Full harness, 5.1 then 7: all 574 passed. The ratio was 4.1 on both (2.8 s and 1.7 s for 20,000 jobs).
  • Against a scratch copy of the kit with $null = @($pkPending).Count added after each dequeue (a walk per job), the new assertion fails on both runtimes: 9.3 times on 5.1 (8.5 s for 20,000 jobs) and 10.6 on 7 (6.3 s). Both of those are under the old 15 s limit, which would have passed them.

🤖 Generated with Claude Code

HalRiveria and others added 2 commits November 19, 2026 01:08
The 20,000-job test asserted under 15 s of wall clock, and CI's Windows
PowerShell 5.1 runners take anywhere from about 4 to 14.5 s on the same
code. It now times 20,000 jobs against the quicker of two 5,000-job runs in
the same process and fails at 8 times as long: linear bookkeeping is about
4, and a PowerShell-level walk of the queue per job gives 9 to 10.6 while
staying inside the old 15 s limit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…an't see

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@HalRiveria-Bot
HalRiveria-Bot merged commit 3b594c8 into main Nov 19, 2026
2 checks passed
@HalRiveria-Bot
HalRiveria-Bot deleted the test/bookkeeping-ratio branch November 19, 2026 06:23
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.

2 participants