fix(ploeg): replay a finished outcome that carries a checkpoint #167
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "ryangr0/ploeg-outcome-replay-with-checkpoint"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A worker that lost the response to its outcome report and retried the
same report with an inline checkpoint got 404 instead of the original
success. handleOutcome wrote the checkpoint before ReportOutcome's
digest-based replay check, and Store.Checkpoint needs a Lease or a
running Run, which the first report had already removed.
The handler now builds the report first and, when a checkpoint rides
along, asks Store.IsOutcomeReplay whether the report matches the digest
that finished the run. A replay skips the checkpoint write and goes
straight to ReportOutcome, which answers with the original success, so no
second checkpoint or created Work Item appears. A different report for a
finished run still fails the checkpoint write and is rejected as before.
ReportOutcome and IsOutcomeReplay share one digest computation.
The replay test uses the same rule as ReportOutcome (finished run, matching outcome digest, LLM account row). The digest does not cover the checkpoint, so a retry with the same outcome but a different checkpoint replays and drops that checkpoint; harmless for a lost-response retry.
Verified with
mise run verifyon the pinned toolchain (all gates passed).Ticket: https://vikunja.webgrip.dev/tasks/1757
🤖 Generated with Claude Code