docs: record the gate timeout measurement and how to take it - #11
Merged
Merged
Conversation
GATE_TIMEOUT_MS stays at 8 s; this records the numbers behind it and the pitfall in taking them. Measured from a real agent in the ChatGPT in-app browser: this gate hands back pending at 9,997 ms, against 1,642 ms for a tool that resolves immediately, so the host costs about two seconds and the ceiling leaves roughly ten to spare. The same arithmetic explains the original failure -- a 25 s gate surfaces at ~27 s, past the ~20 s ceiling. The pitfall: an agent that races 5 s and then 10 s more reports 15.6 s for this same call, because the value surfaces at its next guard boundary rather than when the promise settles. That reads exactly like latency the page is responsible for.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Comments and docs only — no behaviour change,
GATE_TIMEOUT_MSstays at 8 s.Records the numbers that confirm it, taken from a real agent in the ChatGPT in-app browser:
propose_hypotheseshands backpendingat 9,997 ms measured agent-sideread_session_meta, which resolves immediately, returns at 1,642 msSo the host costs about two seconds on top of the gate, and a 10 s round trip leaves roughly ten seconds before the ~20 s ceiling. It also explains the original failure arithmetically: a 25 s gate would have surfaced at ~27 s, well past that ceiling.
Also records a measurement pitfall worth more than the numbers. An agent that guards with
Promise.race([call, 5s])and then10smore reports 15.6 s for the same call — the value surfaces at its next guard boundary rather than when the promise settles. Three separate runs landed on 15.0–15.6 s before a single 30 s guard showed 9,997 ms. That artefact is indistinguishable from page-side latency and argues for shortening a gate that is already fast enough.npx tsc --noEmitclean, 293/293 tests pass.