Skip to content

Rust Port: Follow kwt's dedicated tmux endpoints - #202

Closed
wesm wants to merge 1 commit into
mainfrom
rust-port-kwt-endpoints
Closed

Rust Port: Follow kwt's dedicated tmux endpoints#202
wesm wants to merge 1 commit into
mainfrom
rust-port-kwt-endpoints

Conversation

@wesm

@wesm wesm commented Aug 27, 2026

Copy link
Copy Markdown
Member

The Rust application now follows KWT's explicit attachment mode and tmux socket instead of treating every named socket as a protected pull-request workspace. This keeps ordinary managed workspaces on KWT's dedicated server without weakening the separate protected-workspace boundary.

  • Open direct named worktrees and registered directory workspaces through KWT, then verify the exact client and session identity on the reported socket.
  • Retain the mode and socket through selection, reconnect, restoration, kill confirmation, and worktree removal.
  • Keep protected pull-request endpoints fail-closed when their mode, generation, session, or socket changes.
  • Keep same-named sessions on the default, dedicated, and protected tmux servers as distinct presentations.

Useful manual QA is to open a normal KWT worktree, a registered directory workspace, and a protected pull-request import on one WSL host, then navigate away and reconnect to each presentation.

The Rust application must treat a tmux socket and its attachment policy as separate authority. Kwt now puts ordinary managed workspaces on a named server, so a named socket no longer means that a workspace is protected.

Keep the exact mode and socket through inventory, selection, attachment, reconnect, kill, and removal. Open direct worktrees and directory workspaces through kwt. Keep protected endpoints fail-closed. This prevents same-named sessions on default, dedicated, and protected servers from aliasing each other.

Generated with OpenAI Codex
Co-authored-by: OpenAI Codex <noreply@openai.com>
@wesm
wesm deployed to sandbox-image-promotion-status August 27, 2026 12:20 — with GitHub Actions Active
@wesm
wesm deployed to sandbox-image-promotion-status August 27, 2026 12:20 — with GitHub Actions Active
@wesm
wesm deployed to sandbox-image-promotion-status August 27, 2026 12:20 — with GitHub Actions Active
@roborev-ci

roborev-ci Bot commented Aug 27, 2026

Copy link
Copy Markdown

roborev: Combined Review (bf6db6b)

Verdict: Medium-severity issues remain in worktree selection, ownership, UI availability, and live-test socket handling.

Medium

  • rust/ui/src/lib.rs:1793 — Generationless KWT worktrees are indistinguishable from directory workspaces because both have worktree_generation() == None. Selecting one routes to open_kwt_directory_workspace, which rejects the valid worktree. Distinguish directory selections structurally.

  • rust/workspace/src/lib.rs:1061kwt_owns_worktree_presentation ignores directory_workspaces, so active or retained directory presentations may be treated as generic tmux sessions and appear twice. Include directory workspaces in the ownership check.

  • rust/ui/src/lib.rs:7589 — Directory workspaces require session_available() to open, preventing the new kwt open path from creating or repairing missing sessions. Allow opening authoritative, ready KWT directory rows regardless of session liveness; retain the liveness requirement for killing.

  • rust/host/tests/kwt_wsl_live.rs:286 — The live test opens worktrees through a dedicated socket but performs readiness, session capture, liveness checks, and cleanup against the default tmux server. Thread the worktree socket through all these operations.


Reviewers: 2 done | Synthesis: codex, 8s | Total: 10m4s

@wesm

wesm commented Aug 27, 2026

Copy link
Copy Markdown
Member Author

Closing in favor of #199. It covers the same KWT attachment change in both Swift and Rust and includes the later fixes for generationless worktrees, stopped directory sessions, presentation ownership, and protected worktree removal. Please continue review on #199.

@wesm wesm closed this Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant