Skip to content

refactor(gateway): make LandController operate on entities#359

Merged
ubettigole merged 1 commit into
mainfrom
abettigole/protoless_land
Jul 14, 2026
Merged

refactor(gateway): make LandController operate on entities#359
ubettigole merged 1 commit into
mainfrom
abettigole/protoless_land

Conversation

@ubettigole

@ubettigole ubettigole commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Move proto<->entity translation out of the gateway Land controller and
into a dedicated mapper package. The controller now takes entity.LandRequest
and returns entity.LandResult, keeping business logic proto-free; the
GatewayServer adapter maps the wire request in and the response out.

  • add entity.LandResult; consolidate LandRequest/LandResult into entity/land.go
  • add service/.../server/mapper with ProtoToLandRequest + strategy resolution
  • keep field validation in the controller so it runs on controller-to-controller calls

Co-Authored-By: Claude Opus 4.8 (1M context) noreply@anthropic.com

Test Plan

Issues

Stack

  1. @ refactor(gateway): make LandController operate on entities #359
  2. refactor(gateway): make CancelController operate on entities #360
  3. refactor(gateway): make StatusController operate on entities #363
  4. refactor(stovepipe): make IngestController operate on entities #361

Move proto<->entity translation out of the gateway Land controller and
into a dedicated mapper package. The controller now takes entity.LandRequest
and returns entity.LandResult, keeping business logic proto-free; the
GatewayServer adapter maps the wire request in and the response out.

- add entity.LandResult; consolidate LandRequest/LandResult into entity/land.go
- add service/.../server/mapper with ProtoToLandRequest + strategy resolution
- keep field validation in the controller so it runs on controller-to-controller calls

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@ubettigole ubettigole force-pushed the abettigole/protoless_land branch from 13910ed to 72606af Compare July 14, 2026 18:09
@ubettigole ubettigole marked this pull request as ready for review July 14, 2026 18:11
@ubettigole ubettigole requested review from a team, behinddwalls and sbalabanov as code owners July 14, 2026 18:11
@ubettigole ubettigole added this pull request to the merge queue Jul 14, 2026
Merged via the queue into main with commit 7cbbbe6 Jul 14, 2026
27 checks passed
@behinddwalls behinddwalls deleted the abettigole/protoless_land branch July 14, 2026 20:07
roychying pushed a commit to roychying/submitqueue that referenced this pull request Jul 14, 2026
## Summary
Remove proto coupling from CancelController.Cancel by changing its
signature
from (*pb.CancelRequest) (*pb.CancelResponse, error) to
(entity.CancelRequest) error.
The empty CancelResponse is now constructed at the handler layer.

Add mapper.ProtoToCancelRequest in the mapper subpackage and wire it
through
GatewayServer.Cancel. Rename entity/cancel_request.go to
entity/cancel.go for
consistency with entity/land.go.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

## Test Plan


## Issues


## Stack
1. uber#359
1. @ uber#360
1. uber#363
1. uber#361

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
roychying pushed a commit to roychying/submitqueue that referenced this pull request Jul 14, 2026
## Summary
Remove proto coupling from StatusController.Status by changing its
signature
to accept entity.StatusRequest and return request.CurrentState directly.

Add mapper.ProtoToStatusRequest and mapper.CurrentStateToProto in the
mapper
subpackage. The Status mapper is the first with a non-trivial
entity-to-proto
direction (translating the CurrentState read model into
pb.StatusResponse).

Add entity.StatusRequest{ID} for input consistency with the other
controllers.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

## Test Plan


## Issues


## Stack
1. uber#359
1. uber#360
1. @ uber#363
1. uber#361

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
roychying pushed a commit to roychying/submitqueue that referenced this pull request Jul 14, 2026
)

## Summary
Remove proto coupling from IngestController.Ingest by changing its
signature
to accept entity.IngestRequest and return entity.IngestResult directly.

Add mapper.ProtoToIngestRequest and mapper.IngestResultToProto in the
mapper
subpackage.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

## Test Plan
Unit tests

## Issues


## Stack
1. uber#359
1. uber#360
1. uber#363
1. @ uber#361

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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