From 821509e5cbe47e73ce4f4fcdc5d092f3c5e1c986 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 20 Nov 2026 04:25:37 -0300 Subject: 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 Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T --- core/root.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'core/root.zig') diff --git a/core/root.zig b/core/root.zig index a57934a6..a58a25b5 100644 --- a/core/root.zig +++ b/core/root.zig @@ -629,7 +629,7 @@ const machine_lines = [_]struct { []const u8, usize, []const u8 }{ .{ "hunks.zig", 1, "a test helper's file read" }, .{ "look.zig", 6, "openLink's fork (the host's: a view's frontend opens a link) and a remote's error name" }, .{ "memory.zig", 7, "the memory regions themselves (mmap, madvise, their locks)" }, - .{ "replica.zig", 70, "the client and session engines: sockets, threads, clocks, the blob cache, traces" }, + .{ "replica.zig", 74, "the client and session engines: sockets, threads, clocks, the blob cache, traces" }, .{ "rollback.zig", 1, "a test helper's directory" }, .{ "root.zig", 4, "dev's modules re-exported (host_io, file_watch, glide, fonts)" }, .{ "selection_pipe.zig", 14, "a pipe's child processes and their files: the host's `pipe` entry" }, -- cgit v1.3