|
|
value (the replay digest) and encodes and decodes it (the tape's values)
Values, never addresses: a pointer is followed, a slice is its elements, an ArrayList its items, a hash map its entries in no order, a DynamicBitSet its bits; an allocator, an Io, a lock or a worker's future is machinery and walks to nothing. A type it cannot see into (a pointer to an opaque thing or a function, a many-pointer, an untagged union) is a compile error naming the struct and the field, until the struct says what the field is:
pub const replica = .{ .local = .{...}, .derived = .{...}, .authority = .{...}, .len = .{ .{ "jumps", "njumps" } } };
local (this process's own: frames, animations, caches of the host's), derived (made again from the rest), authority (held by the session that performs effects alone) are in no digest; `len` hashes a fixed array only as far as its length field says, since the rest is undefined (0xAA in a safe build, and a slice in it faults). A name that is no field is a compile error, so a rename cannot put a field back in quietly. `fieldDigests`/`fieldNames` give a digest a field, which is how a divergence is narrowed down. encode/decode are native byte order and an error is its number in this build: for the process that wrote it, or one of the same build.
Phase 2 is to make the complete dump on the same walk (docs/next-daemon.md); nothing uses it yet.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|