Repository navigation
test(opencode): name the pane's processes and any FIFO waiter when the stand-in is never seen - #3780
Conversation
…e first-message stand-in is never seen
|
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
Merge passMerged head
One reviewer: test-only PR (server/opencode-first-message.contract.test.ts). Merged with these checks red, none of them required: bundle (macos-15, darwin-universal); Test-only PR ( Diagnostic only, after #3774: when the test's stand-in agent is never seen, the error now also lists the pane's processes with their kernel wait and open files, and any process stuck on a FIFO or holding the folder's Left, LOW (Codex, reproduced with Merged with one check not green: |
…nostic's waiters (#3783) ## Summary Follows up #3780, from the merge pass's Codex review (LOW). #3780's failure message lists processes that wait on a FIFO: `wchan` containing `fifo`, or holding the folder's `opencode.json`. A process blocked **opening** a FIFO that has no writer waits in `wait_for_partner` instead, and holds no fd on it yet. The diagnostic would have left out exactly the process it is meant to name. Reproduced here: `cat` on a writerless FIFO sits in `/proc/<pid>/wchan` = `wait_for_partner`. ## Change (diagnostic only, test file) The waiter filter also matches `wchan === "wait_for_partner"`. ## Validation - `cat` on a writerless FIFO shows `wait_for_partner`. Checked on this host; the probe process was killed by its pid. - `HERDR_TEST_MODE=integration bun test ./server/opencode-first-message.contract.test.ts` (herdr 0.9.3): 6 pass, 0 fail. - `bun run check fast`: pass. No changelog fragment: this changes a test only.
Summary
server/opencode-first-message.contract.test.tsfailed again on main (CI 43249069631 at a5ef911): "the OpenCode stand-in did not start", in the FIFO test.#3774's message showed herdr's last report for the pane: cwd
fifo-folder,agent_status: "unknown", noagent,revision: 0. Forcing the same wait to fail locally gives the same fields while the stand-in runs normally. The stand-in draws nothing until input, sorevision: 0is expected. The message therefore says herdr never marked the paneopencode, but not why.Change (diagnostic only, test file)
When the wait gives up, the error also carries, as JSON:
pane_processes: the pane's foreground processes frompane.process_info, each with its kernel wait channel (/proc/<pid>/wchan) and the files it holds open.waiting: any process blocked opening a FIFO, or holding the folder'sopencode.json, with its command line (at most 20).If something, herdr's own detection included, opens the FIFO
opencode.jsonand waits for a writer, the next red names it. If nothing does, that rules the FIFO out. The wait, its deadline and the assertion are unchanged.Validation
bun …/bin/opencode fifoinep_poll, andwaiting: [].HERDR_TEST_MODE=integration bun test ./server/opencode-first-message.contract.test.ts(herdr 0.9.3): 6 pass, 0 fail.bun run check fast: pass.No changelog fragment: this changes a test only.