Workers Builds auto-deploy + fix dodo-verify SSE flake#51
Closed
jonnyparris wants to merge 2 commits intomainfrom
Closed
Workers Builds auto-deploy + fix dodo-verify SSE flake#51jonnyparris wants to merge 2 commits intomainfrom
jonnyparris wants to merge 2 commits intomainfrom
Conversation
The 'experimental' compat flag is fine for wrangler deploy — only wrangler versions upload rejects it (code 10021). Re-enabled Workers Builds with a single 'Deploy default branch' trigger on main running 'npm run build && npx wrangler deploy'. The non-production preview trigger that was failing on every PR push has been deleted (it ran versions upload, which is the only command that hits the experimental flag block). PR validation continues to run via .github/workflows/dodo-verify.yml (typecheck + test). Manual deploy still works.
Two TransformStream-based SSE handlers (UserControl.openUserEventStream
and CodingAgent.openEventStream) were doing fire-and-forget writes
without .catch() handlers. When a client disconnected before the first
write resolved, the readable side tore down and writer.write() rejected
with 'The readable side of this TransformStream is no longer readable'.
With no handler attached, vitest treated it as an unhandled rejection
and failed the run despite all 642 tests passing.
Also fixed the close() teardowns: 'try { void writer.close(); } catch'
only catches synchronous throws, but close() returns a promise that can
reject async. Switched to .catch().
Verified: 3 consecutive clean runs in the worktree after the fix.
Previously the flake hit roughly 50% of CI runs.
Carrying this on the docs PR because it's blocking that PR's merge.
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.
Summary
Two changes:
Workers Builds re-enabled for dodo with a single
Deploy default branchtrigger onmainrunningnpm run build && npx wrangler deploy. The non-production preview trigger that was failing on every PR push has been deleted via API (it ranwrangler versions upload, which is the only command that hits theexperimentalflag block, code 10021). README + AGENTS.md updated to reflect that auto-deploy is live;wrangler deploydoesn't reject experimental flags, onlyversions uploaddoes.Fix SSE TransformStream unhandled rejection that was flaking
dodo-verify.ymlon roughly half of CI runs. Two handlers (UserControl.openUserEventStream and CodingAgent.openEventStream) did fire-and-forget writes without.catch(). When a client disconnected mid-write, the rejection surfaced as an unhandled rejection and vitest failed the run despite all 642 tests passing. Also fixedtry/catcharoundvoid writer.close()— that pattern only catches sync throws but close() returns a promise, so switched to.catch().The flake fix was carried on this PR because it was blocking the docs from merging. Closes the operational fallout from #46.
Test plan
mainshould trigger theDeploy default branchbuild and deploy successfully.dodo-verify.ymltypecheck/test signal — which should now be reliably green.beep-boop-🤖