Repository navigation
Conversation
…low runner Two Streamable HTTP tests timed out at Vitest's 5 s default on one Windows CI leg in 56. Measured over 1,040 runs of the suite on 13 Windows runners, they take a median of 140 ms and 72 ms and never reached 1 s; the lock was always taken on the first try and the save's rename took at most 11 ms. In the failed leg the whole suite ran five times slower than its median, with in-memory tests slowed as much as the HTTP ones, so the cause is the runner, and the tests with the most round trips crossed the limit. Both describes now carry an explicit 30 s timeout with the measurements. Closes #5570 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: cliffhall <cliff@futurescale.com>
|
|
| Tools | Prompts | Resources | Resource templates | |
|---|---|---|---|---|
| Base | 9 | 0 | 1 | 0 |
| Head | 9 | 0 | 1 | 0 |
Updated by this run for 08f87f0cad8241cd4d2d968bf19d0c7ce7c3118f.
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block the HTTP test-timeout changes intended to accommodate slow CI runners.
No open issues 🎉
What changed in this PR
Addresses #5570 by giving the memory server’s real-endpoint HTTP tests more time on slow CI runners, without changing server behavior or adding retries.
Changes:
- Sets a 30-second timeout on both Streamable HTTP test groups.
- Adds comments explaining the timeout using measured Windows CI durations and runner slowdowns.
- Keeps the default timeout for other tests.
| File | Description |
|---|---|
src/memory/__tests__/write-limits.test.ts |
Adds a 30-second timeout and measurement context to the HTTP write-limit test group. |
src/memory/__tests__/http.test.ts |
Defines and applies a 30-second timeout to the HTTP test group, with supporting CI measurements. |
Review effort: Balanced
|
Test memory (Windows), repeated on this PR's commit
Six passes say little about a failure seen once in 56 legs; the weight is in the 1,040 diagnostic runs in the description (runs 44375778932 and 44383570850), where no test in the suite reached 1 s. Copilot round 1: clean, no findings ("Approval recommended", no open issues). The loop ends here on the first clean round; nothing was pushed after it. |
Closes #5570
Description
Gives memory's real-endpoint Streamable HTTP tests an explicit 30 s timeout, with the measurements behind it in a comment. Test-only: two
describelines and their comments.src/memory/__tests__/http.test.ts:describe("Streamable HTTP", { timeout: REAL_ENDPOINT_TIMEOUT_MS }, …)src/memory/__tests__/write-limits.test.ts:describe("write limits over Streamable HTTP", { timeout: 30_000 }, …)The cause is a slow runner, not the endpoint, the client's negotiation or the file lock. The two tests are fast on Windows; they are the ones with the most sequential round trips, and each is the first real client connect in its file, so they are the first to cross Vitest's 5 s default when a runner slows everything down.
Server Details
Motivation and Context
#5570: two tests timed out on Test memory (Windows) and passed on a rerun. The issue asks where the time goes and how often.
How often. Every
typescript.ymlrun since the transport landed, from the job logs: 56 Windows memory legs ran these tests, and 1 failed (run 44246763473, attempt 1). Per file, on Windows:http.test.ts(22 tests)write-limits.test.ts(25 tests)So they are not near 5 s in a normal run. Filesystem's and sequential-thinking's
http.test.tson Windows show no tail at all (max 414 ms and 1043 ms per file over 56 and 55 legs).The failed leg was slow everywhere. Its suite took 34.1 s of test time against a 6.8 s median (the slowest passing leg: 12.1 s). Files that never open a socket were slowed as much as the HTTP ones:
extra-fields.test.ts(in-memory transport)read-options.test.ts(in-memory transport)resource.test.tsatomic-save.test.tsWhere the time goes. A temporary diagnostic on this branch (not in this diff; commits
4ec6947candc404e63e, dropped before the PR opened) timed each phase of the two tests and ran memory's whole suite repeatedly on Windows runners, with a 60 s test timeout so a slow test would finish and report:tools/list19 ms,create_entities50 ms,open_nodes6 ms. No retry, reconnection delay or fallback wait shows up anywhere; the pinned-era client and the probing default client behave the same.withFileLockgot the lock on its firstopenevery time (max 68 ms to acquire, 24 ms to release), so the Windows EPERM wait was never taken.saveGraph's write and rename took at most 20 ms and 11 ms.That is why the change is a timeout rather than a change to the endpoint or the lock: there is no wait to remove. The limit exists to catch a hang, and 30 s still does; it is about 40 times the slowest these tests have been measured.
How Has This Been Tested?
No client-observable surface, so a targeted probe:
1locally, all 7 cases inStreamable HTTPand the one inwrite limits over Streamable HTTPfail withTest timed out in 1ms, and nothing else does.npm test -w src/memory: 297 passed.npm run local:gate: exit 0.Breaking Changes
None.
Types of changes
Checklist
npm run changeset) if this changes what a TypeScript server publishes (not applicable: tests are not published)Additional context
The timeout is on the two
describes rather than on the two tests that failed: every case in them drives a real endpoint, and in the failed leg the listener case beside them took 1540 ms, against under 300 ms in every passing leg. A suite-widetestTimeoutwas not used, since the in-memory tests have far more headroom (the slowest took 1420 ms in the failed leg).🤖 Generated with Claude Code