Skip to content

feat(handler): add handler package acting as passthrough to controller - #328

Merged
justinwon777 merged 2 commits into
mainfrom
justin.won/handler-passthrough
Oct 8, 2026
Merged

justinwon777 merged 2 commits into
mainfrom
justin.won/handler-passthrough

Conversation

@justinwon777

@justinwon777 justinwon777 commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Add the handler package as a pure passthrough. The handler takes the existing proto-typed controller and forwards GetTargetGraph, GetChangedTargets and GetChangedTargetGraph to it unchanged. Code in controller will be migrated to handler in later PRs.

Register the handler in example/main.go and in the integration test instead of the controller. This starts a step-by-step move of the transport layer out of the controller.

Test plan:

  • go test ./handler/... checks that each method forwards its arguments and returns the error of the controller.
  • make build, make test and make lint pass.

Issue

#325

@justinwon777
justinwon777 requested review from a team as code owners October 8, 2026 08:09
Add the handler package as a pure passthrough. The handler takes the
existing proto-typed controller and forwards GetTargetGraph,
GetChangedTargets and GetChangedTargetGraph to it unchanged. The handler
does not validate, map, filter, chunk, convert errors or record metrics,
so metrics do not double count.

Export a controller.Controller interface and generate
controller/controllermock from it. The handler depends on the interface,
and the handler tests use the generated mock.

Register the handler in example/main.go and in the integration test
instead of the controller. This starts a step-by-step move of the
transport layer out of the controller.

Test plan:
- go test ./handler/... checks that each method forwards its arguments
  and returns the error of the controller.
- make build, make test and make lint pass.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@justinwon777
justinwon777 force-pushed the justin.won/handler-passthrough branch from 4660a94 to 30bd419 Compare October 8, 2026 08:12
@justinwon777
justinwon777 merged commit 54d0964 into main Oct 8, 2026
10 checks passed
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