Repository navigation
test(portal): wait for the interpreter to run its script before reading argv - #1419
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Summary
Merge Risk: ⚪ Minimal · up to
|
|
Test-only change; merged on the required checks and the merge pass's omo review (PASS, LOW notes only). CodeRabbit did not review it (allowance ran out). |
…esuming (#1638) ## Change `server/portal.test.ts` "does not stop an unrelated process whose argv merely mentions expose and the identity path" called `resume()` right after `Bun.spawn`. Until the shell has exec'd, `/proc/<pid>/cmdline` can still show the parent's argv or read empty mid-exec, so `identifyProcess()` threw `Could not verify the identity of recorded Portal process <pid>`. It failed Fast checks on main twice today (runs 39733017457 after #1590 and 39734683255 after #1594; the runs in between passed). The test dates from #746; it started showing up under today's CI load. The shell now prints `READY` before its loop and the test waits for that line (bounded) before resuming, the same fix #1419 made for the sibling interpreter test. No production code changes. ## Validation - `HERDR_TEST_MODE=unit bun test server/portal.test.ts`: 38 pass, 0 fail, three runs in a row. Test-only change: no changelog fragment, no CodeRabbit re-review needed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <[email protected]>
Change
server/portal.test.ts"does not treat an arbitrary interpreter as a Portal script" read/proc/<pid>/cmdlineas soon as the child was alive. Right afterBun.spawnthe child can still show the parent's argv until the interpreter has started the script, so the test failed intermittently on CI (Fast checks on #1407, #1360 and #1352 today; each passed on rerun).The fixture script now prints
READYonce it runs, and the test waits for that line (bounded, 2 s) before reading argv. No production code changes.This is the test commit from #1407 (dbdc8d1), split out so other PRs stop failing on it while #1407 is still in review.
Validation
HERDR_TEST_MODE=unit bun test server/portal.test.ts: 31 pass, 0 fail, three runs in a row.