Deduplicate repeated results
Status: Ready
Article ID: 054
Truth label: Current
Audience: Backend builder
Reader outcome: Accept a repeated result request without applying terminal side effects twice.
Related articles: 052, 053, 055
Target week: 22
Last verified: 2026-09-13
Technical reviewer: Codex source audit
Editorial reviewer: Codex editorial audit
Expect transport retries
A worker can send a result, lose the response, and send the same payload again. That is normal at-least-once transport behavior. The server must not repeat state transitions, decision effects, or ledger entries as if new work ran.
Key the delivery
Central records result deduplication against the attempt identity. The first valid terminal report is accepted. A matching repeat returns duplicate. An old fence that lost ownership returns superseded.
Keep worker behavior simple
The outbox treats accepted, duplicate, and superseded as resolved delivery outcomes. It removes the local entry because Central has classified the attempt, even when the attempt did not win current state.
Test the response-loss case
Submit one scratch result twice with the same run and fence. Confirm the second response is duplicate, the task has one terminal transition, and analytics do not count two completed runs.
Current limits
Deduplication covers Forge's result endpoint. It does not make arbitrary tools, provider calls, shell commands, or external APIs idempotent. Those side effects need their own keys or compensation.
Next lesson
Continue with Reject a second Central.
Derivative map
- Weekly package: WEEK-22
- Long video: VIDEO-W22-LONG
- Shorts: SHORT-W22-PROBLEM, SHORT-W22-MECHANISM, SHORT-W22-WARNING
- Email: EMAIL-W22
- LinkedIn: LI-W22-A, LI-W22-B
- X: X-W22-A, X-W22-B
- Visual: VISUAL-W22
Review record
- Repeated delivery, attempt identity, disposition, and ledger behavior checked against current source.
- External side-effect limits reviewed.
- Test proves one terminal transition.
- Internal links and repository voice reviewed.
Review completed: 2026-08-27
Re-audited against the running product: 2026-09-13