Merged
Conversation
* 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.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
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 : )