Rust Port: Open KWT workspaces on the correct tmux server - #199
Conversation
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
b267589 to
ade502e
Compare
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
roborev: Combined Review (
|
Managed workspaces must open on KWT's recorded tmux endpoint without treating every named endpoint as protected. Carry the direct or protected mode through inventory, navigation, restoration, reconnect, presentation ownership, and exact-session actions. Unresolved protected endpoints remain pending instead of falling back to the default tmux server. Generationless direct worktrees attach only through their discovered tmux identity while remaining owned by their KWT project row. - Reject unresolved protected worktree removal - Reuse default-socket directory workspace clients - Keep live adopted directory workspaces openable - Require KWT for named directory workspace opens - Align removal tests with protected endpoint guard - Fix KWT attachment reconciliation - Validate KWT workspace endpoint before presentation - Persist tmux attachment mode for restoration - Keep KWT attachment identity authoritative - Preserve stale directory workspace ownership - Keep direct KWT attachments on their captured route - Keep tmux 3.2 attachment identity available - Confirm Windows KWT endpoints without client identity - Reopen named KWT sessions without the helper - Keep KWT opens tied to selected worktrees - Keep directory opens on the selected KWT session - Guard restored tmux sessions by identity - Keep retained KWT retries on captured endpoints - Keep restored tmux reconnects identity-fenced - Fence KWT attachment identity - Keep fallback KWT sessions killable - Keep explicit KWT opens on the KWT path - Align rebased tmux lifecycle tests with KWT identity - Reuse direct KWT presentations by endpoint - Keep KWT repair for ready named worktrees - Restore WSL test platform guards after the rebase Generated with Codex Co-authored-by: OpenAI Codex <noreply@openai.com>
roborev: Combined Review (
|
Direct named worktrees need an attach-only path if KWT becomes unavailable between selection and launch. Keep that authority only for captured direct custom sockets. KWT-ready and protected paths keep their existing behavior. The hosted suite also exposed a scheduler race in the Herdr broker test. Wait for both consumers to register before discovery completes, so the test checks coalescing instead of Task.yield timing. Generated with Codex Co-authored-by: OpenAI Codex <noreply@openai.com>
roborev: Combined Review (
|
A direct worktree selection can outlive an inventory change and retain an old path or tmux endpoint. A missing current generation also passed validation. Require the current worktree to match the captured endpoint and canonical generation before KWT opens it. This prevents a stale row from opening or configuring a different workspace. Generated with Codex Co-authored-by: OpenAI Codex <noreply@openai.com>
roborev: Combined Review (
|
A direct worktree can reuse a default-server presentation that the coordinator created without an attachment mode. Closing through the rebound worktree selection then used a different key and left the original terminal surface alive. Detach the exact retained handle so cleanup uses the coordinator's original key and cannot remove a replacement handle. Reopening now starts only after the prior surface is gone. Generated with Codex Co-authored-by: OpenAI Codex <noreply@openai.com>
roborev: Combined Review (
|
Protected directory workspaces could advertise Open and Kill actions while their tmux endpoint was unresolved. The request layer rejected both actions, so the sidebar offered controls that could not succeed. Expose Open only for direct directory workspaces. Expose protected Kill only when KWT supplied the socket required for exact endpoint validation. Generated with Codex Co-authored-by: OpenAI Codex <noreply@openai.com>
roborev: Combined Review (
|
Direct worktrees can reuse an unbound default-server presentation. Their sidebar selection used a different identifier, so preview eligibility and connected-session status did not follow the retained client. Publish both identities through one endpoint rule. Direct attachments share the unbound endpoint identity, while protected attachments remain distinct. Generated with Codex Co-authored-by: OpenAI Codex <noreply@openai.com>
roborev: Combined Review (
|
A worktree or directory row that attaches by name accepts any same-name tmux session. Two direct paths still did that after the KWT endpoint work: a generationless worktree opening on the default server, and a reconnect after kwt's endpoint check had already verified which session the client joined. Both now pass the known session identity into the attach command, so a replacement session with the same name is rejected instead of shown. Restoring a presentation after a failed worktree removal also stopped working in scenes whose snapshot was stale. The mutation event's reconciled endpoint is authoritative for every scene, but the newer stale-selection guard compared it against the scene's own outdated worktree record and skipped the open. The scene now adopts the reconciled endpoint into its snapshot before restoring, so both contracts hold. Several existing tests hand-built worktree selections against fixtures whose worktree carried no tmux session name. The stale-selection guard rejects that mismatch, which is correct for production because kwt always reports a session name. Those tests now set the name they select. Generated with Claude Code (claude-fable-5-1) Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
roborev: Combined Review (
|
KWT now puts normal managed workspaces on a named tmux server. Ghosthub used to treat every named server as protected, so a normal workspace could fail to open or attach to a same-named session on the default server.
For manual QA, open a normal KWT worktree, a registered directory workspace, and a protected pull-request workspace on the same host. Navigate away and reconnect to each one, then confirm that Ghosthub never opens a same-named session from another tmux server.