Skip to content

fix(submitqueue): preserve conclude dead-letter outcomes - #1041

Draft
sbalabanov wants to merge 1 commit into
mainfrom
wt/sqc014
Draft

sbalabanov wants to merge 1 commit into
mainfrom
wt/sqc014

Conversation

@sbalabanov

@sbalabanov sbalabanov commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

TL;DR: Conclusion retries finish request status updates without changing the recorded batch outcome.

Summary

A batch can finish while some of its requests still lack their final status updates. This change finishes those updates when conclusion retries, keeping successful work successful and preserving the original failed or cancelled result. If the batch is still running, records are missing, or the payload is invalid, keep the message for another attempt instead of guessing an outcome.

Repro

  1. Start with a finished Succeeded batch containing two requests, then interrupt conclude after one final status update succeeds and the next status-log write fails.
  2. Let the failed message reach conclude_dlq, then retry it after status-log writes work again.
  3. Before: the message is discarded and missing updates stay missing. After: finish those updates as Landed, without turning successful work into an error.

Test Plan

  • Successful, failed, and cancelled batches keep their matching request outcomes; later infrastructure errors do not replace the original result.
  • A retry finishes missing request logs and leaves completed request states unchanged. The partial-update test uses a Failed batch.
  • The final queue keeps unfinished work, missing records, and invalid payloads available for another attempt.

Revert Plan

Pause conclude final processing before reverting. Retain final queue records
and request logs; do not reinterpret stored terminal outcomes as failures.

Issues

@cla-assistant

cla-assistant Bot commented Nov 13, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

1 similar comment
@cla-assistant

cla-assistant Bot commented Nov 13, 2026

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@sbalabanov
sbalabanov force-pushed the wt/sqc009 branch 2 times, most recently from 73e67b9 to 81cd141 Compare November 14, 2026 01:54
Base automatically changed from wt/sqc009 to main November 14, 2026 02:12
Summary:
Reconcile a terminal batch's member requests and status logs when conclusion
cannot finish. Preserve successful, failed, and cancelled outcomes, repair
terminal membership, and retain incomplete payload obligations for retry.

Test Plan:
Existing tests cover all terminal outcome mappings, partial member log
publication retries, different terminal winners, and final queue retention of
incomplete work. Focused unit tests, affected library builds, formatting,
lint, mock, module, and build metadata checks passed.

Revert Plan:
Pause conclude final processing before reverting. Preserve final queue records
and request logs; do not reinterpret stored terminal outcomes as failures.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants