ReviewOS

also looking at this

stacks/rpx

fix(test): stop a leaked spawn mock hanging the gateway CLI tests (#2267), pin forwarded headers (#2265)

#2268
Merged chris wants to merge fix/2265-2267-proxy-header-and-cli-coverage into main
4 files +57 -4
packages/rpx/test/process-manager.test.tsmodified+9-1
Changes to packages/rpx/test/process-manager.test.ts
@@ -45,7 +45,15 @@ describe('ProcessManager', () => {
4545 })
4646
4747 afterEach(() => {
48 // No cleanup needed - Bun's spyOn handles cleanup automatically
48 // Bun's spyOn does NOT restore on its own, and the `childProcess.spawn` spy
49 // above is installed on the shared module object — so without this it stays
50 // installed for every test file that runs after this one in the same `bun
51 // test` process. Anything spawning a subprocess then gets the stub back
52 // (pid 12345, no-op `on`/`stdout.on`), so its child never starts, never
53 // prints and never exits: #2267, where `rpx --help` appeared to hang on
54 // Linux CI purely because bun's file order happened to put this file first
55 // there. Restore, and keep it restored.
56 mock.restore()
4957 })
5058
5159 describe('isRunning', () => {