Skip to content

feat(runway): wire merge-conflict-check controller to Merger extension#280

Open
kevinlnew wants to merge 1 commit into
mainfrom
kevin.new/runway-merge-check-ctrl
Open

feat(runway): wire merge-conflict-check controller to Merger extension#280
kevinlnew wants to merge 1 commit into
mainfrom
kevin.new/runway-merge-check-ctrl

Conversation

@kevinlnew

Copy link
Copy Markdown
Contributor

Summary

  • Wire the merge-conflict-check controller to the merger.Factory extension so it performs the actual dry-run merge check instead of just logging
  • Publish MergeResult to the merge-conflict-check-signal topic — SUCCEEDED on clean merge, FAILED on merger.ErrConflict (ack, not a controller error)
  • Publish errors are retryable (errs.NewRetryableError); deserialize/factory/check errors are non-retryable (DLQ)
  • Update example server wiring with noop merger factory and signal topic in the registry

Test plan

  • Unit tests: success, merge conflict, merger infra error, factory error, publish error, deserialize error
  • bazel test //runway/controller/mergeconflictcheck:mergeconflictcheck_test passes
  • bazel build //example/runway/server:runway builds cleanly
  • make gazelle — BUILD files in sync
  • make fmt — no formatting changes

🤖 Generated with Claude Code

The merge-conflict-check controller was a parse-and-log stub. Wire it to
the Merger extension so it performs the dry-run check and publishes the
MergeResult to the merge-conflict-check-signal topic. A merge conflict is
an expected outcome (ack + publish FAILED), not an infrastructure error.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@kevinlnew kevinlnew requested review from a team, behinddwalls and sbalabanov as code owners June 26, 2026 17:42
"id", request.GetId(),
"queue_name", request.GetQueueName(),
)
result = &runwaymq.MergeResult{

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

at some point it would be nice to return and log a list of conflicting files as well

Outcome: runwaypb.Outcome_FAILED,
Reason: err.Error(),
}
} else {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reverse if statement and return early to avoid branching

// Retryable: publishing the result is the hand-off that keeps this
// conflict check alive; a transient enqueue blip should replay rather
// than DLQ the only message carrying the result back to the orchestrator.
return errs.NewRetryableError(fmt.Errorf("failed to publish merge-conflict-check result for %s: %w", request.GetId(), err))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do not do classification here; not all errors are retryable, for example programming bugs are not retryable. Only certain errors (like connection failure) are retryable and should be recognized by a generic-purpose classifier.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed guidance around this in #281

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.

2 participants