Cap the liquid-test polling interval at 5 seconds - #263
Merged
Conversation
WalkthroughThis PR caps liquid-test polling backoff at 5000ms, adds a unit test and test-catalogue entry, updates release notes for versions 1.57.0–1.57.2, bumps the package to 1.57.2, and updates ChangesPolling Delay Cap
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
michieldegezelle
self-requested a review
July 6, 2026 12:06
michieldegezelle
approved these changes
Jul 6, 2026
The delay between result polls grows 5% per poll with no upper bound, so a long test run (~10 minutes server-side) ends up being checked only every 30-60 seconds - a finished run can sit unnoticed for up to a minute, and in CI that lag multiplies across batches. Cap the delay at 5s: at most one poll per 5 seconds per run (reached after ~70s), bounding the detection lag without meaningfully increasing request volume for short runs.
michieldegezelle
force-pushed
the
cap-test-polling-interval
branch
from
July 30, 2026 08:15
5228b01 to
5a493c2
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@lib/liquidTestRunner.js`:
- Around line 314-316: Clarify the polling-rate comment near pollingDelay to
state that the 5-second maximum interval applies only after the delay reaches
its cap; acknowledge that the initial 1000ms delay allows multiple polls within
five seconds.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 19e0b708-bda4-4965-8e23-3fb4b4ef1eb0
⛔ Files ignored due to path filters (2)
package-lock.jsonis excluded by!**/package-lock.jsonyarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (5)
CHANGELOG.mdlib/liquidTestRunner.jspackage.jsontests/TESTS.mdtests/lib/liquidTestRunner.test.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
fetchResultgrows the poll delay 5% per poll with no cap. For long test runs that means:A liquid test that takes ~10 minutes server-side (observed in be_market CI, e.g. run 28656835005: a single test, 9m51s) is only checked every ~30s by then, so a finished run sits unnoticed for up to a minute. In CI batches that detection lag multiplies.
What
Cap the delay at 5 seconds (reached after ~70s of polling). Detection lag is now bounded at 5s; short runs poll exactly as before, and the steady-state request rate is at most one
readTestRunper 5s per run.Validation
setTimeoutdelay is exactly 5000ms (cap reached, never exceeded).Context: follow-up from silverfin/bso_github_actions#28 (CI-side retries + parallel firms) — this is the CLI-side piece of the latency work.