Files
archie/proto
sam 36b25f78cf feat(taskstate): count completed runs in the per-workflow stats
The transition table moved the no-change outcomes to StatusCompleted, so a
run that opens no pull request now ends in a status the per-workflow stats
did not count at all: it was not merged, not in review, not parked, and the
workflows page would have shown it as a run that went nowhere. The count
travels the whole State Store path, since every dashboard consumer reads it
through the gRPC client rather than the local store.

- WorkflowStats filters `completed` beside merged and pr_open; the SQL is
  the count, so a wrong filter reads as zero rather than failing, and
  TestWorkflowStatsCountsCompletedRuns holds it against a real store.
- storecontract.WorkflowStat gains Completed (json "completed"), the proto
  message gains field 9, and workflowStatProto/workflowStatValue carry it;
  TestWorkflowStatProtoCarriesEveryField round-trips every field by name.
- The gateway's chat task report names the status.
- The dashboard counts a completed run as delivered in GatePulseCard's
  totals and badge numerator, and the WorkflowStat/WorkflowStats/WorkflowRow
  interfaces carry the field.
- TestOutcomeSitesAreTransitionsFromRunning is the guard that keeps the
  producer and the table agreeing: it re-reads this package's tc.Outcome
  assignment sites from source and requires each status to be one
  internal/taskstate allows from running, so a new or moved site has to be
  adjudicated against the table instead of discovered on a live run.
2026-09-26 04:01:08 +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.