Skip to content

fix(mcp): recognise the current BTrace client's busy-port error - #18

Merged
jbachorik merged 1 commit into
mainfrom
fix/mcp-busy-port-message
Nov 2, 2026
Merged

jbachorik merged 1 commit into
mainfrom
fix/mcp-busy-port-message

Conversation

@jbachorik

Copy link
Copy Markdown
Contributor

What & why

The BTrace client changed its busy-port error, from Port N unavailable to Port N is in use by another process (often another BTrace agent); choose a free agent port with -p <port>. The MCP server matched only the old wording. As a result:

  • A busy port reached MCP users with advice about the CLI's -p flag, which means nothing over MCP.
  • McpServerE2ETest.aBusyPortIsReportedWithTheArgumentThatAvoidsIt fails against the current BTrace build. It currently fails fix(mcp): never report a probe stopped while it may still run #17's e2e job, and will fail main's next e2e run.

Both wordings now produce the same message, Port N unavailable. Another BTrace agent or process is using it; pass a different 'port' argument.

How verified

Command Result
./gradlew test (mcp) BUILD SUCCESSFUL, 32 tests, 0 failures
./gradlew e2eTest -PbtraceJar=<btrace 3.0.0-SNAPSHOT> BUILD SUCCESSFUL, 13 tests, 0 failures, aBusyPortIsReportedWithTheArgumentThatAvoidsIt included
scripts/validate-marketplace.sh passed

Coverage notes

  • The new BTraceClientTest case throws the current client's wording from the fake client. It checks that the message names the 'port' argument and no longer mentions -p, and it fails without the change.
  • The existing case still covers the old wording.

Not verified / known limitations

None.

Breaking changes / migration

None.

Links

Unblocks the e2e job on #17.

🤖 Generated with Claude Code

The BTrace client now says "Port N is in use by another process ... choose a
free agent port with -p <port>" instead of "Port N unavailable". The MCP server
matched only the old wording, so a busy port reached the user with advice about
a CLI flag that means nothing over MCP, and the e2e test for it failed. Both
wordings now give the same message, naming the 'port' argument.

Verified: the new BTraceClientTest case fails without the change. ./gradlew
test: 32 tests, 0 failed. e2eTest against the current BTrace 3.0.0-SNAPSHOT
jar: 13 tests, 0 failed, aBusyPortIsReportedWithTheArgumentThatAvoidsIt
included. validate-marketplace passed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jbachorik
jbachorik added this pull request to the merge queue Nov 2, 2026
Merged via the queue into main with commit 1430a09 Nov 2, 2026
4 checks passed
jbachorik added a commit that referenced this pull request Nov 2, 2026
…b5-b13

main landed the same busy-port fix (#18) as b88819e, so BTraceClient and
BTraceClientTest take main's version. The fake Client keeps this branch's
laterOutputSent latch, which the detach test needs, plus main's comment.

Verified: ./gradlew clean test e2eTest: 32 unit and 13 e2e tests, 0
failed. validate-repository, validate-evals (15 cases),
check-tool-references and validate-marketplace pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant