workflow-runtime 0.0.3: sweep() never recovers a run whose worker died mid-step (fixed on main by #15, unreleased)
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 1/5
- Tempo stimato
- Meno di un'ora
- Idoneità per principianti
- 15/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- github, node.js, typescript
Direzione di ricerca
This asks for release PR #16 to publish core 0.0.5 and runtime 0.0.4; the fix is already merged in #15 and verified on main. Read #16 for the release status and project release instructions, then check whether the requested versions have shipped to npm. Done means both published packages include the fix so users can pin released versions.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Versions
@tanstack/workflow-core 0.0.4, @tanstack/workflow-runtime 0.0.3 (latest on npm)
Describe the bug and the steps to reproduce it
If the process driving a run dies inside a step, the run stays running with an expired lease forever. In 0.0.3, runtime.sweep() only handles schedules and timers and never calls store.claimStaleRuns. Calling claimStaleRuns plus runWorkflow by hand doesn't help either, because core 0.0.4 has no recover mode, so replay stops at the last checkpoint.
#15 (merged 2026-07-21) fixes this: expired-run recovery in sweep(), recover: true in core, and lease heartbeats. I built main at b928717 and confirmed sweep() re-runs the interrupted step and finishes the run, and that the heartbeat stops a long step from being reclaimed mid-flight.
Request: could the release PR #16 be merged, so core 0.0.5 and runtime 0.0.4 ship to npm? That would let us pin a published version instead of a git SHA.
Your Minimal, Reproducible Example
import { createWorkflow } from '@tanstack/workflow-core'
import { defineWorkflowRuntime, inMemoryWorkflowExecutionStore } from '@tanstack/workflow-runtime'
const wf = createWorkflow({ id: 'wf', version: 'v1' }).handler(async (ctx) => {
await ctx.step('a', async () => 1)
return 'done'
})
const store = inMemoryWorkflowExecutionStore()
const runtime = defineWorkflowRuntime({ store, workflows: { wf: { load: async () => wf } }, defaultLeaseMs: 50 })
await store.createRun({ runId: 'r1', workflowId: 'wf', workflowVersion: 'v1', input: {}, now: Date.now() })
await store.claimRun({ runId: 'r1', leaseOwner: 'dead-worker', leaseMs: 50, now: Date.now() }) // worker dies here
await new Promise((r) => setTimeout(r, 100))
const sweep = await runtime.sweep()
console.log(sweep.summary, (await store.loadRun('r1'))?.status)
// 0.0.3: { scheduled: {}, timers: {}, eventCount: 0 } 'running' (expected: recovered, then finished)
Do you intend to try to help solve this bug with your own PR?
No — the fix is already on main; this is a request to publish it.
Terms & Code of Conduct
- I agree to follow this project's Code of Conduct
- I understand that if my bug cannot be reliably reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
- Lingua principale
- TypeScript
- Stelle
- 221
- Fork
- 10
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di TanStack/workflow
-
Difficoltà 4/5 1-2 giorni Idoneità per principianti 52/100
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
-
Dependency DashboardAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
Tutte le issue di TanStack/workflow
Issue simili
-
type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
I maintainer di solito rispondono entro 1 giorno
-
0️⃣ phase/new
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 70/100
microsoft/playwright#43640 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100