Skip to content

feat(muxer/rex): add experimental rex backend - #430

Merged
ck3mp3r merged 16 commits into
mainfrom
feature/rex-muxer-backend
Nov 5, 2026
Merged

ck3mp3r merged 16 commits into
mainfrom
feature/rex-muxer-backend

Conversation

@ck3mp3r

@ck3mp3r ck3mp3r commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Experimental rex backend

Adds rex as a fourth muxer (besides tmux, zellij, herdr), selectable via --muxer rex and LAIO_MUXER=rex; flagged experimental in CLI help and docs.

Design — store-driven ownership

  • Placement: laio session -> rex session, window -> window, pane -> block (tmux-shaped; not herdr workspaces).
  • One atomic session.create builds the whole config; failures leave nothing behind.
  • laio recognizes its rex sessions exclusively through a sidecar store ($LAIO_STATE_DIR > $XDG_STATE_HOME/laio/rex > ~/.local/state/laio/rex): one <8-hex-sha(laio-name)>.json record per session (session id, name, config path, variables, timestamps). rex exposes no per-session data surface (96-method API catalog exhaustively enumerated; no env/kv).
  • Labels are plain session names; resolution, stop-safety (exact record-id equality against REX_SESSION), switch (store-first), and list (records ∩ live server) are all store-driven. Legacy marker-era records migrate automatically.
  • Attach: bare rex do session.select session_id=<full id>; requires Remote Control in Rex.app (Settings > Rex Server); on failure start continues, attach skipped with the rex warning surfaced.
  • Guards: zero-window bail, 24-block/16-depth caps, 8-hex collision bail (before anything is created; pinned probing pair), corruption degrades never-fatal (warn + skips; hard IO errors are Err).

Quality chain

  • Twelve review notes; two destructive defects caught and fixed before any commit (store read-coverage void; foreign-session kill on bare stop inside foreign rex sessions).
  • All server claims live-probed against rex api_revision 10; probe sessions created/killed by full id, server state restored after each round.
  • Suite: 373 passed / 1 pre-existing skip; clippy (both variants) and fmt clean; every criterion mapped to tests.

Parked follow-ups (recorded in c5t notes)

env/style silent-drop warning · detached-marker-block fallback for record-absent flows · layouts.md zoom claim (needs a verified binding) · promote select/kill into RexClient · pre-existing zellij client.rs:193 .expect · export error pins + zero-window export edge · unknown-field tolerance test · @path argv fallback.

Note: the store-driven ownership redesign round (re-review in flight) lands as the next commit on this branch.

@ck3mp3r
ck3mp3r merged commit fd18141 into main Nov 5, 2026
1 check passed
@ck3mp3r
ck3mp3r deleted the feature/rex-muxer-backend branch November 5, 2026 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant