feat(proto): publish Go protobuf stubs for workhorse integration

Summary

Adds a root-level Go module so Workhorse can import GKG protobuf stubs as a normal Go dependency, matching the pattern used by Gitaly (gitlab.com/gitlab-org/gitaly/v18).

  • Root go.mod with module path gitlab.com/gitlab-org/orbit/knowledge-graph
  • Generated gRPC stubs in gkgpb/, generated from crates/gkg-server/proto/gkg.proto
  • Uses protoc -M flag to set go_package without modifying the source proto
  • Semantic-release vX.Y.Z tags work directly as Go module versions (no prefixed tags needed)
  • Pinned protoc-gen-go v1.36.11 and protoc-gen-go-grpc v1.6.1 for reproducible builds
  • CI job check-go-proto validates stubs on proto/Go changes and release tags

How Workhorse imports it

After the next release tag (e.g., v0.19.0):

require gitlab.com/gitlab-org/orbit/knowledge-graph v0.19.0
import gkgpb "gitlab.com/gitlab-org/orbit/knowledge-graph/gkgpb"

Regenerating stubs

mise run proto:go
mise run proto:go:check

Prior art

  • Gitaly: single root go.mod (gitlab.com/gitlab-org/gitaly/v18), proto stubs at proto/go/gitalypb/ as sub-package, plain vX.Y.Z tags
  • ai-assist: sub-directory go.mod (clients/gopb/), no sub-module tags, consumers use pseudo-versions -- not ideal

This MR follows the Gitaly pattern for a clean, tag-based Go module.

Related: #349 (closed), #348 (closed) Depends on: !730 (merged) (ADR 008)

Edited by Michael Angelo Rivera

Merge request reports

Loading
Loading