fix(submitqueue): keep internal merge stage topic distinct from runway merge queue#348
Open
sbalabanov wants to merge 1 commit into
Open
fix(submitqueue): keep internal merge stage topic distinct from runway merge queue#348sbalabanov wants to merge 1 commit into
sbalabanov wants to merge 1 commit into
Conversation
…y merge queue The orchestrator registers its internal merge pipeline stage and the runway-owned merge queue in one topic registry over one shared queue backend, and both used the topic key "merge" (topickey.TopicKeyMerge == runwaymq.TopicKeyMerge). The publish-only runway entry silently shadowed the internal stage entry (last write wins), collapsing the two topics into one: - runway consumed the internal batch-ID messages as zero-step MergeRequests and reported SUCCEEDED without ever seeing the real steps; - the orchestrator merge controller's real MergeRequest publish was then silently dropped by the queue's (topic, partition_key, id) dedupe, because it reuses the batch ID already published to the same topic. The pipeline still reached "landed" only because the zero-step result correlates by batch ID — with a real merger nothing would ever have been merged. Found by the e2e harness asserting runway's merge signal carries the request's step IDs. Rename the internal stage key and wire name to "mergebatch", and make consumer.NewTopicRegistry reject duplicate topic keys so a future collision fails at startup instead of silently misrouting messages. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
|
| // PublishAfter when the build has not yet reached a terminal state. | ||
| TopicKeyBuildSignal TopicKey = "buildsignal" | ||
| // TopicKeyMerge is the pipeline stage where speculated batches are published for merging. | ||
| TopicKeyMerge TopicKey = "merge" |
Collaborator
There was a problem hiding this comment.
should we namespace these to say runway-merge vs just merge and same from SQ stuff to be submitqueue-merge in keys?
behinddwalls
approved these changes
Jul 14, 2026
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
The orchestrator registers its internal merge pipeline stage and the runway-owned merge queue in one topic registry over one shared queue backend, and both used the topic key
"merge"(topickey.TopicKeyMerge == runwaymq.TopicKeyMerge). The publish-only runway entry silently shadowed the internal stage entry (last write wins on the registry maps), collapsing the two topics into one:SUCCEEDEDwithout ever seeing the real steps;MergeRequestpublish was then silently dropped by the queue's(topic, partition_key, id)dedupe, because it reuses the batch ID already published to the same topic.The pipeline still reached
landedonly because the zero-step result correlates by batch ID — with a real merger, nothing would ever have been merged. Found by the new e2e harness (stacked PR) asserting that runway's merge signal carries the request's step IDs.Changes
submitqueue/core/topickey: rename the internal merge stage key (and its orchestrator wire name) tomergebatch, with a comment explaining why it must not be"merge".platform/consumer:NewTopicRegistrynow rejects duplicate topic keys, so a future collision fails at startup instead of silently misrouting messages.service/submitqueue/orchestrator: register the internal stage under the new wire name.Test plan
bazel test //... --test_tag_filters=-manual,-integration— 75/75 pass (includes the updated dlq controller test).bazel test //test/integration/...— 8/8 pass.🤖 Generated with Claude Code