Repository navigation
Conversation
…nic red lanes Nitro's Vercel node entry redefines req.socket.remoteAddress on every request without configurable: true, so a reused socket throws and the express and fastify workbench deployments answer 500. Patch it. Also: give the forked-writers world-local test room on Windows, fail (rather than cancel) a community-world lane that hangs, and stop the Python workbench project from deploying a branch without that app. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Pranay Prakash <pranay.gp@gmail.com>
Contributor
Contributor
🧪 E2E Test Results❌ Some tests failed Summary
❌ Failed Tests🌍 Community Worlds (36 failed)mongodb (12 failed):
redis (12 failed):
turso (12 failed):
Details by Category✅ ▲ Vercel Production
✅ 💻 Local Development
✅ 📦 Local Production
✅ 🐘 Local Postgres
✅ 🪟 Windows
❌ 🌍 Community Worlds
✅ 📋 Other
|
🦋 Changeset detectedLatest commit: 81922b5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
…ty-world overruns Unit job: build packages in their own step, so a turbo cache miss no longer runs package builds alongside the test suites on a 4-core runner. The forked-writers test keeps its 30s budget and now fails at once, with the exit code and stderr, when a writer process dies. Community-world lanes: give Turso an absolute database path, start and preflight every world, run MongoDB as a replica set, leave out tests that depend on a contract the published packages do not implement, and bound the E2E step below the job timeout. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Pranay Prakash <pranay.gp@gmail.com>
A step wrote step_completed without waiting for the stream writes it had requested, and request.respondWith() resolved before its Response reached the server. When the run then completed first, the server refused the late write and the webhook handler waited out its 120s stream limit. The step now waits, bounded at 30s and log-only, for the writes requested so far. Also abort the sink when a flushable pipe's source read fails, so the reader rejects instead of staying pending. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Pranay Prakash <pranay.gp@gmail.com>
This branch was successfully deployed
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.
What
Fixes what keeps CI red on
stable, at the cause where the cause is in this repository.@workflow/core: a step's stream writes could arrive after the run completed and be dropped. A step now waits for the stream writes it requested before writing its terminal event. This is what hungwebhookWorkflowon the astro Vercel lane.@workflow/core: a failed stream read left the reader pending forever. The reader now rejects.remoteAddressredefinable on keep-alive sockets nitrojs/nitro#5178.workbench-python-workflowVercel project failed on everystablecommit.workbench/python/vercel.jsonturns Git deployments off for this branch, which has no Python workbench.No test timeout is raised: the forked-writers test is back to its 30s budget.
Reviewers: the first item is a runtime behaviour change on the maintenance branch. It is its own commit (
[core] Settle a step's stream writes before its terminal event); see "Cost and divergence from main" below.Why
1. Step stream writes (
E2E Vercel Prod Tests (astro)onb0a1907df, failed the required check)webhookWorkflowtimed out at 120s although its run completed in 6s.step_completedwithout waiting for the stream writes it had requested, andrequest.respondWith()resolved before its Response had been written to the server.The 409 and the 120s gap were read from the server and deployment logs for that run. The hang has not been reproduced end to end on a Vercel deployment.
Fix. Before a step writes its terminal event, whether it returned or threw, it waits for the stream writes requested so far to be confirmed by the server: awaited and un-awaited writes, and requested closes, on writables passed as arguments and on those from
getWritable().request.respondWith()resolves only once the Response and its body are written. The wait is capped at 30s; a failed or timed-out wait is logged and never fails the step.Cost and divergence from main.
respondWith()This is not a backport of #3941 (
main's "drain step stream writes before completion"). That mechanism lives instep-executor.tsand depends on codestabledoes not have, would need at least #4387, #4605 and #4667 with it, and does not makerespondWith()wait, so it would not fix the webhook.mainstill has therespondWith()hole and needs a follow-up.2. Stream read errors
flushablePiperejected its own promise on a source error but never aborted the sink. A consumer reading the other side of a transform (run.getReadable()) stayed pending forever.mainalready aborts the sink here. Found through the community-world lanes, where a world's stream read throws on a negative start index and the test then waited out its 60s deadline.3. Unit job (
Unit Tests (windows-latest), forked-writers test timing out at 30s)pnpm testbuilds each test task's package dependencies in the same turbo run as the tests. On a turbo cache miss those builds share the 4-core runner with the test suites.stablesince the test landed, it timed out four times; all four jobs were executing builds.The test also had no handling for a writer process that dies, so it could only fail by timing out. It now fails at once with the exit code and stderr, and any failure prints how far each writer got.
4. Community-world lanes
These are third-party packages, last published in February, and already non-blocking. Three of the last six pushes to
stablestill concludedcancelledbecause a lane ran into the job timeout, whichcontinue-on-errordoes not absorb.file:database path, so the test process opened a second, empty database (no such table){ timeoutSeconds: 0 }from a flow handler, so affected tests wait out their 60–120s deadlinesknownGapsentry per world, reported as skipped with the reason5. Nitro and the Python workbench
See #5682 for the Nitro diagnosis; the patch and its removal condition are the same. The Python workbench exists only on
main, but its Vercel project builds every branch and failed on "Root Directory does not exist".Not fixed here
stepFunctionPassingWorkflowon0acc0ddf5) was a 503 on the queue push with redelivery about five minutes later. That is on the platform side and can still fail the lane.stable; that is being handled separately.How did you test your changes?
Core
step-streams.test.ts,step-handler.test.ts,flushable-stream.test.ts,serialization.test.tsandflushable-stream-source-error.test.ts. They cover awaited and un-awaited writes, held writers, closes, a step that throws, a backend that hangs (bounded) and one that fails (logged).@workflow/coreunit suite: 54 files, 982 tests pass.tscclean.Unit job and forked-writers test
stream-chunk-place.test.ts: 8 tests pass. Making the child exit or throw fails the test in about a second with the exit code and stderr.Community-world lanes
failureand the Tests run concludedsuccess, which is the bound working.Nitro and Python
workbench-python-workflowstatus no longer reports a failed deployment.PR Checklist - Required to merge
pnpm changesetwas run to create a changelog for this PR (two@workflow/corepatches, plus an empty one for the workbench and CI changes)git commit --signoffon your commits)@vercel/workflowin a comment once the PR is ready, and the above checklist is completeWritten by Claude Fable 5.2
🤖 Generated with Claude Code