From 3267d276ab2553adb412183eb92390ed579b494f Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Mon, 28 Sep 2026 17:03:15 -0300 Subject: zig build monkey: random snapshot scripts hunting panics test/monkey.zig (Zig, as the project's tooling is): one random .snap per seed, over bad-UTF-8, wide-glyph and long files: keys, leader bursts, typing (an alphabet with no path characters), workspace words run by a middle click (Newcol for narrow panes, Find and Grep for prompts, long prompt text), presses, drags, wheel, hover, and resizes down to a cell. pardes-snap runs it with --update; a panic is a record in the app's crash file (in the script's fake home: seen even when the crash cut the script short) or a `.zig:N:N: 0x` frame of the app's (not the harness's) in its report or captured grid, and a hit keeps the script, captures and log under --out (default /tmp/pardes-monkey). A seed always makes the same script (tested), so --from=N replays one. Not a gate. README documents it next to snap. No Shader line: the tty has no post chain; the core fuzz in src/draw.zig covers the compile-error notice at a gui's metrics. 80 seeds x 70 steps: no panic. --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index 3e7a96f2..267b5ca7 100644 --- a/README.md +++ b/README.md @@ -124,6 +124,8 @@ zig build 9p-test freestanding protocol tests zig build quic-test -Dquic=true optional QUIC transport tests zig build snap scripted input traces against frozen golden grids zig build snap-driver-test retry evidence, strict failures and fixture isolation +zig build monkey random snapshot scripts hunting panics (not a gate) +zig build monkey-test the monkey's generator and panic detector zig build hxdiff differential suite against helix's own behaviour zig build hxdiff-test comparator, allocation and CLI regression checks zig build hxdiff-live compare against a freshly run hx-harness @@ -150,6 +152,19 @@ The benchmark steps — `perf`, `pdf-bench`, `pdf-scroll-bench`, `pdf-sections-b Snapshot scripts can use `snap9p` to capture core cells and styles through the default socket alongside the terminal emulator's independent captures. +`zig build monkey -Dplatform=tty -- [steps] [--from=N] [--out=DIR] [--keep]` +writes one random script per seed (keys, leader bursts, typing, clicks, drags, +wheel, tiny resizes, prompts and long prompt text over bad-UTF-8 and wide-glyph +files), runs it through pardes-snap and looks for a panic's `.zig:N:N: 0x` +frame in the report and in the captured grid. A hit keeps the script, its +captures and its log in DIR (default `/tmp/pardes-monkey`); a seed always makes +the same script, so `--from=N` with one seed replays it. A trace longer than +the grid scrolls away: replay the kept script at a larger `start` size. Each +crash found gets a fix and a regression script in `test/snapshots/`. The tty's +tagline is the body's pitch, so what a narrower tagline does is fuzzed by a +unit test instead (`a monkey over notices…` in `src/draw.zig`, longer with +`PARDES_FUZZ_SEED`/`PARDES_FUZZ_STEPS`). + `-Dtest-filter=` applies to every unit-test binary. Use `-Doptimize=ReleaseFast` for performance measurements. To record output and first/warm command runtimes across revisions, run: -- cgit v1.3