v0.2.0 80c61e3

remote-resilience.md RawHistoryFolder

Remote resilience

Remote attachments connect directly to the selected vev daemon. UDP is the normal carriage: SSH bootstraps an authenticated endpoint, then the attachment carries the vev protocol over UDP. Set VEV_REMOTE_TRANSPORT=stdio to use an SSH-only carriage explicitly when UDP is unavailable. vev must be installed on the remote host.

The session remains shared across all attachments. It owns PTYs, VT state, tabs, panes, shared PTY content geometry, and ordered mutations. Each attachment keeps its own window size, selected tab and pane, copy mode, overlays, render/output acknowledgements, and reconnect state. Reconnecting one attachment resumes that attachment without replacing its peers or changing their attachment-local windows/views; its latest claim may still update shared PTY geometry.

Remote picker identity

The session picker shows remote live, stopped, broken, stale, and unavailable rows using the same expandable session/tab shape as local rows. A row carries a lifecycle ID and stable tab selector separately from its display origin; labels are never parsed back into routes. Cached and stale rows remain navigable, but activation is gated until the host catalog and the exact lifecycle/tab identity are current. A successful picker handoff sends the structured target to the owning daemon without creating a local shadow session. Picker-selected remote attachments use the daemon's environment and persisted session working directory; direct CLI remote attaches retain their client-request semantics.

Remote attachments remain direct: the selected remote daemon owns the session, PTYs, rendering, input, resize, effects, and teardown. The client does not proxy remote content through the local daemon. A single client process keeps a bounded, in-memory route history across local, direct remote, and picker- discovered attachments. The daemon renders the latest attachment snapshot; active routes are metadata-only, while JRS and BSK send typed key/generation actions back to the client. History is process-local and is not persisted or shared between clients.

A picker-selected remote target is a direct handoff with one input pump. Exact lifecycle/name identities are carried separately from display labels, and a successful daemon-local switch publishes a new committed identity before the client republishes its snapshot. These navigation actions and the strict handshake layout use protocol v27. Attach handshakes may carry an exact target, and successful Welcomes can return the daemon's committed identity.

Durable record compatibility

The catalogue record format is currently version 4 because records now retain stable tab identity metadata. Readers accept version 3 for one-way upgrades, but older binaries reject records written at version 4. Back up the vev state before a rollback; downgrading after an upgrade can leave newer catalogue records unreadable and may require recreating those sessions.

Remote catalogues are bounded and versioned. Complete catalogues contain ordered tab IDs, names, state, active tab, attachment state, and MRU sequence. Stopped tab metadata is retained across daemon restart; legacy count-only catalogues are read-only compatibility rows and cannot provide exact tab identity.

Remote picker previews are bounded styled-cell snapshots fetched without attachment or PTY mutation. They are held in a short-lived in-memory cache only; viewport contents are not persisted or written to diagnostics. Live preview requests use debounce, same-key single-flight, bounded concurrency, TTL stale-while-revalidate, and failure cooldowns. Stopped sessions show a static placeholder, and late or canceled preview responses are discarded when the picker selection changes.

Connection limits

  • A connection handshake has one 15-second deadline from connection start through Hello, Welcome, and the initial committed publication. The deadline applies to local and remote connections.
  • Each command request has a 10-second deadline for its result. A timeout abandons only that request; it does not complete a later request with a stale result.
  • Shared PTY content geometry follows the latest valid, non-superseded attach, resume, or resize claim. A later attachment can therefore replace the current shared geometry; if the winning attachment detaches, the most recently claimed remaining valid attachment becomes authoritative.

UDP operation

  • The remote host selects a UDP port in 61000-61023 by default. Set VEV_UDP_PORT_RANGE to a range, one port, or 0 for an ephemeral port.
  • The UDP carriage authenticates and retransmits protocol frames, preserves frame order, and reports bounded link-health state without logging payloads, addresses, keys, or identities.
  • The attachment reconnects with its resume token after a path change. The remote session and its PTYs remain in place while the attachment is offline.

The raw UDP AEAD key is held only in memory during bootstrap and transport setup. It is not written to durable state. Key buffers are cleared on the reachable handoff paths on a best-effort basis; cipher implementations and other I/O owners may retain internal copies for their lifetime.

Connection states

State Meaning
connected Recent authenticated contact and complete frame progress.
degraded Authenticated packets arrive, but complete-frame or acknowledgement progress is delayed.
probing Authenticated contact is absent and the carriage is probing for a recovered path.
resuming This attachment is opening a replacement connection with its resume token.
offline The attachment is re-establishing the selected remote transport.
expired The session or attachment resume window is no longer available.

In raw terminal mode, state changes appear as vev status text rather than bytes written into the PTY's output stream.

Diagnostics and checks

At debug level, transport-health logs contain only state, elapsed progress ages, and bounded counters. scripts/debug-remote-attach.sh --udp-health user@host collects redacted health lines and Linux ss -u -m socket-memory counters.

Useful checks are:

  • block and unblock the configured UDP port range;
  • move between networks or change VPN state;
  • suspend and resume the attachment machine;
  • reconnect to the same named session;
  • verify that a second attachment retains its independent view while the first reconnects.

Keep hostnames, usernames, keys, and local paths out of shared logs and screenshots.

source
1# Remote resilience
2
3Remote attachments connect directly to the selected vev daemon. UDP is the
4normal carriage: SSH bootstraps an authenticated endpoint, then the attachment
5carries the vev protocol over UDP. Set `VEV_REMOTE_TRANSPORT=stdio` to use an
6SSH-only carriage explicitly when UDP is unavailable. vev must be installed on
7the remote host.
8
9The session remains shared across all attachments. It owns PTYs, VT state, tabs,
10panes, shared PTY content geometry, and ordered mutations. Each attachment keeps
11its own window size, selected tab and pane, copy mode, overlays, render/output
12acknowledgements, and reconnect state. Reconnecting one attachment resumes that
13attachment without replacing its peers or changing their attachment-local
14windows/views; its latest claim may still update shared PTY geometry.
15
16## Remote picker identity
17
18The session picker shows remote live, stopped, broken, stale, and unavailable
19rows using the same expandable session/tab shape as local rows. A row carries a
20lifecycle ID and stable tab selector separately from its display origin; labels
21are never parsed back into routes. Cached and stale rows remain navigable, but
22activation is gated until the host catalog and the exact lifecycle/tab identity
23are current. A successful picker handoff sends the structured target to the
24owning daemon without creating a local shadow session. Picker-selected remote
25attachments use the daemon's environment and persisted session working
26directory; direct CLI remote attaches retain their client-request semantics.
27
28Remote attachments remain direct: the selected remote daemon owns the session,
29PTYs, rendering, input, resize, effects, and teardown. The client does not
30proxy remote content through the local daemon. A single client process keeps a
31bounded, in-memory route history across local, direct remote, and picker-
32discovered attachments. The daemon renders the latest attachment snapshot;
33active routes are metadata-only, while `JRS` and `BSK` send typed key/generation
34actions back to the client. History is process-local and is not persisted or
35shared between clients.
36
37A picker-selected remote target is a direct handoff with one input pump. Exact
38lifecycle/name identities are carried separately from display labels, and a
39successful daemon-local switch publishes a new committed identity before the
40client republishes its snapshot. These navigation actions and the strict
41handshake layout use protocol v27. Attach handshakes may carry an exact target,
42and successful Welcomes can return the daemon's committed identity.
43
44## Durable record compatibility
45
46The catalogue record format is currently version 4 because records now retain
47stable tab identity metadata. Readers accept version 3 for one-way upgrades, but
48older binaries reject records written at version 4. Back up the vev state
49before a rollback; downgrading after an upgrade can leave newer catalogue
50records unreadable and may require recreating those sessions.
51
52Remote catalogues are bounded and versioned. Complete catalogues contain ordered
53tab IDs, names, state, active tab, attachment state, and MRU sequence. Stopped
54tab metadata is retained across daemon restart; legacy count-only catalogues are
55read-only compatibility rows and cannot provide exact tab identity.
56
57Remote picker previews are bounded styled-cell snapshots fetched without
58attachment or PTY mutation. They are held in a short-lived in-memory cache only;
59viewport contents are not persisted or written to diagnostics. Live preview
60requests use debounce, same-key single-flight, bounded concurrency, TTL
61stale-while-revalidate, and failure cooldowns. Stopped sessions show a static
62placeholder, and late or canceled preview responses are discarded when the
63picker selection changes.
64
65## Connection limits
66
67- A connection handshake has one 15-second deadline from connection start
68  through Hello, Welcome, and the initial committed publication. The deadline
69  applies to local and remote connections.
70- Each command request has a 10-second deadline for its result. A timeout
71  abandons only that request; it does not complete a later request with a stale
72  result.
73- Shared PTY content geometry follows the latest valid, non-superseded attach,
74  resume, or resize claim. A later attachment can therefore replace the current
75  shared geometry; if the winning attachment detaches, the most recently
76  claimed remaining valid attachment becomes authoritative.
77
78## UDP operation
79
80- The remote host selects a UDP port in `61000-61023` by default. Set
81  `VEV_UDP_PORT_RANGE` to a range, one port, or `0` for an ephemeral port.
82- The UDP carriage authenticates and retransmits protocol frames, preserves
83  frame order, and reports bounded link-health state without logging payloads,
84  addresses, keys, or identities.
85- The attachment reconnects with its resume token after a path change. The
86  remote session and its PTYs remain in place while the attachment is offline.
87
88The raw UDP AEAD key is held only in memory during bootstrap and transport
89setup. It is not written to durable state. Key buffers are cleared on the
90reachable handoff paths on a best-effort basis; cipher implementations and
91other I/O owners may retain internal copies for their lifetime.
92
93## Connection states
94
95| State | Meaning |
96| --- | --- |
97| `connected` | Recent authenticated contact and complete frame progress. |
98| `degraded` | Authenticated packets arrive, but complete-frame or acknowledgement progress is delayed. |
99| `probing` | Authenticated contact is absent and the carriage is probing for a recovered path. |
100| `resuming` | This attachment is opening a replacement connection with its resume token. |
101| `offline` | The attachment is re-establishing the selected remote transport. |
102| `expired` | The session or attachment resume window is no longer available. |
103
104In raw terminal mode, state changes appear as vev status text rather than bytes
105written into the PTY's output stream.
106
107## Diagnostics and checks
108
109At debug level, transport-health logs contain only state, elapsed progress ages,
110and bounded counters. `scripts/debug-remote-attach.sh --udp-health user@host`
111collects redacted health lines and Linux `ss -u -m` socket-memory counters.
112
113Useful checks are:
114
115- block and unblock the configured UDP port range;
116- move between networks or change VPN state;
117- suspend and resume the attachment machine;
118- reconnect to the same named session;
119- verify that a second attachment retains its independent view while the first
120  reconnects.
121
122Keep hostnames, usernames, keys, and local paths out of shared logs and
123screenshots.

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 12

Tags 11

↑↓ moveenter openesc close