You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#254 (fixed by #290) session-qualified the engine-side window-id seam: PsmuxMultiplexer.new_window and list_window_ids now emit session:@N. The TUI-side surfaces were deliberately excluded from that diff (per the issue's implementation notes) and still hand around bare @N ids on psmux. Both #290 review passes independently confirmed the remaining surfaces, so this files the promised follow-up audit.
Affected surfaces
new_parked_window (inherited from the base backend) still returns a bare #{window_id}. Consumers replay it as a -t target: set_window_option(win_id, PROJECT_OPTION, ...) and window selection in tui/launch.py, plus attach targeting in the TUI app.
list_windows field rows: window_id columns stay bare, and prune_ctl_windows passes those ids straight to kill_window — a destructive verb, against the shared cross-project ctl session.
select_ctl_window_id / ctl window selection takes bare @N values from callers.
psmux runs one server per session; a bare -t @N routes by the caller's $TMUX, else the most-recent-session fallback. The TUI process frequently runs outside any psmux pane (user launches from a plain shell), so its bare-id verbs land on whatever server the fallback picks. The #254 forensics also showed warm-recycled panes carrying stale env, making the fallback nondeterministic across sessions — in a controlled two-session test a bare kill-window -t '@2' issued in session A killed session B's @2 with rc 0. The prune path uses exactly this verb shape.
Notes for the fix
Mirror the fix(adapters): session-qualify psmux window ids #290 approach: qualify at the psmux backend's minting/listing seams, not per caller. new_parked_window should return the same session:@N form as new_window; list_windows should qualify window_id fields identically.
Symmetry hazards to watch: current_window_id() comparisons in the ctl-candidate scan (win_id == current) must compare like with like, and any caller that composes mux.target(CTL_SESSION, window) from an already-qualified id would double-qualify.
The session:@N target grammar is already verified on stock psmux 3.3.7 for kill-window, send-keys, pipe-pane, list-panes, and capture-pane (see fix(adapters): session-qualify psmux window ids #290's verification notes); only the TUI-side consumers and their id round-trips need auditing here.
Summary
#254 (fixed by #290) session-qualified the engine-side window-id seam:
PsmuxMultiplexer.new_windowandlist_window_idsnow emitsession:@N. The TUI-side surfaces were deliberately excluded from that diff (per the issue's implementation notes) and still hand around bare@Nids on psmux. Both #290 review passes independently confirmed the remaining surfaces, so this files the promised follow-up audit.Affected surfaces
new_parked_window(inherited from the base backend) still returns a bare#{window_id}. Consumers replay it as a-ttarget:set_window_option(win_id, PROJECT_OPTION, ...)and window selection intui/launch.py, plus attach targeting in the TUI app.list_windowsfield rows:window_idcolumns stay bare, andprune_ctl_windowspasses those ids straight tokill_window— a destructive verb, against the shared cross-project ctl session.select_ctl_window_id/ ctl window selection takes bare@Nvalues from callers.Why this is the same bug class as #254
psmux runs one server per session; a bare
-t @Nroutes by the caller's$TMUX, else the most-recent-session fallback. The TUI process frequently runs outside any psmux pane (user launches from a plain shell), so its bare-id verbs land on whatever server the fallback picks. The #254 forensics also showed warm-recycled panes carrying stale env, making the fallback nondeterministic across sessions — in a controlled two-session test a barekill-window -t '@2'issued in session A killed session B's@2with rc 0. The prune path uses exactly this verb shape.Notes for the fix
new_parked_windowshould return the samesession:@Nform asnew_window;list_windowsshould qualifywindow_idfields identically.current_window_id()comparisons in the ctl-candidate scan (win_id == current) must compare like with like, and any caller that composesmux.target(CTL_SESSION, window)from an already-qualified id would double-qualify.session:@Ntarget grammar is already verified on stock psmux 3.3.7 forkill-window,send-keys,pipe-pane,list-panes, andcapture-pane(see fix(adapters): session-qualify psmux window ids #290's verification notes); only the TUI-side consumers and their id round-trips need auditing here.Refs: #254, #290, #221, psmux/psmux#483