diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-21 11:09:42 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-21 12:42:33 -0300 |
| commit | 9f4b8e83ed908c8b7a9bf979a5c9bf581e66c052 (patch) | |
| tree | 188719afb0be2300c5e08042a6f2197b579ca49e /runtime/session.zig | |
| parent | c4f7bb9477c7aa4c8864f14edb9e85b6c8c08437 (diff) | |
| download | pardes-9f4b8e83ed908c8b7a9bf979a5c9bf581e66c052.tar.gz pardes-9f4b8e83ed908c8b7a9bf979a5c9bf581e66c052.zip | |
pair: the process suite as pairs from 8 of 145 failing to 0, no golden changed: a pair's first client takes the session's view instead of one opened beside it (core/replica.zig `Peers.viewFor` `own`, daemon.zig `Joining.own`, `Replica.initBoot` alike so the digests agree), as does a joiner of any session with no frontend, no client and no view kept for one (after a Restore's `views.only`, or detached since): the boot's terminals were sized by the session's own view 0, which nobody looks at, so a client's layout never resized them (`Pardes.sizes`): the `↑` pans and the pane a row off of shrinktag, windowops, layout-close, topbarexec, headersweep-restored; a size already taken is no resize (dev/tui/tui.zig `Shell.resized`: a client's start and its input thread's first size were two `.resize` events, `resizes=2`); a Restore tells its clients so and they join again saying nothing (`Peers.restoring`, `restore_words`, `Link.rejoins`: they were cut with no word and asked the daemon, which once in two answered nothing listed and the client ended, and when they rejoined they said "upgrading"), a client handed over while it restores joins the restored core at the next boundary (it was hung up on, and its redial's 100 ms showed the old screen), and the dump's messages are not put on the clock while they rejoin (runtime/session.zig `restore`: the "Dump" chip went); a pair's client enters its terminal before its own boot (tui.zig `runClient`: keys typed while it booted went into a cooked terminal, echoed as ^B and lost; winch as a pair pinned to one CPU 0 of 5, now 5 of 5; the own path takes them); the tty cases' private daemon and their pair's session are killed at the case's end (test/tty.zig `Tty.deinit`: 21 of them outlived this morning's runs); core-test 894/1054 (160 skipped), shell-test 1096/1099 (3 skipped) (+1 each, the Restore's test; firstOnPair now expects no reload at a pair's first join); PARDES_PAIR=1 process-test 1, 0, 0 of 145 (pagercolor once at load 12.9, on the known list; runs 2 and 3 with no case failing even once), own path 0 of 145, winch alone as a pair 20 of 20; daemon.py plain, --pair, --attach-upgrading pass on Debug and ReleaseSafe
Co-Authored-By: Claude Opus <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'runtime/session.zig')
| -rw-r--r-- | runtime/session.zig | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/runtime/session.zig b/runtime/session.zig index 5e99384e..75e8efcc 100644 --- a/runtime/session.zig +++ b/runtime/session.zig @@ -111,7 +111,7 @@ pub fn Loop(comptime Frontend: type) type { // A first client on the socket it was started with, before its // first effects: it has every terminal from its first byte, and // no reload (Core.openView). - if (o.pair) |fd| l.peers.join(l.core, .{ .fd = fd }); + if (o.pair) |fd| l.peers.join(l.core, .{ .fd = fd, .own = true }); l.effects(); // ...and its shells, once a fresh session's own has a directory // to adopt them in. @@ -192,8 +192,12 @@ pub fn Loop(comptime Frontend: type) type { // go, and its one could not join it again (no socket finds it): // refused, as its Upgrade is (tui.zig `upgradeNow`). if (l.peers.count() > 0 and daemon.link < 0) return l.core.reportFailure(l.core.view().active, "Restore: no daemon keeps this session, so its client could not join it again; this session stays as it is"); + const watched = l.peers.count() > 0; const nc = host_io.restoreCore(l.gpa, l.core, path, &l.peers, l.watches.fd, &l.watches.table) orelse return; l.fe.restoring(nc); + // Its clients join again at once: the dump's messages are not + // put on the clock meanwhile (Messages.expireUnattended). + if (watched) nc.unattended = false; // The old core's pipes end, and an answer to its query is // turned away. l.inbox.pipe_tasks.cancelAll(l.io); |
