fix(submitqueue): keep internal merge stage topic distinct from runway merge queue#348
Merged
Merged
Conversation
|
|
behinddwalls
approved these changes
Jul 14, 2026
d6ce535 to
94e242a
Compare
…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. Namespace the merge topic keys by owner so the two can never collide: the runway-owned queue becomes "runway-merge" and the internal orchestrator stage becomes "submitqueue-merge" (both key and wire name). Also make consumer.NewTopicRegistry reject duplicate topic keys so a future collision fails at startup instead of silently misrouting messages. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
94e242a to
087124c
Compare
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
api/runway/messagequeue: the runway-owned merge queue key/wire name becomesrunway-merge(prototopic_keysoption + generated descriptor regenerated).submitqueue/core/topickey: the internal orchestrator merge stage key/wire name becomessubmitqueue-merge.platform/consumer:NewTopicRegistrynow rejects duplicate topic keys, so a future collision fails at startup instead of silently misrouting messages.service/submitqueue/orchestrator+service/runway: register both stages under their new, distinct wire names.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