commitState PUTs each stream's cursor to /v1/state/<connectorId> one stream at a time (reference-implementation/runtime/index.ts:4435–4461) and emits run.state_advanced after each successful PUT, before the run's terminal event is written. If the process stops between two PUTs, or the terminal handling then fails, some streams are committed and the run ends as run.failed or run.abandoned.
On an instance with five months of history, 11 runs advanced at least one cursor and did not end with a succeeded completion:
| runs |
terminal event |
when |
| 2 |
run.failed (runtime_error) |
2026-04-19, 04-20 |
| 9 |
run.abandoned (controller) |
2026-08-21, 08-27 |
In the two failed runs, a local collector's sessions, skills and slash_commands cursors advanced and then the run failed; the sessions that run had emitted but not fully ingested are now behind the cursor.
Proposal: commit all staged cursors for a run in one request, or write the terminal event first and commit only after it records succeeded, so a run can never end failed or abandoned with a subset of its cursors advanced. A migration is not needed; the affected runs can be re-driven by resetting the four streams' cursors to their pre-run values, which the event log holds.
Not verified: whether the nine abandoned runs lost records, since abandonment came from the controller after the PUTs and the batches before them were accepted.
commitStatePUTs each stream's cursor to/v1/state/<connectorId>one stream at a time (reference-implementation/runtime/index.ts:4435–4461) and emitsrun.state_advancedafter each successful PUT, before the run's terminal event is written. If the process stops between two PUTs, or the terminal handling then fails, some streams are committed and the run ends asrun.failedorrun.abandoned.On an instance with five months of history, 11 runs advanced at least one cursor and did not end with a succeeded completion:
run.failed(runtime_error)run.abandoned(controller)In the two failed runs, a local collector's
sessions,skillsandslash_commandscursors advanced and then the run failed; the sessions that run had emitted but not fully ingested are now behind the cursor.Proposal: commit all staged cursors for a run in one request, or write the terminal event first and commit only after it records
succeeded, so a run can never end failed or abandoned with a subset of its cursors advanced. A migration is not needed; the affected runs can be re-driven by resetting the four streams' cursors to their pre-run values, which the event log holds.Not verified: whether the nine abandoned runs lost records, since abandonment came from the controller after the PUTs and the batches before them were accepted.