Skip to content

[pull] main from vercel:main#225

Merged
pull[bot] merged 4 commits intoerickirt:mainfrom
vercel:main
Mar 3, 2026
Merged

[pull] main from vercel:main#225
pull[bot] merged 4 commits intoerickirt:mainfrom
vercel:main

Conversation

@pull
Copy link

@pull pull bot commented Mar 3, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

ijjk and others added 4 commits March 3, 2026 11:17
* Setup fixes

* ci: run local e2e against staged tarball workbenches

* ci: update staged workbench tarball setup script

* chore: set nextjs workbenches back to next 16.1.6

* update lock

* test(e2e): resolve workbench path from WORKBENCH_APP_PATH

* fix: address deferred builder issues outside monorepo

* ci: stage tarball workbenches only for nextjs local e2e

* fix(next): discover deferred steps imported via workflows

* test(core): gate deferred step-discovery dev test to canary

* test(e2e): cover cross-file imported step in build/start lanes

* fix(e2e): use local manifest in local runs and relax dev rebuild timeout

* fix(workbench): add imported-step workflow symlink for sveltekit/astro

* test(e2e): scope imported-step workflow test to nextjs lanes

* fix(next): rebuild deferred entries on discovered file updates

* fix(next): watch transitive deferred step deps for dev rebuilds

* fix(next): restore socket-driven deferred step rebuilds

* add changeset

* chore: address review feedback on deferred e2e updates

* fix(cli): guard stream flush against closed write streams
…esolve/lazy wire schemas (#1222)

* Fix run_failed event schema validation failure in lazy ref mode

The EventResultWireSchema used the strict WorkflowRunSchema (discriminated
union) which requires error: StructuredErrorSchema for status 'failed'. When
run_failed events use remoteRefBehavior 'lazy', the server returns the error
field as a RemoteRef or undefined, causing Zod validation to fail.

Switch to WorkflowRunWireBaseSchema which accepts error as string, structured
object, or undefined, and apply deserializeError() to normalize the run entity
before returning it to consumers.

Closes #1180

* Use strict WorkflowRunSchema for resolve mode, loose wire schema for lazy mode

Split EventResultWireSchema into two variants based on remoteRefBehavior:
- EventResultResolveWireSchema uses WorkflowRunSchema (discriminated union)
  for events where the client reads result.run (run_created, run_started,
  step_started), preserving type safety.
- EventResultLazyWireSchema uses WorkflowRunWireBaseSchema for events where
  the client discards the response, allowing error to be a string or
  undefined in lazy ref mode.

* Update changeset to reflect resolve/lazy schema split

* Simplify changeset description
…g order (#1246)

* fix(core): ensure async deserialization resolves promises in event log order

Add a sequential deserializationChain to WorkflowOrchestratorContext that
ensures step/hook hydration resolves in event log order even when individual
deserialization takes variable time (e.g. due to encryption/decryption).

Without this, concurrent async hydrations could resolve out of order,
breaking workflow replay determinism.

* test: add hook ordering test and afterEach mock cleanup

Address review feedback:
- Add hook-specific deserialization ordering test
- Add afterEach(vi.restoreAllMocks) to prevent spy leaks
- Remove manual mockRestore calls

* refactor(core): route all promise resolutions through sequential promiseQueue

- Rename deserializationChain -> promiseQueue (it now handles all
  event-driven promise resolutions, not just deserialization)
- Route step_failed, step_created corruption, unexpected event type,
  and null event suspensions through promiseQueue in step.ts
- Route hook_conflict, unexpected event type, null event suspensions,
  dispose suspensions, and eventLogEmpty suspensions through
  promiseQueue in hook.ts
- Route wait_completed and unexpected event type through promiseQueue
  in sleep.ts
- Remove all setTimeout(0) calls from step.ts, hook.ts, and sleep.ts
- Add stress tests: mixed step_completed/step_failed, 10 concurrent
  steps, sleep+step interleaving, interleaved concurrent steps

* fix: route createHookPromise conflict rejection through promiseQueue

- The hasConflict path in createHookPromise() was rejecting immediately,
  bypassing the promiseQueue and potentially settling out of event-log
  order relative to prior queued resolutions.
- Add missing runId and encryptionKey to sleep.test.ts context stub.
@pull pull bot locked and limited conversation to collaborators Mar 3, 2026
@pull pull bot added the ⤵️ pull label Mar 3, 2026
@pull pull bot merged commit 860531d into erickirt:main Mar 3, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants