Files
archie/proto
sam 6db00eb8db fix(state): carry event attribution across the state-store boundary
The live path recorded actor_id, actor_kind and principal_id as empty while the
actor was named inside the event's detail text. The daemon records the event and the
State Store holds it, and the contract between them did not carry the three fields,
so the columns were empty by the time anything could query them. An audit query
reading actor_id found nothing and "who approved this" meant parsing a
human-readable string -- the transient, unqueryable attribution this work exists to
replace.

The in-process test passed throughout because it used the local store and never
crossed that hop. The new test runs the same insert through the local adapter AND a
bufconn-backed gRPC client and asserts the columns on both, so the two paths cannot
disagree again.

Verified: task check exit 0 on this tree; the new test passes in both modes. The
grpc mode is reasoned to have failed before this change -- the field did not exist on
the contract, so it could not be set or read -- but that is inference from the
mechanism, not a run I performed against the old code.
2026-09-22 15:13:55 +10:00
..

Service wire contracts

Each canonical service owns proto/<service>/v1/*.proto in this single Buf module. The service directory matches its registry, DNS and chart name. Breaking changes require a new v2, v3, etc. directory; retain published versions for existing consumers. Buf's FILE rules compare against local main. The first introduction skips that comparison only when main has no Buf config.

Run task proto:install once to install the pinned Buf and Go plugins, with $(go env GOPATH)/bin on PATH. Run task proto:generate after editing a schema. Managed mode sets Go package paths; do not set go_package in the source. Generated grpc-go and protobuf files belong in internal/contracts/<service>/v1/ and must be committed, including formatter output. This directory is generated in full; handwritten adapters belong outside it.

task proto:lint checks lint and compatibility; task proto:check regenerates and rejects differences or untracked generated files. Both run in task check and the deployment quality gate. Normal build and test commands use committed Go files and do not require Buf.

Compatibility smoke verification (2026-09-05): copied the gateway schema and gate script into a temporary Git repository, committed it on main, and ran the lint gate from a linked worktree. The unchanged schema passed. Deleting ChatService.Cancel then failed with Previously present RPC "Cancel" on service "ChatService" was deleted. This exercises the same Git-baseline comparison as the gate without modifying the working schema or real main.