Add buf lint/breaking targets and fix proto naming violations

- Add buf.yaml with STANDARD lint rules and FILE-level breaking change detection
- Add proto-lint Makefile target (buf lint + buf breaking --against master)
- Add lint Makefile target (golangci-lint) and include it in all
- Fix proto target: use module= option so protoc writes to gen/ not proto/
- engine.proto: rename rpc Request→Execute and message types accordingly
- acme.proto: drop redundant ACME prefix from SetConfig/ListAccounts/ListOrders messages
- policy.proto: add CreatePolicyResponse/GetPolicyResponse wrappers instead of returning PolicyRule directly from multiple RPCs
- Update grpcserver and webserver/client.go to match renamed types

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-15 10:27:52 -07:00
parent fbaf79a8a0
commit 2336bf5061
22 changed files with 658 additions and 530 deletions

17
buf.yaml Normal file
View File

@@ -0,0 +1,17 @@
version: v2
modules:
# Setting path to proto/ means buf sees files at metacrypt/v1/*.proto,
# which matches the package name metacrypt.v1 as required by PACKAGE_DIRECTORY_MATCH.
- path: proto
lint:
use:
- STANDARD
breaking:
use:
# FILE mode is the strictest: catches wire-breaking changes (removed/renumbered
# fields, changed field types) as well as source-breaking changes (removed RPCs,
# renamed messages). Appropriate for a service with external gRPC clients.
- FILE