Repository navigation
Conversation
(cherry picked from commit b085aef)
This was referenced Oct 10, 2026
7 of 9 tasks
nwparker
changed the base branch from
nwparker/setup-authority-dispatcher-10-09
to
nwparker/session-backend-module-extraction-10-09
October 10, 2026 01:06
Collaborator
|
Closing as superseded. Session and terminal calls on main now route by the workspace's owner (#27283, #27243, #27279), and session writes are partitioned per host (#27119, #27125). The remaining case (two hosts publishing the same repo and checkout IDs) is refused as ambiguous on main; this 1,500-line draft on an unmerged base is too much risk for that. |
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.
ELI5
A host could return another checkout’s saved terminals when two execution hosts used the same repository and checkout IDs. Session requests now keep the selected host and checkout instance through inventory, hydration and publication.
What Changed
The existing checked selector now supplies the session controller’s owner context. Snapshot reuse, saved-pane merging, retirement proofs, empty results and stream updates require that same current owner. Ambiguous or retired requests refuse before changing session state. Existing snapshots and results gain an optional canonical identity; IDs, persisted keys and stream opcodes stay compatible.
Old renderer frames cannot acquire a recreated checkout’s identity to bypass the removal fence. Saved panes and retirement notices retain the checked owner they already had.
Why
The wrong session came from discarding the resolved host and then reading a shared cache by checkout ID. Carrying that context through the existing controller and cache boundaries repairs the cause without replacing the persistence model or adding another ownership registry.
Linked Issue
Stacked on the runtime module prerequisite #27062, which inherits setup authority #27025. Internal reproducible audit; no new issue. Related issue/PR receipts and the contributor ledger are retained in the review packet. No donor implementation was copied.
Visual Proof
N/A — this change affects host-side session routing and wire content. It has no renderer layout change. Client activation and captured-owner transport are separate follow-ups.
Testing
The final backend composition is 28 paths against prerequisite #27062. It normally inherits the reviewed repository lookup and wire compatibility test corrections from #27025. The prerequisite relocates six methods into existing inventory and terminal provisioning modules; all 35 production method signatures and bodies across those four modules retain the exact accepted backend text. The two mock factories move unchanged from the SQLite fixture into each of its three actual test entrypoints; every other test and fixture statement is unchanged.
On macOS, 204 existing tests pass in 14 suites: 28 registered SQLite ownership cases, 15 SQLite boundary cases, and 161 terminal close, browser, startup, captured readiness and inventory controls. The four moved modules were loaded cold and their served hashes recorded. Node and CLI type checks, regular lint and anti-slop on all 30 affected files, formatting, the suppression ratchet and the 28-file changed-quality gate pass. These controls ran before the subsequent normal merge of the parent’s two compatibility test corrections, which preserves all 30 controlled source files byte-for-byte; the final-parent quality and diff checks also pass. Two additional Node runtime boundary cases pass on the final parent, bringing the current controls to 206 cases in 15 suites.
Earlier broad controls belong to the accepted backend source, before this mechanical follow-on: Node and Bun each passed 33 suites with 1,628 passed cases and one existing Windows-only skip. All three TypeScript checks passed then, including web checking with a private copy of the pinned Shiki package closure and canonical compiler files/options/aliases. The earlier two-file SQLite registration follow-up passed five suites and 45 cases. Those historical results are retained separately from the current controls.
Actual registered RPC controls use SQLite persistence and the real runtime/controller. They cover both catalog orders, A/B/A saved layouts and proofs, held concurrent inventory, retirement during inventory, exact empty results, subscriber isolation, legacy requests, old renderer deletion fences and same-owner saved-pane retention/release. Test providers supply SSH Git listings and PTY inventory; Electron, unused registration imports and external history deletion are isolated. No native PTY was spawned, app was launched, or desktop focus was exercised.
Review
The full production change and corrective boundaries were reviewed. Full and independent reviews accepted the final corrections and current controls. Separate independent reviews found the original backend source and H2 merge clean, passed 13 focused controls, and verified the pure prerequisite’s complete diff, method bodies, imports and test evidence. The final stack preserves the original backend methods, parent corrections and SQLite registration. Historical failing controls, the four reproduced static errors and exact source witnesses are retained. No native end-to-end claim is made.
Agent skill upstream boundary
Notes
The optional identity is additive wire content. Older bare-ID clients retain unique-owner behavior and ambiguous requests refuse. The renderer follow-up validates missing-identity responses from older hosts. No new opcode, capability, ID migration, forced cache replacement or remote-process death assumption is introduced.
Checklist