Skip to content

feat(runway): add merge wire contract and topic keys#244

Merged
behinddwalls merged 1 commit into
mainfrom
preetam/runway-contract
Jun 17, 2026
Merged

feat(runway): add merge wire contract and topic keys#244
behinddwalls merged 1 commit into
mainfrom
preetam/runway-contract

Conversation

@behinddwalls

@behinddwalls behinddwalls commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

Why?

Both the merge-conflict check and the merge itself are moving out of SubmitQueue into an asynchronous round-trip with a separate service, runway. A merge-conflict check is a dry run of a merge, so one contract serves both. Runway owns the cross-service queues, their topic keys, and the wire contract — SubmitQueue cannot read runway's storage and vice versa, so the payloads carry full data, not entity IDs. This change adds only those runway-owned definitions; runway's gateway/orchestrator/controllers are out of scope.

What?

Adds a new runway/ domain folder holding contract-only definitions:

runway/entityMergeRequest (client-owned ID, QueueName, ordered []MergeStep), MergeStep (StepID, []change.Change, mergestrategy.MergeStrategy), StepResult (StepID, VCS-neutral OutputIDs, Reason), and MergeResult (ID, Success, Reason, []StepResult), with JSON ToBytes/FromBytes. The ordered step list encodes base-layering so one request expresses both "candidate vs target branch" (one step) and "candidate + in-flight vs target" (N steps). It imports only the shared entity/change and entity/mergestrategy — never submitqueue/entity.

runway/core/topickey — two queue pairs over the one contract: the dry-run check (merge-conflict-checker / merge-conflict-checker-signal) and the committing merge (merger / merger-signal). The queue a request arrives on encodes whether runway commits the result and reports the revisions it produced (StepResult.OutputIDs — a git commit SHA, hg changeset, svn revision, …; empty for a dry-run check).

Test Plan

bazel test //runway/... (round-trip serialization tests pass)
bazel build //...

Issues

Stack

  1. @ feat(runway): add merge wire contract and topic keys #244
  2. feat(mergeconflict): make merge-conflict check asynchronous via runway #245
  3. feat(merge): make merge asynchronous via runway #247

@behinddwalls behinddwalls force-pushed the preetam/runway-contract branch from b8f3e22 to ddbb5ab Compare June 16, 2026 03:31
@behinddwalls behinddwalls marked this pull request as ready for review June 16, 2026 03:34
@behinddwalls behinddwalls requested review from a team and sbalabanov as code owners June 16, 2026 03:34
@behinddwalls behinddwalls force-pushed the preetam/runway-contract branch from ddbb5ab to edf7ab9 Compare June 16, 2026 03:36
@behinddwalls behinddwalls force-pushed the preetam/mergestrategy-promote branch from 20db3b8 to bf357a5 Compare June 16, 2026 03:38
@behinddwalls behinddwalls force-pushed the preetam/runway-contract branch from edf7ab9 to 3e8071d Compare June 16, 2026 17:09
@behinddwalls behinddwalls changed the title feat(runway): add merge-conflict check wire contract and topic keys feat(runway): add merge wire contract and topic keys Jun 16, 2026
Comment thread runway/entity/merge_conflict_check.go Outdated
Comment thread runway/entity/merge_conflict_check.go Outdated
Comment thread runway/entity/merge_conflict_check.go Outdated
Comment thread runway/entity/merge_conflict_check.go Outdated
Base automatically changed from preetam/mergestrategy-promote to main June 16, 2026 19:15
@behinddwalls behinddwalls force-pushed the preetam/runway-contract branch from 3e8071d to cd798f6 Compare June 16, 2026 20:12
@behinddwalls behinddwalls changed the title feat(runway): add merge wire contract and topic keys feat(contract): add runway merge queue contract + typed queue primitives Jun 16, 2026
@behinddwalls behinddwalls force-pushed the preetam/runway-contract branch from cd798f6 to 3e8071d Compare June 17, 2026 06:00
@behinddwalls behinddwalls changed the title feat(contract): add runway merge queue contract + typed queue primitives feat(runway): add merge wire contract and topic keys Jun 17, 2026
Runway owns the cross-service merge contract: entity.MergeRequest and
MergeResult, carried over two queue pairs -- a dry-run merge-conflict
check (merge-conflict-checker / -signal) and a committing merge (merger
/ -signal). A merge-conflict check is a dry run of a merge, so one
contract serves both; the queue a request arrives on encodes whether
runway commits the result and reports the revisions it produced
(StepResult.OutputIDs, VCS-neutral).

Co-authored-by: Cursor <cursoragent@cursor.com>
@behinddwalls behinddwalls force-pushed the preetam/runway-contract branch from 3e8071d to 78d66a5 Compare June 17, 2026 06:09
@behinddwalls behinddwalls enabled auto-merge June 17, 2026 06:11
@behinddwalls behinddwalls added this pull request to the merge queue Jun 17, 2026
Merged via the queue into main with commit 5e47f45 Jun 17, 2026
15 checks passed
@behinddwalls behinddwalls deleted the preetam/runway-contract branch June 17, 2026 06:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants