summaryrefslogtreecommitdiff
path: root/src/tutor.txt
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-09-03 16:19:23 -0300
committerGabriel Schneider <[email protected]>2026-09-03 16:19:23 -0300
commit0d0691b7bad87763d2e0ad1a0ae90f5e3591c663 (patch)
tree5eaa4cfd17f576fa3874024b794c9c598ac05d50 /src/tutor.txt
parent8435c7fe0113525f6df8420fa6fef45362bd65ab (diff)
downloadpardes-0d0691b7bad87763d2e0ad1a0ae90f5e3591c663.tar.gz
pardes-0d0691b7bad87763d2e0ad1a0ae90f5e3591c663.zip
pipe: a filter that fails says so, and `| head -1` stops failing
Two things made the selection pipe feel like it had never worked. It runs — test/snapshots/pipe.snap drives the real binary through a pty and filters `alpha beta` to `ALPHA BETA` — but it had no way to tell you when it did not, and one of its failure conditions was not a failure at all. IT NOW SAYS WHY. `runOne` read the command's stderr into memory and freed it two lines later, unread; every caller answered a failed filter with a bare `return`; `pipeResponse` had eight more silent exits under that. So `| trr` (a typo), `| grep nomatch` (exit 1), `| jq .` on bad JSON — all did nothing, said nothing, and left the text alone with no way to find out why. The runner carries a `Failure` home instead: which selection, what became of the command, and its own stderr. The core turns that into an `+Errors` buffer — acme's name for output that came from the program rather than from a word anybody clicked: | trr exit status 127 sh: line 1: trr: command not found An output buffer rather than the message row because the useful half of a shell failure is the text the shell wrote, and a 256-byte row would keep the label and throw away the reason. Focus stays with the file: `openRead` moves `p.active` to what it opens, which is right for a Grep you asked to read and wrong for a report you did not — you want to fix the command and press `|` again. A host with no `pull_pipe` at all (the detached daemon, the browser, the board) now says that too, instead of answering failure into the void. `| head -1` NOW WORKS. `writer_context.ok` was part of the success condition, so a command that stopped reading its stdin failed the filter even though it had done exactly its job: `head` takes the line it wants and closes the pipe, the write gets EPIPE, and a selection bigger than the 64 KiB pipe buffer was enough to trigger it. helix joins its input task and ignores the result for this reason; the exit status is the whole verdict. Also reported rather than swallowed: the ten-second timeout, the output ceilings, and a file edited while the filter ran — one keystroke during a slow command used to discard the result in a way indistinguishable from the filter doing nothing. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_016Q4RATpafkwahrovHQLKRf
Diffstat (limited to 'src/tutor.txt')
0 files changed, 0 insertions, 0 deletions