client: close the window on shell exit, re-dial on transport loss #156
No reviewers
Labels
No labels
priority/P0
priority/P1
priority/P2
release/v0.1.0
status/blocked
status/planned
type/bug
type/design
type/test-gap
type/tracker
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
natsukium/felis!156
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/close-on-exit-22"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #22.
A window used to answer its shell exiting by attaching to another session
on the daemon — the one it was on before, else a neighbor in the session
ring — an unstated, uninspectable pick that could land a ctrl-D on an
unrelated project's shell. It now closes, and the session lingers for the
post-exit grace so
felis attach <id>reopens one closed by mistake; awindow that arrived by
felis window retargetor a transientpipe/runstill returns to its origin.
Transport loss was the opposite mistake: a bare channel close carries no
verdict about the session, yet the window exited on it. It now keeps the
last screen behind a
— disconnectedtitle with a stopped cursor andre-dials the same daemon and session — six attempts over roughly 23 s of
backoff, each attempt bounded at ten seconds so a half-open
sshroutecannot outwait the ladder. Over
--hostthat is the reconnect it soundslike; against a local daemon the session died with the daemon, so the
first attempt's replacement daemon refuses the re-attach and the window
closes at once. Every ending names the reason and the remedy in the log
and exits nonzero:
1when the session is gone,2when the daemonrefused the window or never answered.
Doc cascade:
docs/explanation/architecture/session-lifecycle.md(theexit and reconnect argument),
docs/reference/cli.md(window close andthe reconnect exit codes),
docs/reference/ipc.mdandcrates/felis-protocol/proto/felis.proto(live_onlywording),docs/reference/spec.md,docs/how-to/attach-over-ssh.md,docs/how-to/update-felis.md, andCHANGELOG.md.Verified: just check green (fmt, clippy, nextest, deny, proto-compat);
reviewed by pi luna + pi sol; docs proofread by Gemini gemini-3.8-flash-high
Deferred
asserting the client process exits nonzero within the retry budget.
Needs a GUI-client process harness that does not exist in the repo, and
the client cannot run headless on this host. The pieces are covered by
unit tests:
ExitReason-> code/remedy,ReconnectError->ExitReason, and the retry bound.pick_exit_switch_target. Written,then dropped: it asserted on
include_str!of a sibling module ratherthan on behavior. The removal is compile-enforced now that
Landing::PickExitandpick_exit_switch_targetno longer exist.SessionExitedor drives theevent handler, so it pins
ShadowScreen::applyrather than theordering it claims. Reported twice by the two pi models against the
same test; merged and fixed under one finding.
fc49a2160ba1c3b2e084a1c3b2e084d09d32c465