refactor(gateway): make StatusController operate on entities#363
Merged
Conversation
This was referenced Jul 14, 2026
2177a97 to
a3b7ac5
Compare
3836962 to
979acb8
Compare
behinddwalls
approved these changes
Jul 14, 2026
979acb8 to
96a6ce5
Compare
a3b7ac5 to
0d3ad54
Compare
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>
0d3ad54 to
07c6c36
Compare
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>
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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