Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

workflow-runtime 0.0.3: sweep() never recovers a run whose worker died mid-step (fixed on main by #15, unreleased)

Offen
#23 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
1/5
Geschätzter Aufwand
Unter einer Stunde
Anfängerfreundlichkeit
15/100
Issue-Typ
Feature
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
github, node.js, typescript
Bereich
backend, release

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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.
Vorherrschende Sprache
TypeScript
Sterne
221
Forks
10
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus TanStack/workflow

Alle Issues in TanStack/workflow

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.