From a2c5ad9cbd458693599831867b509a12b90ef99d Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Fri, 20 Nov 2026 16:12:55 -0300 Subject: replica: the four process globals a 9P step was said to read, audited: config.tab_now is gone (the core's settings.tab is handed down, reports/pardes-globals.md); fs.last_reads is written by readHost, a tape site's host side (a replay is answered from the tape and never calls it) and read by the session host's watch (file_watch applyEffect, an effect only the session performs), so no replica writes or reads it; syntax.diff_pieces/diff_clock memo paintHunk by the language and the piece's bytes, from which each line's kind follows, and paint no digested state; selection_pipe.next_token: a client's Edit takes a token of its own process's, which differs from its session's, in pipe.edit_run, authority state (not digested) whose token only the session's listener uses (edit_cmd.cancel's stop): test "an Edit's stop token is each process's own (selection_pipe.next_token): a client's differs from its session's, and they agree"; root.zig's allowed_vars reasons hold, unchanged; no product change Co-Authored-By: Claude Opus Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T --- core/replica.zig | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'core') diff --git a/core/replica.zig b/core/replica.zig index f3269c84..617e1b4f 100644 --- a/core/replica.zig +++ b/core/replica.zig @@ -7389,6 +7389,17 @@ test "a client runs an Edit a script's write started once, as its session does, try n.agree(); } +test "an Edit's stop token is each process's own (selection_pipe.next_token): a client's differs from its session's, and they agree" { + var n = try NinepJoin.init("b\na\n", TestHost.host()); + defer n.deinit(); + try n.join(); + _ = try n.serve(.{ .tag = 1, .op = .write, .node = n.node(.ctl), .data = "Edit , | sort\n" }, false); + const session = n.a.core.pipe.edit_run.?.request.token; + const client = n.late.?.core().pipe.edit_run.?.request.token; + try std.testing.expect(session != client); + try n.agree(); +} + /// A session with a shell, for a run's 9P state across a join: a host /// whose pty takes the line and whose tty nobody else holds. const RunJoin = struct { -- cgit v1.3