Repository navigation
fix(orchestrator): stop dependency-analysis DLQ failing requests a live batch owns - #876
Open
behinddwalls wants to merge 1 commit into
Conversation
…ve batch owns ## Summary ### Why? The batch stage mints a batch per delivery, so a lost ack leaves two batches for one request, and dependency analysis is where one of them is chosen. Its DLQ reused the generic batch reconciler, which fails every member request. A dead-lettered duplicate therefore wrote `Error` over a request whose chosen batch was still live; that batch went on to land the change while the request stayed reported as failed. The same reconciler would also fail a batch that speculate had already admitted, racing land. ### What? - Add `NewDLQDependencyAnalysisController`, which decides by the batch's state: - `Creating` with a request already carried by another batch past `Creating`: a duplicate, left inert (same test the primary controller uses to abandon it). - `Creating` otherwise, `Created`, or `Failed`: the batch owns its requests and nothing downstream will advance it, so it is failed and fanned out as before. - Any later state: a downstream stage owns it; acked untouched. - Wire it as the dependency-analysis stage's DLQ and update the DLQ README's controller mapping (which also still listed `speculate` under the generic controller). ## Test Plan ✅ `bazel test //submitqueue/orchestrator/...` (new table-driven DLQ test covers every batch state, duplicate vs owner, and lookup failure) ✅ `make lint-fmt`, `make check-gazelle` `TestConflictAnalyzerFailure_ReconcilesFromDLQ` (e2e) exercises the owner path and should still see the batch `Failed` and the request `Error`.
behinddwalls
added this pull request to stack #877
October 16, 2026 12:56
behinddwalls
marked this pull request as ready for review
October 16, 2026 12:57
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why?
The batch stage mints a batch per delivery, so a lost ack leaves two batches for one request, and dependency analysis is where one of them is chosen. Its DLQ reused the generic batch reconciler, which fails every member request. A dead-lettered duplicate therefore wrote
Errorover a request whose chosen batch was still live; that batch went on to land the change while the request stayed reported as failed. The same reconciler would also fail a batch that speculate had already admitted, racing land.What?
NewDLQDependencyAnalysisController, which decides by the batch's state:Creatingwith a request already carried by another batch pastCreating: a duplicate, left inert (same test the primary controller uses to abandon it).Creatingotherwise,Created, orFailed: the batch owns its requests and nothing downstream will advance it, so it is failed and fanned out as before.speculateunder the generic controller).Test Plan
✅
bazel test //submitqueue/orchestrator/...(new table-driven DLQ test covers every batch state, duplicate vs owner, and lookup failure)✅
make lint-fmt,make check-gazelleTestConflictAnalyzerFailure_ReconcilesFromDLQ(e2e) exercises the owner path and should still see the batchFailedand the requestError.Stack
🤖 Generated with Claude Code