summaryrefslogtreecommitdiff
path: root/core/replica.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-21 14:44:08 -0300
committerGabriel Schneider <[email protected]>2026-11-21 15:36:57 -0300
commita86e213e3e8053906df5ed4a37821c41a4afd932 (patch)
tree9e22bf5bbe7b988757d10f80ac2348f8e5da27cf /core/replica.zig
parent8152cf383c8296be29e80175b57e40f8d41049bf (diff)
downloadpardes-a86e213e3e8053906df5ed4a37821c41a4afd932.tar.gz
pardes-a86e213e3e8053906df5ed4a37821c41a4afd932.zip
layers: `Changes` does not hold the loop (P43), in Stream.zig's model: the word records what is asked (`jj.Ask`: the pane by serial, the file, the revision annotated, the revset; `Stream.changes`, one at a time, one asked meanwhile in `changes_next`) and emits the `search` effect with a generation of its own (`jj.gen_bit`); the shell's worker (`jj.start`, through Stream.start) runs jj's two commands (the log with each change's diff of the file, the annotation) and posts their raw answers as ONE input (`Event.search`, its new `jj` field naming the pane: the log in `rows`, the annotation in `styles`, a refusal with `end` failed), which the step takes (`jj.receive`): the last asked is parsed (`jj.parse`: pins, provenance, hunks, nest) and pinned, an earlier one's or a closed pane's dropped, then the one asked meanwhile goes; a replica replays that input and never runs jj; a host with no workers (a test) runs both as sites on the loop, a host whose worker cannot start hands the answer in as an input; while it runs the pane says `Changes: jj…` and what it showed stays until the answer lands; round 3's `may_wait` row for `Changes` is gone (the far-client walk: nothing stops there now); tests through the replica's surface with a worker host: the word returns before jj answers and says so, the answer lands as one input and a client replaying it ends equal; a second Changes before the first's answer pins only the second's; the pane closed before the answer: nothing pinned, nothing kept (no leak); measured (ReleaseSafe, `Changes xpxluunz..pvtvmpzx` on core/replica.zig, 16 changes, 8,328 lines, 112 hunks, jj's answers taken by hand): the step that takes the answer holds the loop 2.3-2.8 ms, where the word held it 588-603 ms (jj's two runs, 253 and 349 ms here, are the worker's now); core-test 899/1059 (160 skipped), shell-test 1101/1104 (3 skipped)
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.zig1
1 files changed, 0 insertions, 1 deletions
diff --git a/core/replica.zig b/core/replica.zig
index dd3f13d1..97da9c74 100644
--- a/core/replica.zig
+++ b/core/replica.zig
@@ -6583,7 +6583,6 @@ const may_wait = [_]Wait{
.{ .what = "Mini *", .on = .any, .stop = "resolve", .why = "a file opened by name, from the session's disk" },
.{ .what = "Get", .on = .any, .stop = "read_file", .why = "the file read again from the session's disk" },
.{ .what = "Save", .on = .any, .stop = "write_file", .why = "a save" },
- .{ .what = "Changes", .on = .any, .stop = "jj", .why = "what jj says of the pinned changes, the session's (P14: a word typed may take a moment once)" },
// A program run, a shell opened or closed: the session's processes.
.{ .what = "Exec *", .on = .any, .stop = "kind", .why = "a program run: its name asked of the disk first" },
.{ .what = "Exec *", .on = .any, .stop = "tty_taken", .why = "a program run in a shell: whether one has it, the session's" },