fix(forgejo): keep transcripts and retry stream faults #35

Merged
codetether-bot merged 1 commit from fix/transcript-continuity into main 2026-07-31 15:40:48 +00:00
Collaborator

A live run of issue #21 proved transcript capture works — rows climbed 0 → 11 → 45 → 77 while the task ran — then exposed two further defects.

1. Truncated streams were not retried. The task died on Error: SSE stream error: error decoding response body, which was classified as neither transient nor permanent, so it failed outright. A truncated stream is a transport fault; the same work usually succeeds on retry. sse stream error, error decoding response body, incomplete message, and unexpected eof are now transient. Permanent conditions still win.

2. The transcript was orphaned on release. Progress narration is stored under a derived task-<id> session. On release the worker reported its own session id, which overwrote that value, so the panel went from 77 rows back to empty. The 77 rows were still in the database under task-d3d361bb-..., just unreachable.

The derived session is now preserved when transcript rows exist under it, and the worker id is recorded alongside as worker_session_id. With no recorded rows the real worker session is adopted as before.

Validation: 60 tests pass, including cases for preserved-with-rows, replaced-without-rows, matching ids, and missing ids.

A live run of issue #21 proved transcript capture works — rows climbed 0 → 11 → 45 → 77 while the task ran — then exposed two further defects. **1. Truncated streams were not retried.** The task died on `Error: SSE stream error: error decoding response body`, which was classified as neither transient nor permanent, so it failed outright. A truncated stream is a transport fault; the same work usually succeeds on retry. `sse stream error`, `error decoding response body`, `incomplete message`, and `unexpected eof` are now transient. Permanent conditions still win. **2. The transcript was orphaned on release.** Progress narration is stored under a derived `task-<id>` session. On release the worker reported its own session id, which overwrote that value, so the panel went from 77 rows back to empty. The 77 rows were still in the database under `task-d3d361bb-...`, just unreachable. The derived session is now preserved when transcript rows exist under it, and the worker id is recorded alongside as `worker_session_id`. With no recorded rows the real worker session is adopted as before. Validation: 60 tests pass, including cases for preserved-with-rows, replaced-without-rows, matching ids, and missing ids.
fix(forgejo): keep transcripts and retry stream faults
Some checks failed
Validate CodeTether Pull Request / validate (pull_request) Failing after 1m35s
a1415f5740
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
riley/codetether!35
No description provided.