From b40ce1fcea232b99f28462c54cffc9fdd78abbad Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 24 Nov 2026 23:01:19 -0300 Subject: Prompt: a pipe prompt runs a known filter live, a run a selection (walk UI, pick-ui SPEC.md §7.4, item 4 of line E): `| A-| ! A-! $` from a body run the command as typed at each key when its first word is a known filter (`sort uniq tr cut sed awk jq column fmt fold rev head tail wc grep nl tac cat`), else the count says ` isn't a known filter · C-p runs it` and C-p runs it live all the same; the live run is a pipe request of its own, off the loop (Pipe.preview, out with the host as `wait` is; a later key's supersedes it, its answer then no one's), its command framed so that each selection's run says its stdout, its stderr and its status (Pipe.framed: sh, the runner's all-or-nothing answer kept as it is); counted `2 lines → 2 · exit 0`, `2 runs · 1 ok · 1 exit 2 `, `keeps 4 of 6` (`$`), `⋯` while it runs; the outputs drawn in the body as ghost lines under the lines they replace (Prompt.ghosts, renderBody's last step: the replaced lines on the diff's deleted ground, each output on the added ground, `!`'s before its selection, `A-!`'s after, the rows below pushed down; drawn, never written: R3), `A-|`'s runs a band step, each `#1 exit 0` and its output; Enter over runs that failed is refused once (` — ⏎ again applies the 1 that worked`), again applies what the live run made, the selections whose runs failed left as they were (Pipe.applyLive: pipeResponse's apply split out, a run's status its verdict), and nothing when every run failed (said, the prompt open); a command not run live, and `A-|` (its point is what it does), runs on Enter as before, one request; wire 39; THE FAULTS THE 40,000-SEED FUZZ MET (each in no code of this item, each a damaged dump's): Core.PendingWrite's `off` past its bytes (dropPendingWrite's count below zero), now a `.place`, the total saturating; the prompt histories' lines undefined past a damaged count (walk.hash read a length of 0xAAAA), now empty by default; TEST FIRST: Prompt.zig "a pipe prompt runs a known filter live, a run a selection ..." and "a live run's framing says each run's output, stderr and status in a real shell" (shell-test); Pipe.zig's tests take the request the keys made last (a known filter ran live before Enter ran it); golden pipe (the count of the live run); core-test 1018/1185 (167 skipped: the framing test wants a shell), shell-test 1232/1235, pane-test 182/184, behaviour-test 274/277 (the failures A's, as on item 1), process-test A's six and none of mine, term-test 17/17, kitty-test 45/45; the fuzz at 40,000 join and 1,779 image seeds: pass; the soak, 5 clients: diverged 0, unequal 0 at rtt 30/80/207, quiet checks 590/0 484/0 700/0, the corpus 22 scenes the same, exit 0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- test/daemon.py | 2 +- test/snapshots/pipe.golden | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/daemon.py b/test/daemon.py index bb159424..b71ec17d 100644 --- a/test/daemon.py +++ b/test/daemon.py @@ -340,7 +340,7 @@ class Replica: """A replica's connection (abi/wire.zig): length-prefixed messages, a tag byte and a little-endian u32 length. It is a near client: its first word after the hello says so.""" - WIRE = 38 + WIRE = 39 def __init__(self, path, timeout=10): self.path, self.timeout = path, timeout diff --git a/test/snapshots/pipe.golden b/test/snapshots/pipe.golden index 04921c77..4c156cc8 100644 --- a/test/snapshots/pipe.golden +++ b/test/snapshots/pipe.golden @@ -1,12 +1,15 @@ == snap prompt grid=180x13 cursor=49,2 | Newcol Joincol Find Grep Help Changelog Tutor Dump Themes Config History Debug Exit | New Term Find Grep Joincol Delcol -|^ /tmp/pardes-snap/pipe/cwd/pipe.txt | tr a-z A-Z = Exec Edit |tr a-z A-Z ⏎ replace · C-r history · esc +|^ /tmp/pardes-snap/pipe/cwd/pipe.txt | tr a-z A-Z = Exec Edit |tr a-z A-Z 1 line → 1 · exit 0 ⏎ replace · C-r history · esc | 1 alpha beta +| ALPHA BETA | 2 gamma delta == snap filtered grid=180x13 cursor=17,3 |2: *Edit |tr a-z A-Z › /tmp/pardes-snap/pipe/cwd/pipe.txt Save Term Collapse Follow Del |3: 1 ALPHA BETA +|4: 2 gamma delta +|5: == snap undone grid=180x13 cursor=17,3 |2: Edit |tr a-z A-Z › /tmp/pardes-snap/pipe/cwd/pipe.txt Save Term Collapse Follow Del |3: 1 alpha beta -- cgit v1.3