fix(notebook): preserve control RPC capability across ACP cleanup - #614
Merged
Conversation
Codex ReviewVerdict: mergeable No actionable findings. Summary: No concrete merge-blocking defects found in the pull request changes. Branch and title prechecks are valid. |
This was referenced Aug 2, 2026
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.
Problem
ACP session cleanup revoked every session-bound Notebook RPC capability, including the private control-plane capability captured by a persistent REPL. The live REPL then reused a stale token, so later
host.mcp()calls failed locally withInvalid notebook RPC token.before reaching the connector.Proposed change
connection.release()during Notebook teardown.host.mcp()succeeds before and after ACP cleanup.Scope and non-goals
This changes only the internal capability lifecycle. It does not change the data model, data relationships, UI behavior, token injection protocol, or add retry/token-refresh machinery.
Acceptance criteria and validation
All commands ran after the final material edit:
RUN_KERNEL=1 npm test -- src/main/notebook/local-rpc-server.test.ts src/main/notebook/host-mcp.integration.test.ts-> 43/43 passed.npm run typecheck:node-> passed.npm run typecheck-> passed.npm run lint-> 0 errors, 19 baseline warnings.npm test-> 9,754 passed, 184 skipped.Independent review found no actionable issues. Low residual risk: Notebook teardown revocation is covered compositionally across runtime, registry, and RPC-server suites rather than by one end-to-end shutdown test wired to a real local RPC server.
Review focus
Please verify that ACP cleanup still revokes Agent-facing capabilities and routing metadata while control-plane capability ownership remains exclusively with the Notebook session lifecycle.