perf(test): poll ClickClack gateway faster#109803
Conversation
|
Land-ready proof:
|
|
CI gap: |
|
Codex review: needs maintainer review before merge. Reviewed July 17, 2026, 5:10 AM ET / 09:10 UTC. Summary PR surface: Tests +6. Total +6 across 1 file. Reproducibility: not applicable. This PR optimizes existing test polling rather than reporting a production bug. Its performance claim has a controlled before-and-after Testbox comparison. Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the test-local helper after exact-head checks confirm the current merge result, keeping the default timeout and the intentionally unchanged token-fixture-adjacent waits rather than changing global Vitest polling behavior. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR optimizes existing test polling rather than reporting a production bug. Its performance claim has a controlled before-and-after Testbox comparison. Is this the best way to solve the issue? Yes. A test-local wrapper is the narrowest maintainable fix because it preserves Vitest's timeout and avoids changing polling behavior for unrelated suites. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 4612b1692c15. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Tests +6. Total +6 across 1 file. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (3 earlier review cycles) |
|
Merged via squash.
|
What Problem This Solves
The ClickClack gateway suite accumulated Vitest's 50 ms default polling delay across asynchronous gateway-state assertions.
Why This Change Was Made
Route 25 safe assertions through a test-local helper with a 1 ms interval. Preserve every assertion and Vitest's default timeout. Leave two token-fixture-adjacent waits unchanged so credential-like fixture text never enters the review diff.
User Impact
No user-visible or production behavior changes. Controlled same-Testbox median test-body time drops from 1.890 seconds to 671 milliseconds.
Evidence
tbx_01kxqhvjqsje8kdjyd4p1vjxas: 20/20 tests passed across all comparison runs.pnpm check:changedpassed after formatter correction.