fix(measure): report why a server died instead of waiting out the timeout - #130
Merged
Conversation
…eout Pointing the harness at a command that fails to start gave you a silent 60-second wait and then "timed out" — for what was `sh: blockrun-mcp: command not found` in the first 200ms. Since we advertise this for measuring OTHER people's servers, where a mistyped command is the common case, that is the difference between a tool someone uses twice and one they use once. stderr is now piped rather than ignored (tail only, so a chatty server is not buffered whole) and a child that exits before the handshake completes rejects immediately with its exit code and its own error text. Failure went from 60s and a wrong reason to 0.25s and the right one. The timeout is also raised 60s -> 120s and now says what to do about it: a cold `npx` install of a package this size genuinely exceeds a minute, which is how the bad message got found. Found while verifying the published 0.45.1 end-to-end. Worth recording that `npx -y @blockrun/mcp@<v>` run from inside this repo resolves to the local checkout and fails that way — measure published packages from a neutral directory. From one, 0.45.1 measures 12,900, matching the card. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WUL3ExR4Nz7uebxKaKwjDi
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.
Found while verifying the published 0.45.1 end-to-end.
The bug
Pointing
scripts/measure-tool-schema.mjsat a command that fails to start gave you a silent 60-second wait and thentimed out— for what wassh: blockrun-mcp: command not foundin the first 200ms.We advertise this script for measuring other people's servers, where a mistyped command or a package that 404s is the common case. A tool whose most likely failure takes a minute and then blames the wrong thing is one people try once.
The fix
npxinstall of a package this size genuinely exceeds a minute, which is how the bad message got found in the first place.Failure goes from 60s and a wrong reason to 0.25s and the right one:
Also worth recording
npx -y @blockrun/mcp@<version>run from inside this repo resolves to the local checkout and dies with exit 127. Measure published packages from a neutral directory. Done that way, 0.45.1 measures 12,900 — matching the card exactly.Verification
sync-brand-numbers --checkclean; happy path unchanged at 12,900.No version bump:
scripts/is not in the npm tarball, so this changes nothing for installed users and does not need a release.🤖 Generated with Claude Code
https://claude.ai/code/session_01WUL3ExR4Nz7uebxKaKwjDi