Skip to content

chore: retire the proto/buf toolchain, codegen, second port, and CI gen (Phase 4, #135)#207

Merged
SyniRon merged 1 commit into
developfrom
agent/issue-135
Jun 20, 2026
Merged

chore: retire the proto/buf toolchain, codegen, second port, and CI gen (Phase 4, #135)#207
SyniRon merged 1 commit into
developfrom
agent/issue-135

Conversation

@SyniRon

@SyniRon SyniRon commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator

Closes #135. Part of the "Goodbye gRPC" program (PRD #112), Phase 4. The Phase 3 cutover (#134) already moved serving to a single HTTP listener, and 3.0.0 has soaked, so this removes the proto/gRPC machinery that nothing reaches anymore.

What's deleted

  • proto/ in full: milpacs.proto, tickets.proto, every generated *.pb.go / *.pb.gw.go / *_grpc.pb.go, and proto/deprecation_test.go.
  • Buf config: buf.gen.yaml, buf.lock, buf.yaml, and the codegen tool pins in tools.go.
  • cmd/example.go, the only non-generated proto consumer (the gRPC sample client).
  • Generated Swagger 2.0 assets openapi/assets/{milpacs,tickets}.swagger.json and openapi/openapi_test.go.
  • Build, CI, and deploy codegen: the install/generate/buf-lint targets in Makefile and magefile.go; the buf install and make generate steps in .github/workflows/go.yml; the release-time proto-version sed in build_and_push.yml; the make install/buf/make generate steps in the Dockerfile; and the second :10000 port plus grpc_pass block in docker-compose.yaml and docker/nginx/default.conf.

One coordinated non-deletion change

Issue #117 resolved that no consumer generates client code from the served spec, so the docs surface is repointed from the retired Swagger 2.0 files to the hand-owned OpenAPI 3.1 document. rest/docs.go now serves openapi/openapi.yaml (embedded via openapi.Spec) with build-version stamping, index.html loads it, and rest/docs_test.go is rewritten to pin the 3.1 surface and assert the 2.0 paths 404. The golden corpus (contract/spec_test.go) already validates that same document, so the public contract stays covered.

Dependency delta

The build graph drops from 209 modules to 90 (about 119 removed). grpc, grpc-gateway, buf, and protoc are gone from the graph. One google.golang.org/protobuf indirect remains as a transitive dependency of the Prometheus client.

Verification

go build ./..., go vet ./... (now what make lint runs), and go test ./... are all green. go mod tidy is a no-op. The golden contract suite passes, which confirms the served HTTP contract survived the deletion. No buf or protoc invocation is left anywhere in the repo, CI, or build tooling.

Follow-up

The README.md quickstart and ADRs 0001/0002 still describe the old split-process design. Superseding those belongs to #136 (the Phase 4 docs pass), so they're left for that PR.

This was generated by AI

… second port (#135)

Phase 3 (#134/#206) collapsed serving to a single HTTP listener, leaving the
proto/buf machinery referenced only by generated code and the gRPC example
client. This removes all of it.

Deleted surfaces:
- proto/ in full: milpacs.proto, tickets.proto, every generated .pb.go,
  .pb.gw.go, and _grpc.pb.go, plus the proto-coupled deprecation_test.go.
- buf config: buf.gen.yaml, buf.lock, buf.yaml, and the codegen tool pins in
  tools.go.
- cmd/example.go, the only non-generated proto consumer (the gRPC sample
  client). serve still works; root's description no longer claims gRPC.
- Generated Swagger 2.0 assets (milpacs.swagger.json, tickets.swagger.json)
  and openapi/openapi_test.go, which asserted the 2.0 keycloak surface.

Docs serving now points at the 3.1 spec. Per the #117 ruling (no consumer
codegens from the served spec), the hand-owned OpenAPI 3.1 document
(openapi/openapi.yaml) replaces the retired 2.0 files at the docs URL.
DocsHandler serves it at /openapi.yaml with build-version stamping, and the
Swagger UI shell loads it. The golden corpus already validates this document,
so the public contract stays covered.

Build, CI, and deploy:
- Makefile and magefile drop install/generate and the buf lint/breaking
  targets. make lint is now go vet.
- go.yml drops the buf install and make generate steps; the lint job runs go
  vet.
- build_and_push.yml drops the release-time proto-version sed. The version
  reaches the spec at runtime via the build-time version var.
- Dockerfile drops make install, buf install, and make generate, and stops
  exposing the gRPC port. docker-compose and the nginx template drop the
  :10000 second port and its grpc_pass block, so there is one listener in code
  and in config.

go mod tidy shrinks the build graph from 209 to 90 modules (about 119 removed),
in line with the PRD's ~100-module estimate. grpc, grpc-gateway, buf, and
protoc are gone from the graph entirely.

The throwaway request-log analytics and the duration= obligation were already
retired with the old gateway in Phase 3, so there is nothing to remove here.

*This was generated by AI*
@SyniRon
SyniRon merged commit 140d76e into develop Jun 20, 2026
3 checks passed
@SyniRon
SyniRon deleted the agent/issue-135 branch June 20, 2026 16:28
SyniRon added a commit that referenced this pull request Jun 20, 2026
Record the rationale for retiring the split-process design now that the
Phase 4 delete sweep (#135, PR #207) has landed.

- New ADR 0006: single-listener net/http service with a hand-owned
  OpenAPI 3.1 contract. Supersedes ADR 0001 (split process) and ADR 0002
  (intra-process plaintext dial); both now carry a superseded header
  pointing at 0006 and #135. Records the Swagger 2.0 full-retirement
  decision per the #117 answer (no consumer codegens from it).
- CONTEXT.md: the contract is now the trio (types package, OpenAPI 3.1
  spec, golden corpus); wire conventions recorded as house style; an
  add-an-endpoint checklist added; the Keycloak note moved to past tense.
- README.md: refreshed to the post-#135 reality. Single listener, no
  codegen, no gRPC example client, no make generate/install/certs.

*This was generated by AI*
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.

Phase 4: delete the gRPC server, gateway, proto/buf toolchain, second port, and CI codegen

1 participant