test(server): agent-task-recovery Retry-After floor case flakes under load
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- bun, typescript
- Domain
- backend, testing-qa
Research direction
Start with tests/server/agent-task.test.ts around the failing assertion at line 1414, then inspect the shared globalThis.fetch stub and nearby recovery cases. Reproduce with the supplied bun scripts/test.ts --changed=v2.91.0 command under load. Scope the fetch count to this case or clean up pending recoveries; done when the Retry-After floor assertion remains deterministic in the multi-file run.
Written by the indexing model from the issue text.
Description
Client or integration
Other
Area
Proxy and routing
Summary
tests/server/agent-task-recovery.test.ts case "agent task recovery transient retry (#3661) > a Retry-After inside the deadline is honoured as a floor, not capped" failed once in a loaded multi-file run (bun scripts/test.ts --changed=v2.91.0, 47151 pass / 1 fail) during 2.92.0 release-candidate verification at dev 03bcf789e95c. The interval between the first and second recovery fetch was 664 ms, against an expected floor of 2400 ms. In isolation it passed 6/6 at the candidate and 6/6 at v2.91.0, and neither src/server/responses/agent-task-recovery.ts nor the test changed in the train, so this looks like a test-isolation flake rather than a product regression.
Suspected cause: the case counts any call to the shared globalThis.fetch stub as the second recovery attempt. A retry left pending by an earlier case in the same file (its timer delayed under CPU load) can land on this case's stub, increment fetches to 2, and record secondAt early. Scoping the stub per request (for example, matching a per-case request marker) or awaiting and cancelling the earlier cases' pending recoveries in afterEach would make the assertion deterministic.
Reproduction
OCX_TEST_RUNNER_BUN=/path/to/bun-1.4.3 bun scripts/test.ts --changed=v2.91.0
Intermittent and load-dependent (host load average about 5 to 10 during the run). It does not reproduce with bun test --isolate tests/server/agent-task-recovery.test.ts alone.
Version
dev @ 03bcf789e95cc01fb809b624e4fb109e351308eb (2.92.0 candidate)
Operating system
macOS (arm64)
Provider and model
N/A
Logs or error output
Expected: >= 2400
Received: 664
at tests/server/agent-task-recovery.test.ts:1414:32
(fail) agent task recovery transient retry (#3661) > a Retry-After inside the deadline is honoured as a floor, not capped [2502.99ms]
Screenshots and supporting files
No response
Redacted configuration
No response
Checks
- I searched existing issues and documentation.
- I removed secrets, tokens, account details, request credentials, and personal data.
- Dominant language
- TypeScript
- Stars
- 16.9k
- Forks
- 1.3k
- Avg merge
- 8h 13m
- Merged PRs (30d)
- 625
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from lidge-jun/opencodex
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 94/100
lidge-jun/opencodex#7612 · 2 comments · 1 reaction ·
Maintainers usually reply within 1 day
-
bug cli install
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
lidge-jun/opencodex#7578 · 1 comment ·
Maintainers usually reply within 1 day
-
[Bug]: Business Premium seat plan self_serve_business_prolite is counted at baseline capacity weight 1 instead of 5Possibly taken A pull request linked to this issue is open or already merged. Openaccount-pool bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
lidge-jun/opencodex#7440 · 2 comments ·
Maintainers usually reply within 1 day
-
[Docs]: translate the #7395 OpenGateway and Mistral provider-guide sectionsPossibly taken @MannXo claimed this 3 days ago. Opendocumentation
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
lidge-jun/opencodex#7405 · 3 comments ·
Maintainers usually reply within 1 day
-
[Bug]: resolveCodexRuntime test depends on the host's installed CodexPossibly taken A pull request linked to this issue is open or already merged. Openbug cli
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
lidge-jun/opencodex#7403 · 3 comments ·
Maintainers usually reply within 1 day
All issues in lidge-jun/opencodex
Similar issues
-
level/task type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
wazuh/wazuh-dashboard-plugins#9508 ·
Maintainers usually reply within 1 day
-
Testnet EOL page links Zonescan mainnetPossibly taken @napelvs claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Azure-Samples/azure-search-openai-demo#3249 ·
Maintainers usually reply within 1 day
-
[Docs] docs/architecture.mermaid leaves out 21 of the 51 src/ directoriesPossibly taken @uyg7x claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day
-
enhancement status:needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
dongdongbh/Mindwtr#1438 ·
Maintainers usually reply within 1 day