Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"format": "oxfmt .",
"knip": "knip",
"lint": "oxlint .",
"prepare": "lefthook install",
"prepare": "lefthook install --reset-hooks-path",
"release": "pnpm build && changeset publish",
"test": "turbo run test",
"test:integration": "turbo run test:integration",
Expand Down
8 changes: 4 additions & 4 deletions packages/worker/src/__tests__/child-wire.inprocess.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ describe("workflow entry point — wire format against a real server", () => {
const cause = (result.error as WorkflowFailedError).cause;
expect(cause).toBeInstanceOf(ApplicationFailure);
expect((cause as ApplicationFailure).type).toBe("WorkflowOutputValidationError");
expect((cause as ApplicationFailure).message).toBe(
'Workflow "entryInvalidOutput" output validation failed: at n: Invalid input',
expect((cause as ApplicationFailure).message).toMatch(
/Workflow "entryInvalidOutput" output validation failed: at n: (?:Invalid input|expected number, received string)/,
);
});
});
Expand Down Expand Up @@ -297,8 +297,8 @@ describe("child-workflow boundary — wire format against a real server", () =>
// EFFECT 1: the send was rejected client-side with the SAME typed
// classification and message `createTypedChildSignals` produces —
// naming the child workflow, the signal, and the failing field.
expect(result.sendError).toBe(
'Child workflow "signalful" signal "note" input validation failed: at text: Invalid input',
expect(result.sendError).toMatch(
/Child workflow "signalful" signal "note" input validation failed: at text: (?:Invalid input|expected string, received number)/,
);
// EFFECT 2 (corroborating): the child's OWN completed output shows it
// never received a note.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ describe("continue-as-new against a real server", () => {
const cause = (result.error as WorkflowFailedError).cause;
expect(cause).toBeInstanceOf(ApplicationFailure);
expect((cause as ApplicationFailure).type).toBe("WorkflowInputValidationError");
expect((cause as ApplicationFailure).message).toBe(
'Workflow "invalidContinuation" input validation failed: at n: Invalid input',
expect((cause as ApplicationFailure).message).toMatch(
/Workflow "invalidContinuation" input validation failed: at n: (?:Invalid input|expected number, received string)/,
);

// EFFECT (send-side guard, not just the receive-side echo of it): the
Expand Down Expand Up @@ -275,8 +275,8 @@ describe("continue-as-new against a real server", () => {
const cause = (result.error as WorkflowFailedError).cause;
expect(cause).toBeInstanceOf(ApplicationFailure);
expect((cause as ApplicationFailure).type).toBe("WorkflowInputValidationError");
expect((cause as ApplicationFailure).message).toBe(
'Workflow "archive" input validation failed: at batchId: Invalid input',
expect((cause as ApplicationFailure).message).toMatch(
/Workflow "archive" input validation failed: at batchId: (?:Invalid input|expected string, received number)/,
);

// EFFECT (send-side guard, not just the receive-side echo of it): the
Expand Down
8 changes: 4 additions & 4 deletions packages/worker/src/__tests__/handlers.inprocess.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ describe("handler binding against a real server", () => {
const dropped = capturedLogs.find(
(l) => l.level === "WARN" && l.message.includes('Dropped signal "bump"'),
);
expect(dropped?.message).toBe(
'Dropped signal "bump": input validation failed: at by: Invalid input',
expect(dropped?.message).toMatch(
/Dropped signal "bump": input validation failed: at by: (?:Invalid input|Too small: expected number to be >0)/,
);
} finally {
restoreLogger();
Expand Down Expand Up @@ -198,8 +198,8 @@ describe("handler binding against a real server", () => {
// naming the query) — not some other failure mode (e.g. an
// unregistered handler, which would carry a different message).
expect(rejected).toBeInstanceOf(ServiceError);
expect((rejected as ServiceError).cause?.message).toContain(
'Query "describe" input validation failed: Invalid input',
expect((rejected as ServiceError).cause?.message).toMatch(
/Query "describe" input validation failed: (?:Invalid input|Too small: expected string to have >=1 characters)/,
);

await handle.signals.finish();
Expand Down
23 changes: 14 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ catalog:
vitepress: 1.6.4
vitepress-plugin-mermaid: 2.0.17
vitest: 4.1.10
zod: 4.4.3
zod: 4.5.4

peerDependencyRules:
ignoreMissing:
Expand Down
Loading