Skip to content

refactor(gateway): make StatusController operate on entities#363

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

refactor(gateway): make StatusController operate on entities#363
ubettigole merged 1 commit into
mainfrom
abettigole/protoless_status

Conversation

@ubettigole

@ubettigole ubettigole commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

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. 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

@behinddwalls behinddwalls force-pushed the abettigole/protoless_cancel branch from 979acb8 to 96a6ce5 Compare July 14, 2026 20:06
@behinddwalls behinddwalls force-pushed the abettigole/protoless_status branch from a3b7ac5 to 0d3ad54 Compare July 14, 2026 20:06
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>
@behinddwalls behinddwalls force-pushed the abettigole/protoless_status branch from 0d3ad54 to 07c6c36 Compare July 14, 2026 20:13
@behinddwalls behinddwalls changed the base branch from abettigole/protoless_cancel to main July 14, 2026 20:13
@ubettigole ubettigole enabled auto-merge July 14, 2026 20:14
@ubettigole ubettigole added this pull request to the merge queue Jul 14, 2026
roychying pushed a commit to roychying/submitqueue that referenced this pull request Jul 14, 2026
## 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. @ uber#359
1. uber#360
1. uber#363
1. uber#361

Co-authored-by: Claude Opus 4.8 (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 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>
Merged via the queue into main with commit ae46190 Jul 14, 2026
15 checks passed
@behinddwalls behinddwalls deleted the abettigole/protoless_status branch July 14, 2026 20:18
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