Repository navigation
fix(session): make session-tree launches, warnings, and child releases truthful - #1256
Open
debugmcpdev wants to merge 1 commit into
Open
debugmcpdev wants to merge 1 commit into
debugmcpdev wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
…s truthful Closes #1150, #1221, and #1252. - Surface pausedChild (with location, context, and StopSnapshot) and a truthful message on start_debugging and restart_debugging when an adopted child pauses during the launch hold, saving a wait_for_stop turn. - Track treeVerifiedBreakpointIds and childDebuggingOptedOut on the shared Run record, and propagate child releases up ancestor lineages. - Confirm fallback child releases across ChildConnections and DapProxyWorker before counting childrenReleased or claiming undebugged execution. - Keep outer lexical Block scopes listed after Local out of primary JavaScript local merges under Vite/Vitest.
debugmcpdev
force-pushed
the
fix/session-tree-truth-and-turns
branch
from
November 24, 2026 07:59
2f5bdfd to
55f51ad
Compare
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.
Summary
Makes multi-process session-tree launches, warnings, child-release reporting, and Vite/Vitest frame locals truthful while cutting multi-process launch-to-breakpoint inspection from 5 turns down to 3 turns.
Closes #1150
Closes #1221
Closes #1252
Related self-hosted RCA follow-ups filed during this work: #1253, #1254.
Changes
1. Subprocess Turn Reduction & Launch-Hold Truthfulness (
#1150item 1)src/session/launch/launch-readiness.ts):waitForLaunchHoldnow observesonSubtreeChangeand settles with a 50 ms sibling-adoption grace window as soon as a child session pauses or errors during the hold (while ignoring ended helper children perselectSettledInTreerule 4), rather than always burning the full 2,000 ms root hold.pausedChild(src/session/launch/debug-launcher.ts,src/server/handlers/shared.ts,src/server/handlers/debuggee-tools.ts): When the launched root is stillrunningand a descendant is genuinely inSessionState.PAUSED,start_debugging/restart_debuggingsurfaces top-levelpausedChild(sessionId,name,state: 'paused',reason,location,context,note,snapshot) and a truthful message (ErrorMessages.launchRunningWithPausedChild) instead of falsely claiming"has not reached N breakpoint(s) yet".data.pausedChildomitssnapshotto avoid payload duplication. Children inERRORreceiveErrorMessages.launchRunningWithErroredChildand never populatepausedChild.2. Tree-Wide Breakpoint Bind Tracking (
#1150items 2 & 3)Run.treeVerifiedBreakpointIds(src/session/run-facts.ts,src/session/breakpoints/hit-verification.ts,src/session/breakpoints/breakpoint-controller.ts,src/session/breakpoints/launch-warnings.ts): Records every logical breakpoint ID verified on the root or any adopted descendant during the run."could not bind at launch"warnings when a child-only file breakpoint binds on an adopted child during the launch hold (#1150item 3), and marks unhit breakpoints that bound on a short-lived childverified: truein the root's end summary even after the child exits (#1150item 2).3. Explicit Child-Debugging Opt-Out Qualification (
#1150item 4)detectChildDebuggingOptOut(src/session/launch/proxy-launcher.ts): Detects explicit Python (subProcess: false,subProcessConfig: false) and JavaScript (autoAttachChildProcesses: false) opt-outs and qualifies both unbound-at-launch warnings and zero-hit run-to-completion summaries so agents are never misled that child processes ran past breakpoints when child debugging was disabled.4. Confirmed Child Release Outcomes & Ancestor Propagation (
#1150item 5 Ӆ)ChildConnections.releaseWithConfirmation(src/proxy/child-connections.ts,src/proxy/dap-proxy-worker.ts): Tracks in-flight child releases (inFlightReleases) and per-target outcomes (confirmed|unconfirmed|closed) across bothreject-request(debugpy) andthrowaway-attach(js-debug).src/session/session-manager-core.ts,src/session/execution/tree-settle.ts,src/session/execution/execution-controller.ts): Propagates confirmed and unconfirmed releases up the full ancestor chain (recordChildReleaseOnLineage) so grandchild releases under the session cap surface on the root'schildrenReleasedand note (#1150item 5). Launch andwait_for_stopawaitsettleInFlightChildReleases(bounded to 1,500 ms) and explicitly disclose any failed/timed-out release instead of claiming a stuck child"ran on undebugged"(#1221).5. Vite SSR / Vitest Outer
BlockScope Filtering (#1252)JsDebugAdapterPolicy.extractLocalVariables(packages/shared/src/interfaces/adapter-policy-js.ts): V8 lists inner lexicalBlockscopes ahead ofLocaland enclosing outer lexicalBlockscopes (such as Vite SSR's module wrapper) afterLocal. Primary local collection now merges onlyBlockscopes listed ahead of the firstLocalscope whenLocalis present, keeping outerBlockscopes in the empty-Localfallback alongsideClosure.Verification
pnpm run lint— 0 errorspnpm run typecheck:all— 0 source errors, 0 test errors (baseline 0 across 0)pnpm run check:all-personal-paths— 1,598 files checked, 0 findingspnpm run check:docs— 199 markdown files checked, 0 inconsistenciespnpm run changelog:check— valid fragments (1150,1221,1252)npm run clean && npm run build— clean build succeedednpm run test:unit— 440/440 files passed (9,709 tests)npm run test:integration— 47/48 files passed (250 tests, 1 skipped), including new regression cases inpython-subprocess-tree.test.tsandjavascript-subprocess-tree.test.tsmcp-debuggerverification:create_debug_session->set_breakpointonchild.py:12->start_debuggingonparent.py):start_debuggingreturnedpausedChildwithsessionId,location,context, andsnapshot.locals({ i: "0", total: "0" }) directly on the launch response.vitest --pool=forksdebugging ofsrc/session/launch/debug-launcher.ts: stop snapshot inside the forked Vitest worker returnedDebugLauncher.launch's actual parameters and locals (sessionId,session,launchGate,scriptPath) with zero Vite outerBlockmodule-level noise.