Skip to content

feat(world-local): support Hook token expiration#2866

Draft
NathanColosimo wants to merge 7 commits into
codex/hook-retention-corefrom
codex/hook-retention-local
Draft

feat(world-local): support Hook token expiration#2866
NathanColosimo wants to merge 7 commits into
codex/hook-retention-corefrom
codex/hook-retention-local

Conversation

@NathanColosimo

@NathanColosimo NathanColosimo commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • implement experimental_expires in the Local World
  • remove a Hook when its run ends while keeping the same token unavailable until the configured time
  • return the owning Run when another Hook tries to use the token
  • make explicit dispose() release the token immediately
  • preserve global token uniqueness across tags and recover missing token records from the event log

Stacked on #2865, which defines and documents the core API and event contract.

Verification

  • @workflow/world-local typecheck
  • all 466 @workflow/world-local tests
  • example workbench build: 139 steps and 147 workflows
  • Local World E2E coverage verifies that the Hook is gone while the token remains unavailable

Coverage includes completed, failed, and cancelled runs; exact-time expiration; missing owners; explicit disposal; old records without an expiration time; crash recovery; and cross-tag ownership.

Docs Preview

Page Preview
createHook() Local World support Open

@vercel

vercel Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
example-nextjs-workflow-turbopack Ready Ready Preview, Comment Jul 10, 2026 9:00pm
example-nextjs-workflow-webpack Ready Ready Preview, Comment Jul 10, 2026 9:00pm
example-workflow Ready Ready Preview, Comment Jul 10, 2026 9:00pm
workbench-astro-workflow Ready Ready Preview, Comment Jul 10, 2026 9:00pm
workbench-express-workflow Ready Ready Preview, Comment Jul 10, 2026 9:00pm
workbench-fastify-workflow Ready Ready Preview, Comment Jul 10, 2026 9:00pm
workbench-hono-workflow Ready Ready Preview, Comment Jul 10, 2026 9:00pm
workbench-nitro-workflow Ready Ready Preview, Comment Jul 10, 2026 9:00pm
workbench-nuxt-workflow Ready Ready Preview, Comment Jul 10, 2026 9:00pm
workbench-sveltekit-workflow Ready Ready Preview, Comment Jul 10, 2026 9:00pm
workbench-tanstack-start-workflow Ready Ready Preview, Comment Jul 10, 2026 9:00pm
workbench-vite-workflow Ready Ready Preview, Comment Jul 10, 2026 9:00pm
workflow-docs Ready Ready Preview, Comment, Open in v0 Jul 10, 2026 9:00pm
workflow-swc-playground Ready Ready Preview, Comment Jul 10, 2026 9:00pm
workflow-tarballs Ready Ready Preview, Comment Jul 10, 2026 9:00pm
workflow-web Ready Ready Preview, Comment Jul 10, 2026 9:00pm

@changeset-bot

changeset-bot Bot commented Jul 9, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 710ec8b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 18 packages
Name Type
@workflow/world-local Minor
@workflow/builders Patch
@workflow/cli Patch
@workflow/core Patch
@workflow/vitest Patch
@workflow/web Patch
@workflow/world-postgres Patch
@workflow/world-testing Patch
@workflow/astro Patch
@workflow/nest Patch
@workflow/next Patch
@workflow/nitro Patch
@workflow/nuxt Patch
@workflow/rollup Patch
@workflow/sveltekit Patch
@workflow/vite Patch
workflow Patch
@workflow/web-shared Patch

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

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

Some tests failed

Summary

Passed Failed Skipped Total
❌ ▲ Vercel Production 1452 1 241 1694
❌ 💻 Local Development 1628 1 219 1848
✅ 📦 Local Production 1629 0 219 1848
✅ 🐘 Local Postgres 1617 0 231 1848
✅ 🪟 Windows 154 0 0 154
✅ 📋 Other 898 0 180 1078
Total 7378 2 1090 8470

❌ Failed Tests

▲ Vercel Production (1 failed)

nextjs-webpack (1 failed):

  • writableForwardedFromStepWorkflow | wrun_01KX6X9XXV62XZ1G71J3DRSKFF | 🔍 observability
💻 Local Development (1 failed)

nuxt-stable (1 failed):

  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KX6XK7SB9Y9FPYBPTR6VP32Y

Details by Category

❌ ▲ Vercel Production
App Passed Failed Skipped
✅ astro 126 0 28
✅ example 126 0 28
✅ express 126 0 28
✅ fastify 126 0 28
✅ hono 126 0 28
✅ nextjs-turbopack 150 0 4
❌ nextjs-webpack 149 1 4
✅ nitro 126 0 28
✅ nuxt 126 0 28
✅ sveltekit 145 0 9
✅ vite 126 0 28
❌ 💻 Local Development
App Passed Failed Skipped
✅ astro-stable 129 0 25
✅ express-stable 129 0 25
✅ fastify-stable 129 0 25
✅ hono-stable 129 0 25
✅ nextjs-turbopack-canary 135 0 19
✅ nextjs-turbopack-stable 154 0 0
✅ nextjs-webpack-canary 135 0 19
✅ nextjs-webpack-stable 154 0 0
✅ nitro-stable 129 0 25
❌ nuxt-stable 128 1 25
✅ sveltekit-stable 148 0 6
✅ vite-stable 129 0 25
✅ 📦 Local Production
App Passed Failed Skipped
✅ astro-stable 129 0 25
✅ express-stable 129 0 25
✅ fastify-stable 129 0 25
✅ hono-stable 129 0 25
✅ nextjs-turbopack-canary 135 0 19
✅ nextjs-turbopack-stable 154 0 0
✅ nextjs-webpack-canary 135 0 19
✅ nextjs-webpack-stable 154 0 0
✅ nitro-stable 129 0 25
✅ nuxt-stable 129 0 25
✅ sveltekit-stable 148 0 6
✅ vite-stable 129 0 25
✅ 🐘 Local Postgres
App Passed Failed Skipped
✅ astro-stable 128 0 26
✅ express-stable 128 0 26
✅ fastify-stable 128 0 26
✅ hono-stable 128 0 26
✅ nextjs-turbopack-canary 134 0 20
✅ nextjs-turbopack-stable 153 0 1
✅ nextjs-webpack-canary 134 0 20
✅ nextjs-webpack-stable 153 0 1
✅ nitro-stable 128 0 26
✅ nuxt-stable 128 0 26
✅ sveltekit-stable 147 0 7
✅ vite-stable 128 0 26
✅ 🪟 Windows
App Passed Failed Skipped
✅ nextjs-turbopack 154 0 0
✅ 📋 Other
App Passed Failed Skipped
✅ e2e-local-dev-nest-stable 129 0 25
✅ e2e-local-dev-tanstack-start- 129 0 25
✅ e2e-local-postgres-nest-stable 128 0 26
✅ e2e-local-postgres-tanstack-start- 128 0 26
✅ e2e-local-prod-nest-stable 129 0 25
✅ e2e-local-prod-tanstack-start- 129 0 25
✅ e2e-vercel-prod-tanstack-start 126 0 28

📋 View full workflow run


Some E2E test jobs failed:

  • Vercel Prod: failure
  • Local Dev: failure
  • Local Prod: success
  • Local Postgres: success
  • Windows: success

Check the workflow run for details.

@NathanColosimo NathanColosimo force-pushed the codex/hook-retention-core branch from 87b6bd9 to bd33c10 Compare July 9, 2026 23:16
@NathanColosimo NathanColosimo force-pushed the codex/hook-retention-local branch from 697002e to d6a289a Compare July 9, 2026 23:16
@NathanColosimo NathanColosimo force-pushed the codex/hook-retention-local branch from 01ebb5f to 5baad78 Compare July 10, 2026 17:12
@NathanColosimo NathanColosimo force-pushed the codex/hook-retention-local branch from 5baad78 to 67ed50a Compare July 10, 2026 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant