Skip to content

fix(tests): fp_posters caps its pump in virtual ms, not wall ms - #125

Merged
KunalSiyag merged 1 commit into
mainfrom
droid/posters-clock-flake
Oct 28, 2026
Merged

KunalSiyag merged 1 commit into
mainfrom
droid/posters-clock-flake

Conversation

@KunalSiyag

Copy link
Copy Markdown
Owner

What

fp_posters_test's pump advanced the fake clock 50 ms per frame but stopped at a
wall-clock cap. On a loaded CI box fewer frames run per wall second, so the pump
exited mid-flight and the day-cap asserts saw a half-run state
("at most 6 live submits per game day (4)").

Fix

Cap the pump in virtual ms (the same units the fake clock advances in), rescale
the budgets x10 to keep runtimes similar (default 30000; explicit 500/800/1500 become
5000/8000/15000), and keep a 30 s wall-clock backstop inside the loop so a wedged
test still dies. One file, 13+/10-.

Verification

  • 5/5 standalone runs under gate env (XDG_DATA_HOME=mktemp, GRIDFALL_OFFLINE=1)
  • 3/3 with every core saturated (load > cores)
  • pre-commit clean, run_all PASS, gate quick PASS
    (run 1 flaked fp_chat_test's 0.3 ms row-append perf check under load avg ~12 —
    unrelated to this diff, passed clean on both re-runs)

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>

_pump advanced the fake clock 50 ms per frame but stopped at a WALL-ms
cap: on a loaded CI box each frame costs more wall time, the pump got in
fewer frames, and the day-cap asserts saw a half-run client (the gate
flake: "at most 6 live submits per game day (4)"). The cap is now in
VIRTUAL ms, so a slow box just takes longer to reach the same state;
budgets keep the old unloaded scale (3000 wall ms was ~30 virtual s, so
the default is 30000 and the explicit caps scale x10), and a 30 s wall
backstop keeps a stuck done() from hanging the gate. Verified: 5/5
standalone + 3/3 with every core saturated (previously flaky under a
full-gate load).

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown

Automated review

No new findings on the 1 changed files (gdlint, complexity, TODO policy, dead code).

Run python3 tools/checks/run_all.py locally for the full set of checks.

@KunalSiyag
KunalSiyag merged commit 5c877ec into main Oct 28, 2026
6 checks passed
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