Why: A hard kill left runs in pending, running, or waiting_hitl. A busy send stored a message before the 409. finishRun could mark a run completed without an assistant message. A full SSE buffer dropped events without closing the stream.
Evidence: GOWORK=off go vet ./... and GOWORK=off go test -count=1 ./... passed. Migration v14, ReconcileInterrupted, request-id admission, SettleRun, and the SSE replay tests are in this branch. AGENT_PG_TEST_DSN was not set, so the PostgreSQL other-instance case was skipped.
Impact: Startup reconciliation and shutdown share one seal. Turn and workflow sends claim a slot before writing. Duplicate request ids return the existing message. SettleRun updates the run and appends the assistant message in one transaction. A full subscriber buffer closes the channel. No Core contract change.
Refs: Dev feature/pi-durable-borrow
Why: A hard kill left runs in pending, running, or waiting_hitl. A busy send stored a message before the 409. finishRun could mark a run completed without an assistant message. A full SSE buffer dropped events without closing the stream.
Evidence: GOWORK=off go vet ./... and GOWORK=off go test -count=1 ./... passed. Migration v14, ReconcileInterrupted, request-id admission, SettleRun, and the SSE replay tests are in this branch. AGENT_PG_TEST_DSN was not set, so the PostgreSQL other-instance case was skipped.
Impact: Startup reconciliation and shutdown share one seal. Turn and workflow sends claim a slot before writing. Duplicate request ids return the existing message. SettleRun updates the run and appends the assistant message in one transaction. A full subscriber buffer closes the channel. No Core contract change.
Refs: Dev feature/pi-durable-borrow
Why: A hard kill left runs in pending, running, or waiting_hitl, a busy send stored a message before the 409, finishRun could mark a run completed without an assistant message, and a full SSE buffer dropped events without closing the stream.
Evidence: GOWORK=off go vet ./... and GOWORK=off go test -count=1 ./... passed, including store, runmgr, bus, and server recovery tests.
Impact: Migration v14 adds runs.instance_id and messages.request_id. Startup reconciliation and shutdown share one seal. Turn and workflow sends claim a slot before writing. Duplicate request ids return the existing message. SettleRun updates the run and appends the assistant message in one transaction. A full subscriber buffer closes the channel so SSE can replay from the cursor.
Refs: Dev feature/pi-durable-borrow
Co-authored-by: Cursor <cursoragent@cursor.com>
weichen
merged commit 5d59ee9d4f into main2026-10-03 14:44:38 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Why: A hard kill left runs in pending, running, or waiting_hitl. A busy send stored a message before the 409. finishRun could mark a run completed without an assistant message. A full SSE buffer dropped events without closing the stream.
Evidence: GOWORK=off go vet ./... and GOWORK=off go test -count=1 ./... passed. Migration v14, ReconcileInterrupted, request-id admission, SettleRun, and the SSE replay tests are in this branch. AGENT_PG_TEST_DSN was not set, so the PostgreSQL other-instance case was skipped.
Impact: Startup reconciliation and shutdown share one seal. Turn and workflow sends claim a slot before writing. Duplicate request ids return the existing message. SettleRun updates the run and appends the assistant message in one transaction. A full subscriber buffer closes the channel. No Core contract change.
Refs: Dev feature/pi-durable-borrow
weichen referenced this pull request2026-10-14 04:00:56 +00:00