Fix two CI e2e flakes: stylesheet-count race and dev-db queue wedge - #1656
Merged
Conversation
Contributor
Cloudflare previewTorn down — the PR is closed. |
@executor-js/cli
@executor-js/config
@executor-js/execution
@executor-js/sdk
@executor-js/codemode-core
@executor-js/runtime-quickjs
@executor-js/plugin-file-secrets
@executor-js/plugin-graphql
@executor-js/plugin-keychain
@executor-js/plugin-mcp
@executor-js/plugin-onepassword
@executor-js/plugin-openapi
executor
commit: |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
executor-marketing | 4992122 | Commit Preview URL Branch Preview URL |
Aug 18 2026, 04:24 PM |
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.
Three independent flakes, all seen on PR #1648's CI run and both reproducible on main.
Artifacts stylesheet-count race (E2E cloud shard 2)
artifacts.test.tsasserteddocument.styleSheets.lengthis unchanged after opening an artifact. The count moves on its own in dev: TanStack Start swaps its route-styles<link>as route matches settle, and the swapped-in link only counts once loaded, so the assertion raced it (expected 3 to be 4).The shell's tokens now deliberately mirror the console's, so no token name or value can identify its stylesheet either. The shell's compiled stylesheet now declares a provenance marker (
--mcp-apps-shell-stylesheet: 1on:root), and the test asserts the computed marker is present inside the shell document and absent from the console document — deterministic in both directions.dev-db socket wedge (E2E cloud shard 5 cascade)
The
cloud signIn: callback set no session (500)cascade:PGLiteSocketServer's query queuereturned out of its drain loop when a query rejected at the JS level, leaving itsprocessingflag latched true. After one such throw nothing was ever dequeued again — in-flight requests hung, new connections' startup packets sat unanswered (CONNECT_TIMEOUT), and the stack was bricked for the rest of the run. The patch now rejects the one entry, drops pipeline affinity, and keeps draining.Also in the patch:
idleTimeoutbackstop only reaps connections actually holding queue affinity (open pipeline or transaction). It used to kill any 30s-idle connection — the resting state of every healthy postgres.js pool held by a long-lived scope — which raced live queries into sporadicwrite CONNECTION_ENDED500s.detach()rejections from error/close handlers no longer become unhandled rejections.Regression tests in
dev-db-socket-concurrency.node.test.tscover the wedge (fails withCONNECT_TIMEOUTon the unpatched code), idle-at-rest survival, and the backstop still reaping a client stalled mid-pipeline.Verified:
lint,typecheck, mcp-apps-shell package tests (82), andvitest run --project cloud scenarios/artifacts.test.ts(4 scenarios) all pass locally.tool-invoker discovery-shape timeout (Test job)
describes built-in discovery tool shapes that accept their runtime outputruns three sandboxeddescribe.toolround-trips plus three type-checks of the described contracts under vitest's 5s default and timed out at 5.6s on a loaded runner. Raised to the{ timeout: 10000 }ceiling the file's other sandbox-heavy tests already use.