Skip to content

Rust Port: Open KWT workspaces on the correct tmux server - #199

Merged
wesm merged 7 commits into
mainfrom
kwt-version-bump
Sep 4, 2026
Merged

Rust Port: Open KWT workspaces on the correct tmux server#199
wesm merged 7 commits into
mainfrom
kwt-version-bump

Conversation

@wesm

@wesm wesm commented Aug 27, 2026

Copy link
Copy Markdown
Member

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.

  • Uses KWT's direct or protected attachment mode instead of guessing from the socket name.
  • Opens worktrees and registered directory workspaces on the exact tmux server that KWT reports.
  • Keeps the server and attachment mode through navigation, previews, reconnects, session kills, and worktree removal.
  • Opens generationless worktrees through an identity-checked tmux attachment and lets KWT create or repair stopped directory sessions.
  • Keeps protected pull-request workspaces closed when their generation, session, mode, or socket no longer matches.

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.

@wesm
wesm temporarily deployed to sandbox-image-promotion-status August 27, 2026 08:06 — with GitHub Actions Inactive
@wesm
wesm temporarily deployed to sandbox-image-promotion-status August 27, 2026 08:06 — with GitHub Actions Inactive
@wesm
wesm temporarily deployed to sandbox-image-promotion-status August 27, 2026 08:06 — with GitHub Actions Inactive
@roborev-ci

roborev-ci Bot commented Aug 27, 2026

Copy link
Copy Markdown

roborev: Combined Review (fcf128b)

Verdict: Three medium-severity issues remain in named-socket workspace opening, killing, and protected-worktree removal.

Medium

  • Named directory workspaces cannot be opened correctlyrust/ui/src/lib.rs:7570-7601
    Direct named-directory workspaces are marked openable but provide no WorktreeOpenTarget; clicks use select_session, which only searches default tmux inventory. Sessions on the named KWT socket therefore fail to open. Route these through exact KWT attachment or disable them until supported.

  • Killed custom-socket directory workspaces remain marked liverust/workspace/src/scene.rs:3975-3977
    confirm_session_kill refreshes ordinary tmux inventory but not KWT inventory, leaving killed sessions visible and killable until the periodic refresh. Refresh KWT inventory or immediately invalidate the workspace liveness.

  • Protected worktrees without resolved sockets can fall back to default tmux during removalrust/ui/src/lib.rs:7466-7507
    Such worktrees still receive a Remove Worktree action, passing socket_name: None into removal capture. This may probe or kill a same-named default-server session without verifying the protected endpoint, and may remove the worktree while its protected session remains live. Gate removal on a resolved protected endpoint and propagate/validate attachment mode through removal capture and preflight.


Reviewers: 2 done | Synthesis: codex, 8s | Total: 11m49s

@wesm
wesm temporarily deployed to sandbox-image-promotion-status August 27, 2026 08:52 — with GitHub Actions Inactive
@wesm
wesm temporarily deployed to sandbox-image-promotion-status August 27, 2026 08:52 — with GitHub Actions Inactive
@wesm wesm changed the title Rust Port: Honor kwt attachment modes on exact tmux endpoints Rust Port: Keep KWT workspaces on their exact tmux server Aug 27, 2026
@wesm
wesm temporarily deployed to sandbox-image-promotion-status August 27, 2026 08:52 — with GitHub Actions Inactive
@wesm
wesm temporarily deployed to sandbox-image-promotion-status August 27, 2026 08:52 — with GitHub Actions Inactive
@wesm
wesm temporarily deployed to sandbox-image-promotion-status August 27, 2026 08:52 — with GitHub Actions Inactive
@wesm
wesm temporarily deployed to sandbox-image-promotion-status August 27, 2026 08:53 — with GitHub Actions Inactive
@roborev-ci

roborev-ci Bot commented Aug 27, 2026

Copy link
Copy Markdown

roborev: Combined Review (1eef724)

Verdict: Two medium-severity issues remain; otherwise, no security vulnerabilities were identified.

Medium

  • Generationless KWT worktree attachment failsrust/workspace/src/scene.rs:1195-1202, 7122-7127
    Direct KWT worktrees are always routed through AttachTarget::Worktree, but fresh attachment requires a generation. Generationless worktrees appear attachable yet fail with “generation unavailable.” Route them through identity-checked ordinary tmux attach; reserve KWT open for generation-backed worktrees.

  • Stopped directory workspaces cannot be openedrust/ui/src/lib.rs:7584-7587
    Registered directory workspaces with session_live == false are blocked by the session_available gate, preventing session creation or repair through the new KWT directory-open path. Permit authoritative direct directory workspaces to open when KWT and host actions are available; retain liveness requirements for kill actions.


Reviewers: 2 done | Synthesis: codex, 8s | Total: 20m59s

@wesm wesm changed the title Rust Port: Keep KWT workspaces on their exact tmux server Rust Port: Open KWT workspaces on the correct tmux server Aug 27, 2026
@wesm
wesm deployed to sandbox-image-promotion-status August 27, 2026 19:53 — with GitHub Actions Active
@wesm
wesm deployed to sandbox-image-promotion-status August 27, 2026 19:53 — with GitHub Actions Active
@wesm
wesm deployed to sandbox-image-promotion-status August 27, 2026 19:53 — with GitHub Actions Active
@wesm
wesm deployed to sandbox-image-promotion-status August 28, 2026 14:31 — with GitHub Actions Active
@wesm
wesm deployed to sandbox-image-promotion-status August 28, 2026 14:32 — with GitHub Actions Active
@wesm
wesm deployed to sandbox-image-promotion-status August 28, 2026 14:32 — with GitHub Actions Active
@roborev-ci

roborev-ci Bot commented Aug 28, 2026

Copy link
Copy Markdown

roborev: Combined Review (b267589)

Verdict: One medium-severity issue remains; otherwise, no security regressions were identified.

Medium

  • rust/workspace/src/scene.rs:1168 — Generationless direct worktrees are converted to a generic AttachTarget::Tmux, losing KWT metadata. Their active sidebar ownership and selection state may therefore appear inactive and unowned. Preserve the worktree’s KWT identity in attachment/presentation metadata while attaching via the discovered tmux identity.

Reviewers: 2 done | Synthesis: codex, 6s | Total: 20m59s

@wesm
wesm deployed to sandbox-image-promotion-status September 1, 2026 15:50 — with GitHub Actions Active
@wesm
wesm deployed to sandbox-image-promotion-status September 1, 2026 15:50 — with GitHub Actions Active
@wesm
wesm deployed to sandbox-image-promotion-status September 1, 2026 15:50 — with GitHub Actions Active
@roborev-ci

roborev-ci Bot commented Sep 1, 2026

Copy link
Copy Markdown

roborev: Combined Review (ade502e)

Verdict: High-severity concern remains regarding protected worktree removal.

  • HighSources/App/WorkspaceSceneModel.swift:2717-2733
    An unresolved protected worktree (.protected with no socket) may fall into generic identity review and probe the default tmux server. A same-named default session could then be incorrectly confirmed and killed during worktree removal. Reject unresolved protected removals before identity review and require refreshed KWT inventory.

Reviewers: 2 done | Synthesis: codex, 7s | Total: 27m9s

@wesm
wesm deployed to sandbox-image-promotion-status September 1, 2026 17:13 — with GitHub Actions Active
@wesm
wesm deployed to sandbox-image-promotion-status September 1, 2026 17:13 — with GitHub Actions Active
@wesm
wesm deployed to sandbox-image-promotion-status September 1, 2026 17:13 — with GitHub Actions Active
@roborev-ci

roborev-ci Bot commented Sep 1, 2026

Copy link
Copy Markdown

roborev: Combined Review (5021a07)

Verdict: One medium-severity workspace identity/deduplication issue was reported; another reviewer found no issues.

Medium

  • rust/workspace/src/scene.rs:1269-1291; rust/workspace/src/lib.rs:2683-2707 — Direct default-socket directory workspaces use a distinct presentation instead of the ordinary tmux identity. Existing tmux clients may not be reused, and duplicate directory/tmux rows may appear after KWT inventory changes. Canonicalize these workspaces to their discovered tmux identity or include them in presentation lookup and deduplication.

Reviewers: 2 done | Synthesis: codex, 6s | Total: 33m38s

@roborev-ci

roborev-ci Bot commented Sep 2, 2026

Copy link
Copy Markdown

roborev: Combined Review (258783c)

Verdict: One medium-severity session-validation issue was identified; another reviewer found no additional issues.

Medium

  • Sources/Tmux/TmuxAttachmentInfo.swift:632-643 and :600-601 — Direct KWT directory workspaces lack kwtWorktreeIdentity, so kwt open omits --expected-session. The Windows default-socket path also skips endpoint validation. If the registered session changes between inventory and launch, Ghosthub may attach to the wrong session; confirmation only checks for a same-named session.
    • Suggested fix: Pass the directory’s expected session name to KWT, validate the returned Windows endpoint before publishing the attachment, and add coverage for directory registration/session drift.

Reviewers: 2 done | Synthesis: codex, 7s | Total: 33m21s

@wesm
wesm deployed to sandbox-image-promotion-status September 2, 2026 22:31 — with GitHub Actions Active
@wesm
wesm deployed to sandbox-image-promotion-status September 2, 2026 22:31 — with GitHub Actions Active
@wesm
wesm deployed to sandbox-image-promotion-status September 2, 2026 22:32 — with GitHub Actions Active
@roborev-ci

roborev-ci Bot commented Sep 2, 2026

Copy link
Copy Markdown

roborev: Combined Review (7b08f1e)

Verdict: Two medium-severity issues remain; otherwise, no additional findings were reported.

Medium

  • Sources/App/WorkspaceSceneModel.swift:2401-2404
    Exact tmux restoration probes session identity but discards it, then restores by name. If the session is replaced between probing and attaching, Ghosthub may attach to the replacement. Preserve the probed identity and perform an identity-checked attach.

  • Sources/App/WorkspaceSceneModel.swift:10744-10752, Sources/UI/WorkspaceSidebarModel.swift:459-467
    Named direct directory-session kill validation does not verify workspace.path == selection.workspacePath. A stale selection could authorize killing a live endpoint belonging to another directory. Require the directory path to match in both validation paths.


Reviewers: 2 done | Synthesis: codex, 6s | Total: 26m47s

@wesm
wesm deployed to sandbox-image-promotion-status September 2, 2026 23:13 — with GitHub Actions Active
@wesm
wesm deployed to sandbox-image-promotion-status September 2, 2026 23:13 — with GitHub Actions Active
@wesm
wesm deployed to sandbox-image-promotion-status September 2, 2026 23:14 — with GitHub Actions Active
@roborev-ci

roborev-ci Bot commented Sep 3, 2026

Copy link
Copy Markdown

roborev: Combined Review (ff40f56)

Verdict: One medium-severity issue was identified; no critical or high-severity findings.

Medium

  • rust/workspace/src/scene.rs:7307-7327, 7446-7462 — Retained retries for direct custom-socket KWT worktrees/directories always rerun KWT. If KWT becomes unavailable after initial launch, existing sessions cannot be reopened through their known socket and the retained presentation is dropped. Preserve exact endpoint authority and fall back to attach-only when KWT is unavailable.

Reviewers: 2 done | Synthesis: codex, 22s | Total: 1h25m15s

@wesm
wesm deployed to sandbox-image-promotion-status September 3, 2026 01:25 — with GitHub Actions Active
@roborev-ci

roborev-ci Bot commented Sep 3, 2026

Copy link
Copy Markdown

roborev: Combined Review (00bf6b7)

Verdict: One medium-severity issue remains; otherwise, no issues were found.

Medium

  • Sources/App/WorkspaceSceneModel.swift:12563-12576relaunchTmuxSession passes reconnectExpectedIdentity only as sessionIdentity, omitting expectedAttachIdentity. During remote exact-session restoration, reconnect may attach to a replacement session with the same name/socket but a different identity. Preserve and pass the expected attach identity, or re-probe and compare the full identity immediately before attaching.

Reviewers: 2 done | Synthesis: codex, 6s | Total: 34m42s

@roborev-ci

roborev-ci Bot commented Sep 3, 2026

Copy link
Copy Markdown

roborev: Combined Review (e4f220c)

Verdict: Two medium-severity attachment identity risks remain in KWT fallback and restoration paths.

Medium

  • KWT-unavailable custom-socket fallback may attach the wrong session
    Location: Sources/App/WorkspaceSceneModel.swift:9605-9653; Sources/Tmux/TmuxAttachmentInfo.swift:362-375
    When KWT is unavailable, custom-socket rows fall back to ordinary attach-session, while identity discovery returns nil for named sockets. A same-name replacement session may be attached instead of the selected worktree. Capture the socket’s session identity and pass it as expectedAttachIdentity; fail closed if unavailable.

  • Protected KWT restoration ignores the captured expected identity
    Location: Sources/App/WorkspaceSceneModel.swift:2400-2449,12563-12577; Sources/Tmux/TmuxAttachmentInfo.swift:223-249
    Exact restoration and reconnect capture an expected tmux identity, but the protected KWT path runs kwt pr attach <path> without the captured identity or endpoint authority. A probe/attach race could attach a replacement or different endpoint while restoration is accepted. Pass the expected repository, registration, generation, session, and socket fields into pr attach, or validate the resulting attachment before publishing it.


Reviewers: 2 done | Synthesis: codex, 8s | Total: 49m2s

@roborev-ci

roborev-ci Bot commented Sep 3, 2026

Copy link
Copy Markdown

roborev: Combined Review (0e89aa8)

Verdict: One medium-severity lifecycle issue remains; no critical or high-severity findings were reported.

Medium

  • rust/ui/src/lib.rs:8567 — Fallback rows for active or retained custom-socket KWT sessions are marked discovered == false, hiding the Kill Session action when KWT ownership disappears or becomes unavailable. Derive killability independently from default-server discovery and support exact-socket killing with a fresh identity check.

Reviewers: 2 done | Synthesis: codex, 5s | Total: 58m41s

@roborev-ci

roborev-ci Bot commented Sep 3, 2026

Copy link
Copy Markdown

roborev: Combined Review (c0f9116)

Verdict: One medium-severity issue requires attention.

Medium

  • rust/workspace/src/scene.rs:7665-7673 — The KWT-authorized RepairOrOpen path can route direct worktrees through direct_worktree_attach_target, adopting a same-named default-server session as DiscoveredWorktree. attach_fresh then performs ordinary tmux attach without running kwt open, bypassing worktree validation and repair. Ensure explicit KWT worktree requests always produce AttachTarget::Worktree; reserve discovered-session adoption for KWT-unavailable attach-only fallback paths.

Reviewers: 2 done | Synthesis: codex, 5s | Total: 30m55s

@roborev-ci

roborev-ci Bot commented Sep 3, 2026

Copy link
Copy Markdown

roborev: Combined Review (f95bdc1)

Verdict: One medium-severity presentation-reuse issue identified; no security issues found.

  • MediumSources/App/WorkspaceSceneModel.swift:492, 9652–9653: Direct default KWT worktrees and equivalent unbound tmux sessions produce different presentation keys. If the tmux session was opened before KWT inventory association, selecting the worktree creates a second native client instead of reusing the retained one. Alias equivalent endpoints and use endpoint equivalence for active-row matching.

Reviewers: 2 done | Synthesis: codex, 6s | Total: 28m55s

@roborev-ci

roborev-ci Bot commented Sep 3, 2026

Copy link
Copy Markdown

roborev: Combined Review (9fba4ac)

Verdict: One medium-severity functional regression was identified.

Medium

  • rust/workspace/src/scene.rs:1396-1402, rust/workspace/src/scene.rs:7518-7524 — Direct worktrees targeting named tmux sockets always use exact raw attachment, even when KWT is available. This bypasses KWT’s repair/open path, causing stopped or absent sessions to fail instead of being recreated. Restrict exact raw attachment to the KWT-unavailable fallback and retain the guarded kwt open path for KWT-ready worktrees.

Reviewers: 2 done | Synthesis: codex, 7s | Total: 22m15s

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-ci

roborev-ci Bot commented Sep 3, 2026

Copy link
Copy Markdown

roborev: Combined Review (37313d5)

Verdict: One medium-severity KWT fallback issue remains.

Medium

  • rust/workspace/src/scene.rs:7694 — Direct KWT worktree requests with a custom socket always set exact_worktree_attach to false. If KWT becomes unavailable after capture but before launch, the exact-socket fallback is skipped and kwt open fails even when the named endpoint is still live. Enable exact attachment for direct worktrees with custom sockets, excluding protected targets.

Reviewers: 2 done | Synthesis: codex, 6s | Total: 18m42s

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-ci

roborev-ci Bot commented Sep 3, 2026

Copy link
Copy Markdown

roborev: Combined Review (f9af848)

Verdict: One medium-severity issue requires attention.

Medium

  • Sources/App/WorkspaceSceneModel.swift:9552-9564 — Direct KWT identity validation does not verify the selected path, session name, socket, attach mode, or require a non-optional canonical generation match. A stale selection could use outdated endpoint metadata during kwt open, potentially attaching or configuring the wrong tmux server.
    • Fix: Require exact equality for all endpoint and mode fields, including a non-optional canonical generation match, before constructing the expected KWT identity.

Reviewers: 2 done | Synthesis: codex, 6s | Total: 18m49s

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-ci

roborev-ci Bot commented Sep 3, 2026

Copy link
Copy Markdown

roborev: Combined Review (1b1ad2a)

Verdict: One medium-severity resource-leak bug was identified; no exploitable security issues were found.

Medium

  • Sources/App/WorkspaceSceneModel.swift:531-532, cleanup at :11165-11169 — Direct KWT selections are canonicalized to the unbound presentation key, but NativeTmuxSessionCoordinator indexes handles by a mode-sensitive key. Closing a direct worktree that reused an unbound presentation can fail to detach the underlying handle, leaving stale resources and potentially causing duplicate attachments on reopen. Canonicalize direct mode in the coordinator key or detach using the retained handle’s actual key/identity, and add a close-and-reopen regression test.

Reviewers: 2 done | Synthesis: codex, 6s | Total: 47m25s

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-ci

roborev-ci Bot commented Sep 3, 2026

Copy link
Copy Markdown

roborev: Combined Review (2254e55)

Verdict: One medium-severity UI capability mismatch remains; otherwise, no trust-boundary issues were found.

Medium

  • rust/ui/src/lib.rs:1409-1412, 7622 — Directory workspaces may enable Open/Kill actions for unresolved protected endpoints, although attachment and kill operations reject those selections without a socket. Derive directory capabilities from the same mode and endpoint-resolution checks used by request capture; require Direct for Open and a resolved socket for protected Kill actions.

Reviewers: 2 done | Synthesis: codex, 6s | Total: 1h2m26s

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-ci

roborev-ci Bot commented Sep 3, 2026

Copy link
Copy Markdown

roborev: Combined Review (a0e7f4c)

Verdict: One medium-severity identity mismatch remains; no critical or high-severity issues were reported.

Medium

  • Presentation and sidebar selection IDs use inconsistent canonicalization for direct tmux attachments without a socket, causing default direct worktree sessions to fail matching retained presentations and breaking preview eligibility and connected-session status updates.
    Locations: Sources/App/WorkspaceSceneModel.swift:527-549, Sources/UI/WorkspaceSidebarModel.swift:220-226
    Suggested fix: Use a shared canonical endpoint-ID function and normalize direct/default selections consistently.

Reviewers: 2 done | Synthesis: codex, 7s | Total: 31m5s

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-ci

roborev-ci Bot commented Sep 4, 2026

Copy link
Copy Markdown

roborev: Combined Review (f0fd945)

Verdict: Medium-severity identity-safety gaps remain in direct worktree reconnect and attach paths.

Medium

  • Sources/App/WorkspaceSceneModel.swift:13323-13369 (reconnect at :13092): After confirming the KWT endpoint, the verified tmux identity is discarded. Later reconnects may use an unfenced attach-session -t =sessionName, allowing attachment to a same-name replacement or unrelated session. Persist the identity in presentation.reconnectExpectedIdentity and enforce it on reconnect.

  • Sources/App/WorkspaceSceneModel.swift:9798-9822: If KWT is unavailable and no current default-socket session is discovered, direct worktree actions still perform an unguarded name-based attach. Require a current discovered identity or reject the action.

  • Sources/App/WorkspaceSceneModel.swift:9805-9822: Direct worktree records without a generation can bypass identity checks via bare kwt open <path> or an unguarded name attach. Reject generationless opens unless a live, identity-verified default session exists, and require KwtWorktreeOpenIdentity for KWT-based opens.


Reviewers: 2 done | Synthesis: codex, 7s | Total: 35m15s

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-ci

roborev-ci Bot commented Sep 4, 2026

Copy link
Copy Markdown

roborev: Combined Review (fbd7450)

Verdict: One medium-severity issue remains in direct tmux attachment fallback.

Medium

  • Sources/App/WorkspaceSceneModel.swift:9833-9881 — When KWT is unavailable and the default tmux socket is used, the code may attach to an unfenced sessionName even without a discovered matching session. A stale or unrelated same-named session could be attached. Require an exact discovered endpoint identity or fail closed.

Reviewers: 2 done | Synthesis: codex, 5s | Total: 24m27s

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