summaryrefslogtreecommitdiff
path: root/dev/vaxis_input.zig
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-25 14:10:34 -0300
committerGabriel Schneider <[email protected]>2026-11-25 14:32:10 -0300
commit5b6552d1ddfdb966318dd1c5af5ea9d5c353a8a6 (patch)
tree1a34cedb0600f32777c45c4829ff9f4d1ed1d4fc /dev/vaxis_input.zig
parente6c384833912598d65c509f0d3a7b713fab0a8eb (diff)
downloadpardes-5b6552d1ddfdb966318dd1c5af5ea9d5c353a8a6.tar.gz
pardes-5b6552d1ddfdb966318dd1c5af5ea9d5c353a8a6.zip
TagState.loaded: a view's tag state a dump gives is held to what its own state reads, and only that, so a damaged dump in describe-key's, Help's or a level's state is at rest instead of killing the session at its first layout, frame or key, and a session's own state loads as it is (R's optional robustness item, the pre-install diff read): describe-key found has its root, not the register's, its keys a leaf of the tree or an addon's SPC word, not found and missed at once, and with no root nothing typed or the one key struck; Help's and describe-key's keys and a struck key are cells keyName names; Help's scope is what `?` was struck under (SPC's keys to a group, no more than SPC's path holds; else none); a picker's cursor is in its own rows (All's are found again at each read); the view's SPC keys (`current`'s path for every level) are cells to a group, else the view is out of SPC too; THE CAUSE: loaded() checked describe-key only for `found` with no keys, so a dump left in its state reached `s.scope_root.?` (Band.zig:119, :172; keys.zig:598), `level[at]` on an empty level (Band.zig:182, and :216 for a level unrolled on SPC keys to nothing), bindings.keyName past its table (bindings.zig:428, from TagState.zig :653 `s.scope[0]`, :725 and :768 `s.miss`, chord and keyCells) and keys.helpBack's copy of Help's scope into SPC's 4-key path; and A2's checks ran on every state's fields whatever the state: a picker's cursor was held to Help's hit count, and describe-key's `found` (left as it was under Help and at rest) to its keys, so a session where a picker's cursor had moved with Help never run, or where describe-key had found a leaf before Help or rest, loaded at rest: the loaded core's digest was not the session's, the digest a join's client checks its load against (replica.zig `r.loaded(j.digest)`), and a Restore or an Upgrade dropped the picker; each state's fields are read only under it now, and the tree a load holds keys to is every builtin's (bindings.nodeAt and the registry's words, not bindings.level, which drops the live view's frontend's others), so every process holds every view alike; RUN (TEST FIRST): TagState.zig "a dump holding describe-key's state, or Help's, or a level's, damaged where a draw or a key indexes it, loads to rest and draws and takes keys" (14 damages through byteDump and dump.load, each drawn and given Backspace, Down, Enter, Backspace): fails on the base at TagState.zig:1496 (the state not at rest), and with that check taken out 10 of the 12 cases run panic on the base: `attempt to use null value` (found, no root), `index out of bounds: index 0, len 0` (found on `SPC z z`; Help's scope `z z` and Backspace; SPC unrolled on `z z`), `integer overflow` (a struck key 0x01 with no root; Help's scope key 0x01; a struck `miss` 0x05; SPC's key 0x01), `index out of bounds: index 95, len 95` (a struck key 0x7f under `g`), `index out of bounds: index 6, len 4` (Help's scope six keys, Backspace); the two that do not panic (found on `SPC t`, a group; on `g z`, nothing) draw another child's doc; and "a tag state a session made loads as it was, its digest the session's: ..." fails on the base at TagState.zig:1525 (`expected .pick, found .rest`); both pass now; the dump fuzz seeds describe-key's state too (core/fuzz.zig: a second join dump, SPC h k `g d` found, 2048 seeds by default, the test 38 s with it); a user could have hit the panics only through a damaged dump (a join or a restore: the user's rule, a session never dies of an input), and the digest's difference on any load of a session where a view's picker cursor had moved with Help never opened, or where describe-key had found a leaf before Help or rest; core-test 1099/1270 (171 skipped: the base's 1097 + these two), shell-test 1318/1321 (3 skipped), process-test 0 of 147 failed (3 skipped), the dump fuzz at 40,000 join seeds on each of the two dumps (Help's, describe-key's) and 1,779 image seeds clean (81,785 loads, the three pinned seeds among them); load 3 to 7
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBFhdevVu48bvL9kCE
Diffstat (limited to 'dev/vaxis_input.zig')
0 files changed, 0 insertions, 0 deletions