runway/

directory
v0.3.0-20260810200916-... Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 10, 2026 License: Apache-2.0

README

Runway

Runway owns the merge queues defined by the external contract in api/runway/messagequeue: it consumes merge-conflict-check and merge requests, performs the work, and (eventually) publishes the result to the corresponding signal queue. SubmitQueue is a client of these queues.

Runway is a single service (the domain is the service); its controllers live directly under controller/. It consumes Runway's merge queues:

  • merge-conflict-check — dry-run check that an ordered sequence of merge steps applies cleanly, without committing.
  • merge — committing merge: apply and commit the ordered steps.

Each controller deserializes the MergeRequest, obtains a Merger for the request's queue from the merger extension, applies the ordered steps, and publishes a MergeResult to the corresponding signal queue (merge-conflict-check-signal / merge-signal). merge commits and reports the produced revisions; merge-conflict-check is a dry run that reports mergeability with empty outputs.

Merger extension

extension/merger is the pluggable merge contract. Implementations:

  • git — a git-CLI backend that honors each step's strategy (REBASE, SQUASH_REBASE, MERGE, PROMOTE; DEFAULT resolves to a per-instance default). See its README.
  • noop — always-succeeds stub for local development.

Failure handling

A merge outcome the controller can name is published as a FAILED result and acked, not retried: a merge conflict (merger.ErrConflict) or an invalid request (merger.ErrInvalidRequest — unknown strategy, malformed change URI, invalid PROMOTE composition). The merger.IsTerminal helper draws that line. Any other error is an infrastructure fault and is nacked for retry.

Because Runway is stateless and the sole responder on the client's correlation id, a request that exhausts retries (or hits an unexpected fault) must still resolve the client. The inbound topics dead-letter by default; the dlq reconciler drains those _dlq topics and republishes a FAILED MergeResult to the signal topic so the correlation id never hangs.

Directories

Path Synopsis
dlq
Package dlq reconciles dead-lettered merge requests back to the client.
Package dlq reconciles dead-lettered merge requests back to the client.
merge
Package merge consumes committing merge requests from Runway's merge queue.
Package merge consumes committing merge requests from Runway's merge queue.
mergeconflictcheck
Package mergeconflictcheck consumes dry-run merge-conflict check requests from Runway's merge-conflict-check queue.
Package mergeconflictcheck consumes dry-run merge-conflict check requests from Runway's merge-conflict-check queue.
Package extension holds Runway-specific extension implementations.
Package extension holds Runway-specific extension implementations.
merger
Package merger defines the pluggable interface for version-control merge operations that Runway performs on behalf of its callers.
Package merger defines the pluggable interface for version-control merge operations that Runway performs on behalf of its callers.
merger/fake
Package fake provides a merger.Merger whose outcome is driven by the request payload.
Package fake provides a merger.Merger whose outcome is driven by the request payload.
merger/git
Package git is a Merger implementation backed by a local git checkout.
Package git is a Merger implementation backed by a local git checkout.
merger/mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
merger/noop
Package noop provides a no-op Merger implementation for local development and testing.
Package noop provides a no-op Merger implementation for local development and testing.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL