Repository navigation
Fix stream spacing and encrypted abort previews - #5079
Merged
Merged
Conversation
Signed-off-by: Karthik Kalyanaraman <karthik.kalyanaraman@vercel.com>
Contributor
🦋 Changeset detectedLatest commit: 5cef793 The changes in this PR will be included in the next version bump. This PR includes changesets to release 17 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 |
Contributor
Sim WorldSimulated world deterministic testing for races. Traces 🟢 world-sim scenario book — 0 fail of 44 total
Full trace: |
Signed-off-by: Karthik Kalyanaraman <karthik.kalyanaraman@vercel.com>
2 of 3 tasks
Signed-off-by: Karthik Kalyanaraman <karthik.kalyanaraman@vercel.com>
alangenfeld
approved these changes
Oct 26, 2026
alangenfeld
left a comment
Collaborator
There was a problem hiding this comment.
LGTM, and scoping unframed detection to _system_abort streams is a nice tightening.
Local agent review (`anthropic/claude-opus-5.5`)
Merged
github-actions Bot
added a commit
that referenced
this pull request
Oct 26, 2026
Encrypted `_system_abort` streams currently appear as garbled text without a Decrypt prompt. Recognize the unframed serialization prefix only for internal `_system_abort` streams, keep the packet binary across network chunks, and send the complete packet through the existing hydration/decryption path when the response ends. Writers, encryption, and the stored format remain unchanged. Also enforce a 40px minimum height for stream-list rows, including loading and empty states. The SDK sidebar already preserves that height through block layout; the explicit minimum is defensive hardening. - All 14 focused SDK hook tests pass. They cover unframed symmetric/sealed packets with and without keys, split prefixes and ciphertext, plaintext serialized packets, framed packets, legacy JSON/text, and stream status. - Temporarily restored the original reader: five unframed-packet cases fail. Restoring the fix makes the suite pass. - Tests use a temporary Vitest configuration pointing to real SDK serialization, encryption, and hydration sources, with the stream API mocked. Native monorepo builds and full-app validation remain for CI. - Ordinary user streams beginning with `encrypted`, `encp`, or `devl` remain legacy text; all three regression cases fail against the previous reader and pass with the fix. - Biome and changeset validation pass, with reader complexity warnings. The isolated browser layout check retains 40px rows and scrolling across 18 post-change cases with synthetic stream IDs. [Workflow viewer preview](https://workflow-web-git-codex-fix-stream-list-spacing-20261026.labs.vercel.dev) is deployed for commit `5cef79340`. Its server environment determines which runs it can access; this preview has not been confirmed to have access to Evo production runs. The same reader fix is in Front PR #93733. Existing Evo screenshot cases can be reviewed through that preview: - [Abort-decryption screenshot case](https://vercel-site-3ve3lf66d.vercel.sh/vercel/evo/workflows/runs/wrun_41M5W0T9H720R0C3401RN2GKBZ?environment=production&tab=streams): select a `_system_abort` stream and verify Decrypt is offered and displays the abort payload. - [Spacing and regular user-stream case](https://vercel-site-3ve3lf66d.vercel.sh/vercel/evo/workflows/runs/wrun_41M5NKVBJE20SK5FDGDMCW214E?environment=production&tab=streams): verify row height, scroll to the final stream, and confirm `_user` still decrypts. Authenticated UI verification remains incomplete because the browser connection fails before it can list tabs. HTTP checks confirm the Front links redirect to normal Vercel sign-in; they do not verify rendering or decryption. - [x] 📦 A patch changeset for `@workflow/web` is included. - [x] 🔒 DCO sign-off is included in the commits. - [ ] 📝 Maintainer review. --------- Signed-off-by: Karthik Kalyanaraman <karthik.kalyanaraman@vercel.com> Signed-off-by: Karthik Kalyan <105607645+karthikscale3@users.noreply.github.com>
Contributor
|
Backport PR opened against |
VaguelySerious
added a commit
that referenced
this pull request
Oct 26, 2026
Brings in #5041, #5053, #5079, #5081 and #5085. Conflicts: - spec8/quickjs-entrypoint.ts, spec8/suspension-handler.ts: kept the branch side. The abort-stream writes main framed (#5081) live in the shared quickjs-pending-ops.ts and suspension-hooks.ts on this branch, so frameAbortStreamPayload is applied there. - spec8/suspension-handler.test.ts: kept both sides (main's framing test plus the branch's import paths). - step-single-flight.ts: the branch's generic runSingleFlight takes an optional rerunAfter(winner) predicate; spec8's wrapper passes winner.type === 'skipped', which is main's #5053 fix. Spec 9 decisions: - #5081 abort framing: ported. Both specs share quickjs-pending-ops.ts and suspension-hooks.ts, so the framed write covers spec 8 and spec 9. The spec 9 step executor now passes framedAbortStreams=true like spec 8's (same-deployment reader). Main's spec 8 suspension-handler framing test is mirrored in spec9/suspension-handler.test.ts; quickjs-lifecycle.test.ts already targets the spec 9 entrypoint. - #5053 skipped single-flight winner: not ported. Spec 9 has no `skipped` step outcome, and its loser returns `throttled`, keeping its message and redelivering after STEP_SINGLE_FLIGHT_REDELIVERY_SECONDS, so a winner that ran nothing cannot strand the step. - #5041 (serialization.ts), #5079 (web), #5085 (ci), and the #5053 world-postgres change are outside the spec split; merged as-is. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
karthikscale3
pushed a commit
that referenced
this pull request
Oct 27, 2026
Automated backport of #5079 to `stable` ([backport job run](https://github.com/vercel/workflow/actions/runs/40406682899)). **AI recommendation:** This is a patch-level bug fix to the Streams viewer in `@workflow/web`: encrypted `_system_abort` streams render as garbled text with no Decrypt prompt because the reader only recognizes framed payloads. The defect exists on `stable` too — `packages/web/app/lib/hooks/use-stream-reader.ts` there still has `type StreamEncoding = 'framed' | 'legacy'` and the same `detectEncoding` — and the fix reuses the existing hydration/decryption path without changing writers, encryption, or the stored format. The accompanying `min-h-10` row-height change is defensive CSS hardening in a file that also exists on `stable`, and the commit adds regression tests for the legacy text cases. Merge conflicts were resolved by AI ([opencode](https://opencode.ai) with `anthropic/claude-opus-5`). **Please review the conflict resolution carefully before merging.** Signed-off-by: Karthik Kalyanaraman <karthik.kalyanaraman@vercel.com> Signed-off-by: Karthik Kalyan <105607645+karthikscale3@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Merged
pranaygp
pushed a commit
that referenced
this pull request
Nov 4, 2026
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to stable, this PR will be updated. # Releases ## @workflow/world-postgres@4.4.0 ### Minor Changes - [#4759](#4759) [`3ff458e`](3ff458e) Thanks [@pranaygp](https://github.com/pranaygp)! - Add `jobLockStaleSeconds` (`WORKFLOW_POSTGRES_JOB_LOCK_STALE_SECONDS`, default `0`, off). When set, a running delivery renews its Graphile job lock, and a job whose process died is redelivered by another process once its lock has gone unrenewed for that many seconds, instead of after Graphile Worker's fixed 4 hours or the next restart. `30` is a good value when more than one process shares the database. It's off by default because of rolling upgrades: processes on an earlier version don't renew their locks, so turn it on once every process that shares the database runs this version. ### Patch Changes - [#5136](#5136) [`5c9b65d`](5c9b65d) Thanks [@alangenfeld](https://github.com/alangenfeld)! - A `run_started` that races the run ending no longer moves the run back to `running`; it's refused with `RunExpiredError`. - Updated dependencies [[`ceaaa5c`](ceaaa5c), [`b065b0b`](b065b0b)]: - @workflow/world-local@4.4.5 ## @workflow/astro@4.0.31 ### Patch Changes - Updated dependencies [[`e4dbc29`](e4dbc29)]: - @workflow/builders@4.1.21 - @workflow/rollup@4.0.31 - @workflow/vite@4.0.31 ## @workflow/builders@4.1.21 ### Patch Changes - [#5063](#5063) [`e4dbc29`](e4dbc29) Thanks [@joelfickson](https://github.com/joelfickson)! - Export `workflowSerdeComputedPropertyPattern` alongside the other workflow pattern regexes. - Updated dependencies []: - @workflow/core@4.8.16 ## @workflow/cli@4.3.20 ### Patch Changes - [#5182](#5182) [`f3d6142`](f3d6142) Thanks [@VaguelySerious](https://github.com/VaguelySerious)! - Respect `--project` and `--team` over the inferred `.vercel` link, and prefer the nearest `.vercel/project.json` in monorepos - Updated dependencies [[`e4dbc29`](e4dbc29), [`dbfd1ba`](dbfd1ba), [`ceaaa5c`](ceaaa5c), [`b065b0b`](b065b0b)]: - @workflow/builders@4.1.21 - @workflow/web@4.1.32 - @workflow/world-local@4.4.5 - @workflow/core@4.8.16 ## @workflow/core@4.8.16 ### Patch Changes - Updated dependencies [[`ceaaa5c`](ceaaa5c), [`b065b0b`](b065b0b)]: - @workflow/world-local@4.4.5 ## @workflow/nest@4.0.32 ### Patch Changes - Updated dependencies [[`e4dbc29`](e4dbc29)]: - @workflow/builders@4.1.21 ## @workflow/next@4.1.20 ### Patch Changes - [#5063](#5063) [`e4dbc29`](e4dbc29) Thanks [@joelfickson](https://github.com/joelfickson)! - Run the Turbopack workflow loader on files that use `static [WORKFLOW_SERIALIZE]` computed keys (such as `@ai-sdk/openai` models), fixing "Class … not found" errors in steps. - Updated dependencies [[`e4dbc29`](e4dbc29)]: - @workflow/builders@4.1.21 - @workflow/core@4.8.16 ## @workflow/nitro@4.1.22 ### Patch Changes - Updated dependencies [[`e4dbc29`](e4dbc29), [`dbfd1ba`](dbfd1ba)]: - @workflow/builders@4.1.21 - @workflow/web@4.1.32 - @workflow/rollup@4.0.31 - @workflow/vite@4.0.31 - @workflow/core@4.8.16 ## @workflow/nuxt@4.0.32 ### Patch Changes - [#5211](#5211) [`d30f07e`](d30f07e) Thanks [@atinux](https://github.com/atinux)! - Upgrade `@nuxt/kit` to 4.6.3 to pick up the fix for CVE-2026-71314. - Updated dependencies []: - @workflow/nitro@4.1.22 ## @workflow/rollup@4.0.31 ### Patch Changes - Updated dependencies [[`e4dbc29`](e4dbc29)]: - @workflow/builders@4.1.21 ## @workflow/sveltekit@4.0.31 ### Patch Changes - Updated dependencies [[`e4dbc29`](e4dbc29)]: - @workflow/builders@4.1.21 - @workflow/rollup@4.0.31 - @workflow/vite@4.0.31 ## @workflow/vite@4.0.31 ### Patch Changes - Updated dependencies [[`e4dbc29`](e4dbc29)]: - @workflow/builders@4.1.21 ## @workflow/vitest@4.0.32 ### Patch Changes - Updated dependencies [[`e4dbc29`](e4dbc29), [`ceaaa5c`](ceaaa5c), [`b065b0b`](b065b0b)]: - @workflow/builders@4.1.21 - @workflow/world-local@4.4.5 - @workflow/rollup@4.0.31 - @workflow/core@4.8.16 ## @workflow/web@4.1.32 ### Patch Changes - [#5079](#5079) [`dbfd1ba`](dbfd1ba) Thanks [@karthikscale3](https://github.com/karthikscale3)! - Recognize unframed serialized abort packets in the Streams viewer so encrypted packets can be decrypted. ## @workflow/web-shared@4.1.32 ### Patch Changes - Updated dependencies []: - @workflow/core@4.8.16 ## workflow@4.8.16 ### Patch Changes - Updated dependencies [[`f3d6142`](f3d6142), [`d30f07e`](d30f07e), [`e4dbc29`](e4dbc29)]: - @workflow/cli@4.3.20 - @workflow/nuxt@4.0.32 - @workflow/next@4.1.20 - @workflow/astro@4.0.31 - @workflow/nest@4.0.32 - @workflow/nitro@4.1.22 - @workflow/rollup@4.0.31 - @workflow/sveltekit@4.0.31 - @workflow/core@4.8.16 - @workflow/typescript-plugin@4.0.3 ## @workflow/world-local@4.4.5 ### Patch Changes - [#5069](#5069) [`ceaaa5c`](ceaaa5c) Thanks [@AndrewBarba](https://github.com/AndrewBarba)! - Deliver stream chunks in the order they were written. A reader that opened, or polled, while chunks were being written could get a later chunk before an earlier one, and could get a chunk twice. Writes to one stream now land in order, including a `writeToStreamMulti` group and concurrent writes, and the reader holds live chunks while it reads from disk. - [#4909](#4909) [`b065b0b`](b065b0b) Thanks [@fazxes](https://github.com/fazxes)! - Name each stream chunk as it lands, after every chunk already in the stream, so a write that stalled before landing no longer lands ahead of chunks a reader already read. ## @workflow/world-testing@4.1.31 ### Patch Changes - Updated dependencies [[`f3d6142`](f3d6142)]: - @workflow/cli@4.3.20 - workflow@4.8.16 - @workflow/core@4.8.16 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.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.
Description
Encrypted
_system_abortstreams currently appear as garbled text without a Decrypt prompt. Recognize the unframed serialization prefix only for internal_system_abortstreams, keep the packet binary across network chunks, and send the complete packet through the existing hydration/decryption path when the response ends. Writers, encryption, and the stored format remain unchanged.Also enforce a 40px minimum height for stream-list rows, including loading and empty states. The SDK sidebar already preserves that height through block layout; the explicit minimum is defensive hardening.
How did you test your changes?
encrypted,encp, ordevlremain legacy text; all three regression cases fail against the previous reader and pass with the fix.Preview verification
Workflow viewer preview is deployed for commit
5cef79340. Its server environment determines which runs it can access; this preview has not been confirmed to have access to Evo production runs.The same reader fix is in Front PR #93733. Existing Evo screenshot cases can be reviewed through that preview:
_system_abortstream and verify Decrypt is offered and displays the abort payload._userstill decrypts.Authenticated UI verification remains incomplete because the browser connection fails before it can list tabs. HTTP checks confirm the Front links redirect to normal Vercel sign-in; they do not verify rendering or decryption.
PR Checklist - Required to merge
@workflow/webis included.