Skip to content

Fix the flaky mine-in-hold player test - #262

Merged
nulltask merged 1 commit into
develfrom
fix/flaky-mine-hold-test
Oct 11, 2026
Merged

nulltask merged 1 commit into
develfrom
fix/flaky-mine-hold-test

Conversation

@nulltask

Copy link
Copy Markdown
Owner

Summary

devel CI failed in packages/player/src/index.test.ts ("mine notes inside an active LN hold deal silent gauge damage"): expected 16 to be less than 16.

The implementation is right; the test was timing-sensitive. It schedules real-time setTimeout taps and relied on a single tap at exactly 750 ms to resolve the mine. On a loaded runner that tap can fall outside the mine's window, so the mine expires unpressed via markExpiredLandmines and, as in beatoraja, an unpressed mine deals no damage. The gauge then matches the mine-free baseline.

The test now taps every 50 ms across 600–950 ms, so one tap lands inside the window even when timers drift. Re-taps while the LN is held are neutral (no verdict, no empty POOR), and the baseline replays the same schedule, so the verdict comparison is unchanged.

Test plan

  • The test passes five times in a row.
  • The whole packages/player/src/index.test.ts passes (95 tests) with four copies running in parallel to load the machine.

🤖 Generated with Claude Code

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
be-music-player-demo b441e11 Commit Preview URL

Branch Preview URL
Oct 11 2026, 11:38 AM

@nulltask
nulltask merged commit 7ebbb45 into devel Oct 11, 2026
8 checks passed
@github-actions

Copy link
Copy Markdown

Exports Benchmark

  • Base SHA: bdb740514028
  • Head SHA: b441e11cf5eb
  • Comparable cases: 92
  • Regression threshold: 8.00%
  • Overall verdict uses the median change across cases.
  • Per-case lists compare median ops/s, not mean.
  • Base runs: median of 3
  • Head runs: median of 3

Summary

Metric Value
Overall unchanged
Median change -0.51%
Mean change -0.49%
Cases improved (>= threshold) 0
Cases regressed (<= -threshold) 1
Cases unchanged 91
Cases excluded (sub-timer-resolution) 211
Head benchmarked cases 303
Head skipped cases 21

Top Regressions

API Base median ops/s Head median ops/s Change
audio-renderer.writeAudioFile 3808.20 3109.80 -18.34%

Top Improvements

No improvement over threshold.

Excluded (sub-timer-resolution)

Per-call latency at or below 0.001ms on at least one side — the reported time is measurement noise, not the case's real cost, so no percent change is shown.

API Base median ops/s Head median ops/s
audio-renderer.createTimingBuildContext 1923076.94 1923076.92
chart.compareEvents 10416666.69 10416666.69
chart.createBeatResolver 20833332.60 20833332.60
chart.eventToBeat 13888889.10 13888889.10
chart.exWavVolumeCentibelsToLinearGain 15625000.04 15625000.04
chart.getMeasureBeats 20833332.60 20833332.60
chart.isBmsBgmVolumeChangeChannel 17857142.61 17857142.61
chart.isBmsDynamicVolumeChangeChannel 17857142.61 17857142.61
chart.isBmsKeyVolumeChangeChannel 17857142.61 17857142.61
chart.isBmsLongNoteChannel 20833332.60 20833332.60
chart.isLandmineChannel 20833332.60 20833332.60
chart.isPlayableChannel 20833332.60 20833332.60

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