Repository navigation
fix(serve): a retried send waits for the server's own timeout instead of racing it - #980
Merged
Merged
Conversation
… of racing it A command and max serve both waited 30 s for MAX. When MAX answered near that limit, the command gave up on the server first and sent the same cid again while the server was still waiting on the first, so two sends with one cid were in flight at once. MAX drops a repeated cid when it comes after the first (measured, ARCHITECTURE section 6), but never measured concurrently. The command now waits 5 s longer than the server, so the server's "MAX did not answer" arrives first and the retry is the sequential, measured case. The regression test fails without the fix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
leemour
added a commit
that referenced
this pull request
Nov 17, 2026
Prepares 0.118.0 so #980 reaches npm: the command waits 5 s longer than `max serve`, so a retry never runs at the same time as the first send. - `package.json`, `src/version.ts`: 0.118.0. `CHANGELOG.md`: `changes/fix-serve-wait-longer.md` collected into `## 0.118.0 — 17.11.2026`, the same result as `scripts/changelog-fragments.ts`. No fragments are left, so `bin/release` will not open its own fold pull request. ## Conformance - #980 passed CI on its branch. This branch changes only the version and the changelog. - Live check (`pnpm smoke:live`, step 3a of the release guide): **not run.** The owner approved this release without new live checks (NEED-2678 A, 2026-11-17). `bin/release` still runs `pnpm release:check` before it dispatches `release.yml`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
RISK-2320. A command and
max serveboth waited 30 s for MAX. When MAX answered near that limit, the command timed out on the server first and retried the send with the samecidwhile the server was still waiting on the first attempt: two sends with onecidin flight at once.MAX drops a repeated
cidthat comes after the first (measured 2026-09-19, also across connections and up to 15 min later; docs/dev/ARCHITECTURE.md section 6). Two at once were never measured.src/server/server-connection.ts: the command waits the timeout plus 5 s for the server, so the server's "MAX did not answer" arrives first and the retry is the sequential, measured case.src/server/server.test.ts: a server answering 1 ms past the timeout is still heard (fake timers, no real wait). Fails without the fix, passes with it.Local: the whole
src/server/server.test.ts(90 passed), biome, typecheck, docs:check.🤖 Generated with Claude Code