Repository navigation
Conversation
A target stopped with SIGSTOP keeps its TCP connection open but stops answering, which is the case only the BTrace v2 heartbeat catches (a closed socket is already covered by McpLostConnectionE2ETest). The test deploys a probe, stops the target, asserts the session ends as a lost connection and not an exit, then resumes the target and asserts the probe is still firing, list_probes lists it as detached and stop_detached_probe stops it. Skipped on Windows. Verified: against a BTrace build with the heartbeat (btraceio/btrace feat/o19-heartbeat) 1/1 passed in 9.6 s; against one without it, fails with "the session did not notice the silent target"; full e2eTest with the heartbeat build: McpServerE2ETest 13/13, McpLostConnectionE2ETest 2/2, McpSilentDropE2ETest 1/1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
13 of 16 tasks
jbachorik
marked this pull request as ready for review
November 4, 2026 18:23
This branch has not been 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.
What & why
A target stopped with SIGSTOP keeps its TCP connection open but stops answering. That is the silent-drop case only the BTrace v2 heartbeat (btraceio/btrace#998) catches; a closed socket is already covered by
McpLostConnectionE2ETest.New
McpSilentDropE2ETest(skipped on Windows): deploy a probe, SIGSTOP the target, assert the MCP session ends as a lost connection, not an exit; SIGCONT, then assert the probe is still firing,list_probeslists it as detached, andstop_detached_probestops it.No production code changes: the MCP server already turns the client's
ExitCommand(-1)into a lost connection; it just never received one for a silent drop.How verified
BTRACE_JAR=<btrace feat/o19 build> ./gradlew e2eTest --tests '*SilentDrop*'BTRACE_JAR=<btrace feat/o19 build> ./gradlew e2eTest./gradlew checkCoverage notes
Covers a peer that is alive but not reading (SIGSTOP). A real network drop is not staged (needs root).
Not verified / known limitations
Draft until btraceio/btrace#998 merges. The PR's
mcp-e2erun builds BTrace's default branch, which has no heartbeat yet, so this test fails there. Aworkflow_dispatchrun withbtrace-ref: feat/o19-heartbeatchecks it against the heartbeat branch.Breaking changes / migration
None.
Links
Depends on btraceio/btrace#998.
🤖 Generated with Claude Code