Skip to content

refactor(entity): promote RequestLandStrategy to shared entity/mergestrategy#243

Open
behinddwalls wants to merge 2 commits into
mainfrom
preetam/mergestrategy-promote
Open

refactor(entity): promote RequestLandStrategy to shared entity/mergestrategy#243
behinddwalls wants to merge 2 commits into
mainfrom
preetam/mergestrategy-promote

Conversation

@behinddwalls

@behinddwalls behinddwalls commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

Why?

The land-merge strategy enum lived in submitqueue/entity as RequestLandStrategy, but the upcoming runway merge-conflict contract needs the same type, and runway must not import submitqueue/entity. Mirroring the Change promotion in #240, the strategy belongs in the shared top-level entity/ so both domains reference one type with no per-domain enum or mapping.

What?

Moves RequestLandStrategy and its constants out of submitqueue/entity/request.go into a new top-level entity/mergestrategy package as MergeStrategy (MergeStrategyUnknown/Rebase/SquashRebase/Merge). Request.LandStrategy now has type mergestrategy.MergeStrategy. All references across the gateway and orchestrator controllers, entities, and tests are updated to the shared type. Pure mechanical refactor — no behavior change.

Test Plan

bazel build //...
bazel test //... --test_tag_filters=-integration,-e2e (51 tests pass)
make gazelle clean

Stack

  1. @ refactor(entity): promote RequestLandStrategy to shared entity/mergestrategy #243
  2. feat(runway): add merge-conflict check wire contract and topic keys #244
  3. feat(mergeconflict): make merge-conflict check asynchronous via runway #245

…trategy

## Summary

### Why?

The land-merge strategy enum lived in `submitqueue/entity` as `RequestLandStrategy`, but the upcoming runway merge-conflict contract needs the same type, and runway must not import `submitqueue/entity`. Mirroring the `Change` promotion in #240, the strategy belongs in the shared top-level `entity/` so both domains reference one type with no per-domain enum or mapping.

### What?

Moves `RequestLandStrategy` and its constants out of `submitqueue/entity/request.go` into a new top-level `entity/mergestrategy` package as `MergeStrategy` (`MergeStrategyUnknown/Rebase/SquashRebase/Merge`). `Request.LandStrategy` now has type `mergestrategy.MergeStrategy`. All references across the gateway and orchestrator controllers, entities, and tests are updated to the shared type. Pure mechanical refactor — no behavior change.

## Test Plan

✅ `bazel build //...`
✅ `bazel test //... --test_tag_filters=-integration,-e2e` (51 tests pass)
✅ `make gazelle` clean
@behinddwalls behinddwalls marked this pull request as ready for review June 15, 2026 22:49
@behinddwalls behinddwalls requested review from a team and sbalabanov as code owners June 15, 2026 22:49
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.

1 participant