Repository navigation
The chat waits for its host at start - #138
Merged
Merged
Conversation
The first connection to the MCP host, made before the server listens, is now tried again where the host failed in a way that passes: a 5xx, a 429 or a 408, a request that timed out or a connection that closed, or fetch failing to reach the host at all. Any other 4xx and a protocol error fail at once, since they say the address or the protocol is wrong. The waits are 1, 2, 4, 8, 15, 15 and 15 seconds, eight attempts over a minute of waiting, each attempt ended after ten seconds, so a host that accepts and never answers costs 140 seconds against the 240 Cloud Run's default start-up probe allows. Each failed attempt writes one chat.host warning naming the attempt and the reason, the status alone where the front end answered a page, and when the attempts run out the operator's error and exit 2 are as before. The server still listens only once the host is connected, as bin/http.mjs meant, so the probe cannot pass on a chat with no host. This is what failed the deploy of guestgraph/mcp-guestgraph-io, whose host answered 503 from Firebase Hosting while it restarted beside the chat; the sleep, the warning and the attempt's deadline are injected, so the suite waits on none of them. Verified: npm test (395 pass), npm run typecheck, npm run build:check, the pins.json verify list (terraform init and validate for both deployments, terraform fmt -check), conventions-check and conventions-format pass. Process: Delivery Phase: Implement Track: Code Co-Authored-By: Claude Opus 5.5 (1M context) <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.
The deploy of guestgraph/mcp-guestgraph-io deployed its host and its chat at the same moment; the chat's new revision connected while the host was restarting behind Firebase Hosting, met
503 backend read error, exited 2 at start, and Cloud Run does not start a failed revision again. The first connection to the host is now tried again where the failure passes: a 5xx, a 429 or a 408, a request that timed out or a connection that closed, or fetch failing to reach the host. Any other 4xx and a protocol error fail at once, since they say the address or the protocol is wrong.The waits are 1, 2, 4, 8, 15, 15 and 15 seconds: eight attempts over a minute of waiting, each attempt ended after ten seconds, so a host that accepts and never answers costs 140 seconds against the 240 of Cloud Run's default start-up probe. Each failed attempt writes one
chat.hostwarning naming the attempt and the reason, the status alone where a front end answered with a page; when the attempts run out, the operator's error and exit 2 are as before. The server still listens only once the host is connected, asbin/http.mjsmeant, so the probe cannot pass on a chat with no host. No version moves; the release is its own PR.Verified:
npm test(395 pass, including a host that answers 503 twice, one that answers 404 and one that never answers, and the process waiting out a 503),typecheck,build:check, thepins.jsonverify list,conventions-checkandconventions-formatpass.🤖 Generated with Claude Code