In the browser shell demo, GNU grep currently returns status 0 for matching and non-matching input when run from the PTY shell. This made the merge-gate NetHack check report KANDELO_NETHACK_BAD even though /tmp/kandelo-nethack.out did not contain Cannot open record file.
Focused browser repro from the shell demo:
printf 'abc\\n' >/tmp/g\ngrep -q zzz /tmp/g; echo "GREP_FILE_NO:$?"\ngrep -q abc /tmp/g; echo "GREP_FILE_YES:$?"\nprintf 'abc\\n' | grep -q zzz; echo "GREP_STDIN_NO:$?"\nprintf 'abc\\n' | grep -q abc; echo "GREP_STDIN_YES:$?"\n```\n\nObserved in Chromium against `apps/browser-demos` on this branch after rebuilding `shell.vfs.zst`:\n\n```text\nGREP_FILE_NO:0\nGREP_FILE_YES:0\nGREP_STDIN_NO:0\nGREP_STDIN_YES:0\n```\n\nExpected: no-match cases should exit 1. The existing package tests cover grep stdin through `runCentralizedProgram`, but the browser PTY path needs coverage for grep exit status and file operands.
In the browser shell demo, GNU grep currently returns status 0 for matching and non-matching input when run from the PTY shell. This made the merge-gate NetHack check report
KANDELO_NETHACK_BADeven though/tmp/kandelo-nethack.outdid not containCannot open record file.Focused browser repro from the shell demo: