diff options
| author | Gabriel Schneider <[email protected]> | 2026-10-29 20:56:03 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-30 02:12:12 -0300 |
| commit | 57aa8d2f9ae851fa9806abbd1fd04abf1fd2b57f (patch) | |
| tree | ec77e56aa09568b592fbbb28fa2c379df922d922 /src/rollback.zig | |
| parent | 3703c2526fb59708b00e12816bd88ffd8a15fc69 (diff) | |
| download | pardes-57aa8d2f9ae851fa9806abbd1fd04abf1fd2b57f.tar.gz pardes-57aa8d2f9ae851fa9806abbd1fd04abf1fd2b57f.zip | |
replicas' core for a socket: a client's input settles as a `step` (no clock, no wait, no frame) on both sides, every kind of input speculated, the session's clock guessed, views no frontend here draws left undrawn, and a drawn view's selections given back to its slot
pardes.zig: `step`, the middle of a pump, is a client input's own top-level input on the authority and in the replica's speculation, so the two tapes read alike; a pump skips the live view when it is `undrawn` (a replica client's, drawn by its own process); `settle` is the pump's whole middle, the Upgrade's too.
tape.zig: a `.step` input; `unattended` is a watched field; a speculation's clock reads answer a guess of the session's clocks (`Guess`); `resync` says the host and its writes again for a joiner; `adoptCore`; a short ret is shown in a trace.
views.zig: `drawOne` draws a replica client's own view between steps; `drawParked` gives a drawn view's selections back to its slot, for drawOthers too.
rollback.zig: std's lists by walk.isList (a safe build's have a third field).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'src/rollback.zig')
| -rw-r--r-- | src/rollback.zig | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rollback.zig b/src/rollback.zig index 6496a69f..7216664c 100644 --- a/src/rollback.zig +++ b/src/rollback.zig @@ -305,7 +305,8 @@ pub const Copy = struct { // by a speculation: terminal.zig's guards). if (comptime @hasDecl(T, "digest") and @TypeOf(T.digest) == fn (*const T, *walk.Hasher) void) return; if (s.layout == .@"packed") return; - if (comptime @hasField(T, "items") and @hasField(T, "capacity") and s.field_names.len == 2) { + // std's lists (a safe build's have a third field, a lock). + if (comptime walk.isList(T)) { if (v.capacity == 0) return; _ = try c.allocation(@intFromPtr(v.items.ptr)); const E = @typeInfo(@FieldType(T, "items")).pointer.child; |
