Skip to content

test(responses): keep the post-refresh replay inside the pacing window on Windows - #6652

Merged
lidge-jun merged 1 commit into
devfrom
codex/b7-pool401-pacing-window
Oct 6, 2026
Merged

lidge-jun merged 1 commit into
devfrom
codex/b7-pool401-pacing-window

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

Summary

a post-refresh credit hold in the pacing queue does not announce a replay send in tests/responses/responses-pool-401-refresh.test.ts (added by #6606) fails on Windows. The test configures pacing with minIntervalMs: 200, sends once, receives the 401, forces a refresh, and then expects the replay to be waiting in the pacing queue.

On hosted Windows runners the refresh and replay preparation take several hundred milliseconds, so the 200 ms interval has already elapsed. The replay never queues, and queued stays 0. Neighbouring refresh-and-replay cases in the same file take 400–800 ms there.

The interval is now 2 s, so the replay is reliably inside the window on every platform. The test still asserts the same behavior: one refresh, a queued replay, a credit hold applied while it waits, a 429, and no replay-dispatch signal. Only the test changes.

This failure was hidden on dev. Windows shard 7/9 of dev run 37360604391 stopped at an earlier failing batch from #6639. It surfaced on combined run 37388373099 once #6644, #6645 and #6651 were applied: expect(received).toBe(expected), Expected 1, Received 0, at line 823. #6606's own PR CI did not run the Windows shards.

Verification

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed. (Test-only change.)
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults. (Test-only timing; no product change.)

Summary by CodeRabbit

  • Tests
    • Updated the pacing-queue test to account for a longer delay before the refreshed request is replayed.

@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner October 6, 2026 00:01
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-06T00:03:44.111041Z 1d85779 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: lidge-jun/opencodex/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: a9b30b73-116a-4cd2-9b9d-3a78b7fa0256
📥 Commits

Reviewing files that changed from the base of the PR and between 6774f0f and 1d85779.

📒 Files selected for processing (1)
  • tests/responses/responses-pool-401-refresh.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.


📝 Walkthrough

Walkthrough

The pacing-queue test sets minIntervalMs to 2,000 ms instead of 200 ms. Its comment now describes the longer delay before the refreshed replay reaches the queue.

Changes

401 refresh test

Layer / File(s) Summary
Pacing interval test update
tests/responses/responses-pool-401-refresh.test.ts
The test changes minIntervalMs from 200 to 2,000 ms and updates the comment about when the refreshed replay reaches the queue.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to 1d857

This change lengthens the interval exercised by one test without changing production pacing. It fits the CI test timeout, so no actionable merge risk remains.

Architecture Summary

Architecture risk: 🔵 Low · up to 1d857

The change affects 1 system.

Changed systems: tests

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — tests (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in tests/responses/responses-pool-401-refresh.test.ts: The test changes the pacing interval from 200 ms to 2,000 ms and updates the comment describing when the refreshed replay reaches the queue.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the test change: keeping the post-refresh replay within the pacing window on Windows.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 1…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@lidge-jun

Copy link
Copy Markdown
Owner Author

@github-actions github-actions Bot added the chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature). label Oct 6, 2026
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

@lidge-jun

Copy link
Copy Markdown
Owner Author

Maintainer integration (lidge-jun, dev only) — 2026-10-05 bug triage round 2, lane B7.

  • Head: 1d85779
  • CI at this head: PR/full-matrix 37391753057; combined run 37391762588; every executed job passed.
  • Review: test-only: pool-401 pacing window widened from 200 ms to 2 s for Windows.
  • No local tests were run, per owner instruction; hosted CI is the evidence.
  • scripts/ci/assert-mergeable-review.sh --maintainer-integration: OK.

@lidge-jun
lidge-jun merged commit f924820 into dev Oct 6, 2026
65 of 73 checks passed
@lidge-jun
lidge-jun deleted the codex/b7-pool401-pacing-window branch October 6, 2026 03:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant