Repository navigation
Bug: Resume workflow subscriptions without resubmitting execution on reconnect #116
Description
Summary
useCanvasStore.ts:430 sends the full run payload on every new connection. The backend has no durable run-id deduplication, and the frontend does not consistently reject events from obsolete runs. Heartbeats are sent even though the server does not continue reading them after the initial request.
Environment and evidence
- Review finding: F16 (2026-10-05 product/technical review).
- Baseline: Windows,
devat c1c5dbe. The remotedevmatched this commit when filing. - Evidence: Code.
- Priority recommendation: P1 - proposed first-release blocker. This is review triage, not a production-incident severity declaration.
- No real credentials, paid inference, engine installation, or unrelated process termination were used for review probes. Mocked observations establish the stated code behavior, not live-provider/GPU acceptance.
Reproduction or validation
Inspect useCanvasStore.runWorkflow: every WebSocket onopen sends the full run payload. The server accepts a submission again rather than resuming a durable run, and UI events are not isolated by run ID. Client PINGs are also sent after the server stops receiving messages. Duplicate paid execution was not attempted; validate with a controllable connection and a counted fake runner.
User impact
A transport failure can initiate duplicate inference or charges; a late event can overwrite a newer run's state. This was not reproduced with a paid service.
Proposed approach
Separate submission from subscription, persist an idempotency key, resume an existing run, check run identity on every event, and implement or remove the heartbeat contract.
Acceptance criteria
- Separate idempotent submission from subscription/resume.
- Reconnect to an existing durable run without a second inference call.
- Ignore stale events from previous runs.
- Implement a matched heartbeat protocol or remove the unsupported heartbeat.
- Disconnect/reconnect tests assert execution count and final state.
Related work
Related closed issue: #67. Reconnect/heartbeat support was previously requested and the issue is closed. This report concerns resubmission and an unmatched heartbeat contract in the resulting implementation.
Verification scope
Real GPU inference, paid-provider compatibility, and a clean-machine packaged desktop journey remain unverified. Any follow-up implementation should target dev under the repository's contribution/branching rules.
Activity
BerryUIKI commentedon Oct 9, 2026
Resolved in PR #174, merged into dev. Counted-runner tests include a real TestClient WebSocket disconnect/resume, durable cursor replay, duplicate submission, stale frontend events and heartbeat removal. Execution occurs once. Live provider/GPU release acceptance remains tracked in #143.