diff --git a/.changeset/vercel-hook-min-retention.md b/.changeset/vercel-hook-min-retention.md new file mode 100644 index 0000000000..a0e232c7ad --- /dev/null +++ b/.changeset/vercel-hook-min-retention.md @@ -0,0 +1,5 @@ +--- +'@workflow/world-vercel': minor +--- + +Support Hook minimum retention on Vercel. diff --git a/docs/content/worlds/v5/vercel.mdx b/docs/content/worlds/v5/vercel.mdx index fd89c4e284..100e3973f8 100644 --- a/docs/content/worlds/v5/vercel.mdx +++ b/docs/content/worlds/v5/vercel.mdx @@ -91,6 +91,7 @@ const run = await start(myWorkflow, [input], { region: "sfo1" }); ## Limitations - **No run migration** - A run's region is fixed at creation. Existing runs cannot be moved to a different region. +- **Hook minimum retention** - [`experimental_minRetention`](/docs/api-reference/workflow/create-hook#keep-a-token-unavailable-after-the-run-ends) cannot exceed 30 days. ## Observability diff --git a/packages/core/e2e/e2e.test.ts b/packages/core/e2e/e2e.test.ts index abb659774a..18b0650099 100644 --- a/packages/core/e2e/e2e.test.ts +++ b/packages/core/e2e/e2e.test.ts @@ -2099,7 +2099,7 @@ describe('e2e', () => { } ); - test.skipIf(!isLocalDeployment())( + test( 'hookMinRetentionWorkflow - terminal Hook cannot resume and its token stays unavailable', { timeout: 60_000 }, async () => { diff --git a/packages/world-vercel/src/index.ts b/packages/world-vercel/src/index.ts index 7d42a8b6ec..b93d30ccc1 100644 --- a/packages/world-vercel/src/index.ts +++ b/packages/world-vercel/src/index.ts @@ -33,6 +33,7 @@ export function createWorld(config?: APIConfig): World { // those payloads opaquely, and v5 remains a superset of v4 attributes. specVersion: SPEC_VERSION_SUPPORTS_COMPRESSION, capabilities: { + hookRetention: { active: true }, // workflow-server enforces the `stateUpdatedAt` optimistic-concurrency // guard: creations carrying a stale snapshot are rejected with 412 // (PreconditionFailedError) when the run's outside-event marker is