Repository navigation
test(opencode): name other FIFO waiters by process name only, never their arguments - #3787
Conversation
|
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
Local merge gate: PASS
The Linux suites of the required checks (Fast checks, Integration and browser), run on main 68da73d with this PR's head 3cbc711 merged in (local merge 22ed527f2620, not pushed), as groups side by side in the self-hosted CI runner image on
Reruns:
Total 588s. |
Merge passMerged head
One reviewer: test-only PR (server/opencode-first-message.contract.test.ts). Test-only PR ( From the review of #3783: the diagnostic's scan for processes waiting on a FIFO reads every process on the machine, so its entries now carry the process name, pid and kernel wait only, never arguments; the pane's own processes (the test's stand-ins) keep theirs. Two lines. The merge pass gated this head with the local merge gate (its comment has the result). The VM merge gate ran beside it for comparison only. |
## Summary `scripts/newtab-typeahead-regression.ts:149` (via `ui-contexts-regression`) timed out twice on the merge pass's mesh VM gate (4 vCPU) for #3787's tree: > dialog: the page's frames for the new tab are all heard; expected "echo ahead-dialog\r", heard "echo ahead-dialog\r" The text heard equals the text expected, but `heard.count >= sentByPage` never held. ## Cause The page-side counter, added in #3713, raised `sentByPage` on every `WebSocket.send()` of an `input` or `keys` frame, before `send` ran. `src/lib/ws.ts` `rawSend()` calls `socket.send` with no `readyState` check. Input goes through it directly (`ws.ts` 1043, 1136), and `send()` gates on `this.connected`, which can still be true while the socket is closing. The browser discards a frame sent on a `CLOSING`/`CLOSED` socket, and a send on a `CONNECTING` one throws, so neither fires Playwright's `framesent`. The page counted a frame the listener could never hear, and the wait could not end. ## Fix (test only, no sleeps) The page counts a frame only when its socket was `OPEN` and `send` returned. The wait still covers every frame that actually left, an unexpected extra one included. ## Validation - `HERDR_TEST_MODE=integration bun scripts/newtab-typeahead-regression.ts` (after `bun run build`): 3/3 pass at load 61-64. - `bun run check fast`: pass. No changelog fragment: this changes a test only. Not in this PR: `ws.ts` handing input to a socket that is no longer open may lose a key. Reported to the lead as a product question.
Summary
Follows up #3783, from the merge pass's Codex review (LOW).
On a failure, the stand-in diagnostic's
waitinglist scans every process on the machine for one blocked on a FIFO, and printed each match's full command line. In CI the container only holds the test's own processes. In a local run on a shared machine, though, an unrelated program that happens to wait on a pipe would have its arguments printed into the log, and arguments can carry a secret.Change (diagnostic only, test file)
waitingentries now carry only the process name (/proc/<pid>/comm), its pid and its wait channel, never its arguments.The pane's own processes (
pane_processes) keep their argv: they come frompane.process_infofor the test's own pane, which is the stand-in.Validation
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.