Skip to content

fix(gateway): align land strategy mapping with contract - #663

Open
sbalabanov wants to merge 1 commit into
mainfrom
sergeyb/fix-gateway-land-strategy
Open

fix(gateway): align land strategy mapping with contract#663
sbalabanov wants to merge 1 commit into
mainfrom
sergeyb/fix-gateway-land-strategy

Conversation

@sbalabanov

Copy link
Copy Markdown
Contributor

Summary

Intent:

  • Preserve server-configured defaults instead of forcing rebase at the gateway boundary.
  • Support every merge strategy exposed by the shared API contract.

Changes:

  • Map DEFAULT to the domain sentinel so downstream Runway configuration selects the strategy.
  • Map PROMOTE to its domain strategy while continuing to reject unknown numeric enum values.
  • Extend mapper coverage for default and promote behavior.

Generated by the 🪄 pr-create skill.

Test Plan

Issues

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

case mergestrategypb.Strategy_DEFAULT:
// TODO: resolve default strategy based on queue configuration
return mergestrategy.MergeStrategyRebase, nil
return mergestrategy.MergeStrategyUnknown, nil

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

do not change that, restore Rebase and TODO

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Restored the existing DEFAULT-to-Rebase behavior and TODO in 7ec7230; PROMOTE remains the only mapping change.

This preserves the current queue default behavior while adding support for the explicit PROMOTE contract value. The mapper test now covers PROMOTE without changing DEFAULT semantics.

[addressed by agent]

Summary:
Support the PROMOTE strategy in the gateway land request mapper while preserving the existing DEFAULT-to-rebase behavior.

Intent:
- Handle every explicit merge strategy exposed by the shared API contract.
- Keep the current default strategy behavior until queue configuration resolves it.

Changes:
- Map PROMOTE to MergeStrategyPromote.
- Add mapper coverage for PROMOTE.

Test Plan:
- ./tool/bazel test //service/submitqueue/gateway/server/mapper:go_default_test --test_output=errors

Revert Plan:
- Revert this commit.

Issues:
- None.
@sbalabanov
sbalabanov force-pushed the sergeyb/fix-gateway-land-strategy branch from fbb81d1 to 7ec7230 Compare September 2, 2026 20:38
@sbalabanov
sbalabanov marked this pull request as ready for review September 2, 2026 20:39
@sbalabanov
sbalabanov requested review from a team and behinddwalls as code owners September 2, 2026 20:39
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.

3 participants