Repository navigation
fix(ui-e2e): studio-customize-journey reads open their own connection instead of a stale keep-alive socket - #30555
Merged
objectstack-fleet[bot] merged 4 commits intoNov 5, 2026
Conversation
…ff the keep-alive pool The spec's API reads are split by Studio steps the browser drives, and Playwright's request context reuses a pooled keep-alive socket across them. The read after the customize step reaches that socket after about five seconds idle, against a Node 22 server that closes idle sockets at six, so on a slower runner the read hits a socket the server is closing and fails with read ECONNRESET. The spec's request fixture now sends Connection: close, so every read opens its own connection. Every assertion is unchanged. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ihL2ebbZkr2QAEG1x7UC8
…udio-journey-reset
…request context by name The spec's request fixture override built its context from extraHTTPHeaders alone and relied on the runner filling in every option the call leaves out. It now passes the project's request-relevant use options explicitly (storageState, baseURL, userAgent, extraHTTPHeaders, ignoreHTTPSErrors), merging Connection: close into any extra headers, so the reads run as the signed-in admin session by declaration rather than by default. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ihL2ebbZkr2QAEG1x7UC8
…oks lint rule does not read it as React's use Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017ihL2ebbZkr2QAEG1x7UC8
Contributor
Author
|
domain:devx#2 · marchtian · session_017ihL2ebbZkr2QAEG1x7UC8 席位核对 — ACCEPT ·
|
objectstack-fleet
Bot
deleted the
claude/issue-30524-studio-journey-reset
branch
November 5, 2026 16:41
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.
Requested by 田騏 · project thread
Fixes #30524
Clause-②: no
Metadata-protocol: none
维护者速读
studio-customize-journey这条在线 e2e 的接口读取,每次都新开一条连接(Connection: close),不再复用空闲了几秒的旧连接;断言一条没动。read ECONNRESET,把无关的绿 PR 踢出队列、拖累后面整队重跑。实测原因是测试客户端复用了一条快要被服务器按空闲超时(6 秒)关掉的连接,不是服务器出错。ui/e2e/live/studio-customize-journey.spec.ts顶部新增的requestfixture 及其注释(唯一改动处)。Live E2E UI检查,应为绿色,日志里studio-customize-journey.spec.ts一行为 ✓。What changes
ui/e2e/live/studio-customize-journey.spec.tsoverrides therequestfixture for this spec only: the context isplaywright.request.newContext({ extraHTTPHeaders: { Connection: 'close' } }), so every API read the spec makes opens itsown connection and none rides a pooled keep-alive socket. The config's
storageStateand other context options stillreach it (the runner fills every option the call does not name). The browser's traffic is unchanged. Every assertion,
step and cleanup is unchanged.
Cause (measured)
APIRequestContextpools sockets withhttp.Agent({ keepAlive: true })and no agenttimeout.With no agent timeout, Node's agent does not apply the server's
Keep-Alive: timeout=5hint, so a pooled socket iskept until the server closes it.
@hono/node-serveron Node 22, default options) answerskeep-alive: timeout=5and closes an idlesocket at
keepAliveTimeout5000 +keepAliveTimeoutBuffer1000 = 6000 ms (both read fromhttp.createServer()on Node 22.23.4).threeReads, theservedColumnsGET) reuses the socket ofthe read before the browser steps. A client-side socket trace measured its idle at 4710–5153 ms on 5 solo runs
and 4785–5010 ms on 3 runs of the full CI allowlist. That is the largest idle of any API read in the allowlist,
and it is about one second short of the server's close. A slower runner pushes it onto 6 s.
apiRequestContext.get: read ECONNRESET(3) orsocket hang up(4). WithConnection: close: 0 of 40.at the same call,
servedColumnsfromthreeReadsat spec line 159, right afterpublishPair. The test dies at6.5–6.6 s, 16 others pass, and the backend pid recorded at boot is the pid stopped at the end. The next spec passes
within 4 s, while a backend boot takes 14 s. So nothing restarted the server: one pooled socket was reset.
Tests
The fixed spec ran 12/12 green against a stack booted the way the
Live E2E UIjob boots it (start-backend.sh,vite previewproxying/api,--retries 0). The derived gate commands ran beside it, so the box was loaded. A sockettrace of the fixed spec shows 19 fresh connections and 0 reused. The unfixed spec showed 16 reused per run, the
largest idle 5153 ms.
Spec run, fixed head e8662a4, --repeat-each 12 (list lines condensed)
Real backend, the spec's GET after an idle of N ms, 10 tries each
Unfixed spec: reused-socket idle before each read (ms), full allowlist x3
Acceptance notes
5 s, under the server's 6 s close. The failure was reproduced at the socket level against the real backend (above).
backend.logcould not be read from the measuring container: the artifact blob host is refused byits egress proxy. The no-restart reading rests on the job logs: the same pid at boot and at stop, and the next spec
passing.
(
studio-editor,studio-object-designer). They are under the 6 s close today, so this PR leaves them unchanged.carrier: none.
Verification
node scripts/pm/dispatch-gates.mjs --commandsderived 19 commands for this diff. All 19 ran locally, each exit codecaptured before any pipe, and
--ranreconciles them. The per-gate readings are on the issue'sos-dev-reportcomment.
ui/e2e/live/**, which no package'sfiles[]ships (ui/package.jsonis theprivate
object-ui-monorepo), so the PR carriesskip-changeset.🤖 Generated with Claude Code