diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-20 16:12:55 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-20 16:13:22 -0300 |
| commit | a2c5ad9cbd458693599831867b509a12b90ef99d (patch) | |
| tree | e4d9ab10abefdb4d0ecd8388cfcab3f984fb7242 /core/replica.zig | |
| parent | 8953e01fba330404ded0e5b87bf4f4bb1cfddbb8 (diff) | |
| download | pardes-a2c5ad9cbd458693599831867b509a12b90ef99d.tar.gz pardes-a2c5ad9cbd458693599831867b509a12b90ef99d.zip | |
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 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'core/replica.zig')
| -rw-r--r-- | core/replica.zig | 11 |
1 files changed, 11 insertions, 0 deletions
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 { |
