Skip to content

fix(submitqueue): keep internal merge stage topic distinct from runway merge queue#348

Merged
sbalabanov merged 1 commit into
mainfrom
fix-merge-topic-collision
Jul 14, 2026
Merged

fix(submitqueue): keep internal merge stage topic distinct from runway merge queue#348
sbalabanov merged 1 commit into
mainfrom
fix-merge-topic-collision

Conversation

@sbalabanov

@sbalabanov sbalabanov commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

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:

  • 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 new e2e harness (stacked PR) asserting that runway's merge signal carries the request's step IDs.

Changes

  • Namespace the colliding merge topic keys by owner so they can never collapse into each other again:
    • api/runway/messagequeue: the runway-owned merge queue key/wire name becomes runway-merge (proto topic_keys option + generated descriptor regenerated).
    • submitqueue/core/topickey: the internal orchestrator merge stage key/wire name becomes submitqueue-merge.
  • platform/consumer: NewTopicRegistry now 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.
  • e2e suite (with the stacked harness PR): runway's merge signal now carries the request step IDs and the full land pipeline completes in ~2s.

🤖 Generated with Claude Code

@CLAassistant

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.

Comment thread submitqueue/core/topickey/topickey.go
@sbalabanov sbalabanov force-pushed the fix-merge-topic-collision branch from d6ce535 to 94e242a Compare July 14, 2026 18:05
…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>
@sbalabanov sbalabanov force-pushed the fix-merge-topic-collision branch from 94e242a to 087124c Compare July 14, 2026 18:12
@sbalabanov sbalabanov merged commit 22f670e into main Jul 14, 2026
14 of 15 checks passed
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.

4 participants