Repository navigation
fix(browser): stop 500ing every request on Node 24; update stale codex model test - #169
Merged
Merged
Conversation
…x model test Node 24 defines IncomingMessage#signal as a getter-only property, so the browser Express middleware assignment req.signal = ctrl.signal threw and every request to the browser control server / sandbox bridge got HTTP 500. Shadow it with an own property instead. This was 19 of the 20 real checks (node, test) failures on main since #154 moved CI to Node 24. The 20th: #156 made any unknown openai-codex id resolve via forward-compat, so the test that expected gpt-4.1-mini to error now asserts it resolves. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
checks (node, test)on main has 20 real test failures in 6 files. This is not the random heap OOM: each failure is printed. Seen on #168 (run 36471996299, job 109096808770), whose diff is onlydocker-compose.ymlandSTATUS.md. Main's own push CI never ran these tests, becausecheckwas red onSTATUS.mdformatting until #168.Cause 1: a real code bug (19 failures, 5 files)
Files:
src/browser/bridge-server.auth.test.ts,server.agent-contract-form-layout-act-commands.test.ts,server.agent-contract-snapshot-endpoints.test.ts,server.evaluate-disabled-does-not-block-storage.test.ts,server.post-tabs-open-profile-unknown-returns-404.test.ts.Every request got HTTP 500 (an Express HTML error page, hence the
"<!DOCTYPE "... is not valid JSONerrors).Node 24 added
IncomingMessage#signalas a getter-only property.installBrowserCommonMiddlewaredidreq.signal = ctrl.signal, which throws in strict mode, on every request:CI and the
Dockerfilemoved to Node 24 in #154 (2026-09-06). The DevAgents host runs Node 22, which is why plainvitest runthere is green. Every gateway image built since #154 has this bug (livesocial-bobgateway reportsv24.20.0). It hits the Express browser servers: the sandbox browser bridge and the gateway browser control server.Fix:
Object.defineProperty(req, "signal", { value: ctrl.signal, configurable: true }). An own property shadows Node's getter. It keeps the same meaning as before: abort only when the client disconnects. Readers (routes/agent.act.ts,routes/dispatcher.ts) are unchanged.Cause 2: a stale test (1 failure)
model.test.ts› "keeps unknown-model errors for non-gpt-5 openai-codex ids". #156 made any unknownopenai-codexid resolve through codex forward-compat, on purpose. The test now asserts that new contract:gpt-4.1-miniresolves withapi: openai-codex-responses, and no error.Validation
node:24-bookworm(Docker on DevAgents) with the same 500s.vitest run src/browser src/agents/pi-embedded-runner/model.test.ts→ 36 files, 260 tests green on node:24 and on node 22.pnpm canvas:a2ui:bundle && pnpm test) on node:24: main suite 802/803. The one left issrc/plugins/discovery.test.ts(uid-mismatch), which trips because the test ran as root in Docker; it passes in CI. The extensions suite had missing per-extensionnode_modulesin my worktree (e.g.Cannot find package 'nostr-tools'), which is a setup gap, not code; CI passes those 122 files.oxfmt --checkandoxlintclean on the changed files.tscshows no errors in them (only pre-existing errors in files this PR does not touch).Not fixed here
The fleet needs a new gateway image for the browser fix to reach agents. That is an owner decision (
build-and-push.sh→deploy.sh).Known red baseline to ignore: install-smoke, label, label-issues, checks (bun, test), checks-windows (node, test).
🤖 Generated with Claude Code