diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-20 04:25:37 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-20 04:50:24 -0300 |
| commit | 821509e5cbe47e73ce4f4fcdc5d092f3c5e1c986 (patch) | |
| tree | a5801e80b4a9b1bf22462752723f45d5f3df53f0 /runtime | |
| parent | 2fadb864051f5afc062606a898d821b702a1692c (diff) | |
| download | pardes-821509e5cbe47e73ce4f4fcdc5d092f3c5e1c986.tar.gz pardes-821509e5cbe47e73ce4f4fcdc5d092f3c5e1c986.zip | |
first client: a session takes a client on a socket it was started with BEFORE its first effects, by the join a later client gets (Peers.join, now pub, called from runtime/session.zig between the frontend's open and the first effects when Options.pair is set), and a client's first join is made on its end of the pair with no hello (replica.join reads Options.pair; joinOn's session name optional), so a first client has every terminal from its first byte (P32); two tests through the replica's surface, a session core with a boot shell and real Peers threads over a socket pair, the first effects after the join: screen state (replica.join end to end) and bytes (loaded as the soak's bytes clients): the spawn taped, the shell's first bytes in the client's terminal, the digests equal at the client's check, and under bytes no reload of any byte (the session's one reload at the join is of the boot shell's emulator before anything was written, the client's none; a client after the bytes: every side reloads); core/root.zig's machine-lines count for replica.zig 70 -> 74 (the tests' sockets)
Co-Authored-By: Claude Opus <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'runtime')
| -rw-r--r-- | runtime/session.zig | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/runtime/session.zig b/runtime/session.zig index 6b359eef..d34a8ea9 100644 --- a/runtime/session.zig +++ b/runtime/session.zig @@ -103,6 +103,10 @@ pub fn Loop(comptime Frontend: type) type { defer l.peers.deinit(); // Before the core goes: each client sees its link end. defer l.peers.dropAll(l.core); + // 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 }); l.effects(); // ...and its shells, once a fresh session's own has a directory // to adopt them in. |
