Uh oh!
There was an error while loading. Please reload this page.
Add WORKFLOW_LOCAL_RECOVER_ACTIVE_RUNS env var to local world - #2914
Conversation
The recoverActiveRuns factory option had no environment variable, so disabling startup re-enqueueing of pending/running runs required a custom world module via WORKFLOW_TARGET_WORLD. Wire an env fallback (0/false disables, 1/true enables, explicit factory option wins) and document it in the worlds configuration reference and local world guide. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: 84b5c62 The changes in this PR will be included in the next version bump. This PR includes changesets to release 18 packages
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 |
🧪 E2E Test Results❌ Some tests failed Summary
❌ Failed Testsvercel-multi-region (1 failed)nextjs-turbopack (1 failed):
Details by Category✅ ▲ Vercel Production
✅ 💻 Local Development
✅ 📦 Local Production
✅ 🐘 Local Postgres
✅ 🪟 Windows
✅ 📋 Other
❌ vercel-multi-region
|
📊 Workflow Benchmarkscommit Backend:
Avg deltas compare against the most recent benchmark run on Metrics — TTFS: time to first step body execution · STSO: step-to-step overhead (gap between consecutive step bodies) · WO: workflow overhead (time outside step bodies, client start → last step body exit) · SL: stream latency (first chunk write → visible to the reader) Scenarios — stream: one step that streams chunks back to the client; no hooks, so the run stays in turbo mode · hook + stream: registers a hook before the same streaming step, which exits turbo mode · 1020 steps: 1020 trivial sequential steps; STSO is measured between consecutive steps in the given step ranges 🟢/🔴 mark percentiles within/above target. Targets (p75/p90/p99, ms) — TTFS 200/300/600 · SL 50/60/125 · STSO (1-20) 20/30/60 · STSO (101-120) 30/45/90 · STSO (1001-1020) 40/60/120 TTFS/WO compare client vs deployment clocks and SL compares the step runner’s clock vs the client’s (NTP-synced in CI). WO ends at the last step body exit, the closest observable proxy for the final step-completion request. |
Uh oh!
There was an error while loading. Please reload this page.
) The recoverActiveRuns factory option had no environment variable, so disabling startup re-enqueueing of pending/running runs required a custom world module via WORKFLOW_TARGET_WORLD. Wire an env fallback (0/false disables, 1/true enables, explicit factory option wins) and document it in the worlds configuration reference and local world guide. Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Karthik Kalyan <105607645+karthikscale3@users.noreply.github.com>
Backport PR opened against |
…al world (#2921) * feat(world-local): add WORKFLOW_LOCAL_RECOVER_ACTIVE_RUNS env var (#2914) The recoverActiveRuns factory option had no environment variable, so disabling startup re-enqueueing of pending/running runs required a custom world module via WORKFLOW_TARGET_WORLD. Wire an env fallback (0/false disables, 1/true enables, explicit factory option wins) and document it in the worlds configuration reference and local world guide. Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Signed-off-by: Karthik Kalyan <105607645+karthikscale3@users.noreply.github.com> * Fix: Destructuring a non-existent `clearCache` property from `createStorage()` return causes TS2339 build failure in `packages/world-local/src/index.ts` This commit fixes the issue reported at packages/world-local/src/index.ts:65 ## Bug At `packages/world-local/src/index.ts:65` the backport introduced: ```ts const { clearCache: clearStorageCache, ...storage } = createStorage( mergedConfig.dataDir, tag ); ``` `createStorage` returns `LocalStorage`, defined in `storage/index.ts:13` as: ```ts export type LocalStorage = Omit<Storage, 'runs'> & { runs: LocalRunsStorage }; ``` On the `stable` branch this type has **no** `clearCache` property (a repo-wide grep found no `clearCache` definition anywhere under `packages/world-local/src` — the only match was this destructuring itself). Destructuring a property that doesn't exist on the type triggers: ``` src/index.ts(65,11): error TS2339: Property 'clearCache' does not exist on type 'LocalStorage' ``` Additionally, `clearStorageCache` was never referenced after being bound, so even if the property existed it would be dead code. **Trigger:** Any `tsc` build/typecheck of the `world-local` package fails deterministically — all 15 deployment builds reported the identical error. ## Fix The `clearCache` destructuring is unrelated to the intended backport (which is only the `resolveRecoverActiveRuns` env-var fallback). Reverted line 65 to the original form: ```ts const storage = createStorage(mergedConfig.dataDir, tag); ``` This removes the reference to the non-existent property while preserving the env-var feature, resolving the TS2339 error. Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com> Co-authored-by: VaguelySerious <mittgfu@gmail.com> --------- Signed-off-by: Karthik Kalyan <105607645+karthikscale3@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com> Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com> Co-authored-by: VaguelySerious <mittgfu@gmail.com>
The local world re-enqueues all pending/running runs on startup. The
recoverActiveRunsoption can disable this but had no env var, so turning it off required a custom world module.This adds
WORKFLOW_LOCAL_RECOVER_ACTIVE_RUNSas a fallback (0/falsedisables,1/trueenables; the factory option wins, unrecognized values fall back to the defaulttrue). Includes unit tests and docs updates.🤖 Generated with Claude Code