summaryrefslogtreecommitdiff
path: root/core/config.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-19 09:40:26 -0300
committerGabriel Schneider <[email protected]>2026-11-19 10:20:27 -0300
commitec4956d7b4fe097cd7a9488329a14fa28a79fb7a (patch)
tree565787f9d2637149cf6c8a72c1ba5dc692cbd500 /core/config.zig
parent2d30f3781ab40c38710835806a1029359509d27b (diff)
downloadpardes-ec4956d7b4fe097cd7a9488329a14fa28a79fb7a.tar.gz
pardes-ec4956d7b4fe097cd7a9488329a14fa28a79fb7a.zip
tape: a core holds its tape as it holds its allocator, `p.tape` (the handle's step 0, P19/P20, pardes-handle-sizing section 1): Pardes.tape: *Tape, never null, set when a core is made (Options.tape for init, else tape.on's, else tape.none; tape.adoptCore for a client's join, tape.adopt for a Restore, the tape's own apply for a replay's init and restore, replica.zig's Peers when a session's first client joins and when its last leaves), tape.none the tape of a session nobody records (Tape.through: every call goes through, nothing is taped, nothing writes it), Tape.io Zig's io for a site's body (the process's, as every global read of it was), the entry points as methods on the tape (site, value, authority, over, replaying, stray, stepping, screenReplica, screenAuthority, poison, authorityOnly, viewOnly, touchTerminal, adopt, current, forget; `speculating` and `screen_state` are its fields; `diverged` stays free, its name being the field it writes) and the free functions kept beside them, each now the method on `on orelse &none`, so every caller exercises the methods; the field is this process's own, in no digest, dump or tape (Pardes.replica.local, Options.replica.local) and no rollback copy (rollback.zig's `unsaved`), with a test that neither the digest nor the dump moves with it and that a copy put back leaves it as set; a safe build checks at every entry that a core's field is the tape `on` steps it on (or, with none on, an idle one): it found that a client's own frame drawn between its steps (Replica.draw, an entry with `on` null) is entered on its idle tape, which `enter` must not record into once it reads the field (step 9), and that a replay's dump check loaded its core on the session's tape through its options (now on none); Core.zig names the module `pardes.tape` (82 lines), its import `tape` colliding with the field; `init` and dump's `initFromDump` leave the tape once, deferred, with the core made or none (they left it twice, one per way out: the owner's reading); Stepping's swap and the three tests' save-and-restore stay: the free functions still read `on`, so a replica's step needs it pointed at its tape until the last of them goes. The five numbers: (1) functions that gained the parameter 0 (row: 0); (2) perfops 97 counts within 0.1%, largest image-frame on large +0.0215% (the base's own spread), none on a per-row path gained anything; (3) nothing stopped compiling for want of an io (none was removed); (4) global io uses 11 plus the tape's field default, calls into the free functions 93 (each now a method's), machine_lines tape.zig 10 -> 11 (the io field); (5) lines changed: tests 32, code about 580 (164 of them Core.zig's module name, about 250 bodies moved into methods; tape.zig 1533 -> 1623 lines). Gate: tui core-test 837/980 (143 skipped), shell-test 1015/1018, pane-test 183/184, behaviour-test 275/275 and --replay 20 seeds 0 failures, process-test lspcomplete and lspcompletemoved (the base's), replicas --clients 5 diverged 0, unequal 0, deltas wrong 0 (1646/0, 1620/0, 1737/0), quiet 484/0, 554/0, 651/0; daemon.py plain, --far, --games, --window-clients pass; semantics 2f615168fe07b35f (unmoved); frames 77/77 byte-identical in Debug, gui unit-test 1613/1617, perfab corpus2x +0.028% pictures identical in all 10 runs, perfops PASS
Co-Authored-By: Claude Opus <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBECMWcJD5pdS4SR6T
Diffstat (limited to 'core/config.zig')
0 files changed, 0 insertions, 0 deletions