Skip to content

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

Open
behinddwalls wants to merge 1 commit into
mainfrom
preetam/mergestrategy-promote
Open

refactor(entity): promote RequestLandStrategy to shared entity/mergestrategy#243
behinddwalls wants to merge 1 commit 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 force-pushed the preetam/mergestrategy-promote branch from 20db3b8 to bf357a5 Compare June 16, 2026 03:38
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