From b6010a79138a334fea760b60e7a3e6de5b09da5e Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Thu, 24 Sep 2026 14:47:53 +1000 Subject: [PATCH] docs(proto): name the Postgres State Store in the state contract comments --- internal/contracts/state/v1/state.pb.go | 10 +++++----- internal/contracts/state/v1/state_grpc.pb.go | 20 ++++++++++---------- proto/state/v1/state.proto | 20 ++++++++++---------- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/internal/contracts/state/v1/state.pb.go b/internal/contracts/state/v1/state.pb.go index 5bfe0a038..8e77fc82b 100644 --- a/internal/contracts/state/v1/state.pb.go +++ b/internal/contracts/state/v1/state.pb.go @@ -1745,7 +1745,7 @@ func (x *Event) GetPrincipalId() string { return "" } -// CapturedEvent mirrors internal/store.CapturedEvent. +// CapturedEvent mirrors storecontract.CapturedEvent. type CapturedEvent struct { state protoimpl.MessageState `protogen:"open.v1"` Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` @@ -2178,7 +2178,7 @@ func (x *Binding) GetUpdatedAt() *timestamppb.Timestamp { return nil } -// WorkflowStat mirrors internal/store.WorkflowStat. +// WorkflowStat mirrors storecontract.WorkflowStat. type WorkflowStat struct { state protoimpl.MessageState `protogen:"open.v1"` Workflow string `protobuf:"bytes,1,opt,name=workflow,proto3" json:"workflow,omitempty"` @@ -2279,7 +2279,7 @@ func (x *WorkflowStat) GetTotalTokens() int64 { return 0 } -// StageStat mirrors internal/store.StageStat. +// StageStat mirrors storecontract.StageStat. type StageStat struct { state protoimpl.MessageState `protogen:"open.v1"` Workflow string `protobuf:"bytes,1,opt,name=workflow,proto3" json:"workflow,omitempty"` @@ -2356,7 +2356,7 @@ func (x *StageStat) GetErrors() int64 { return 0 } -// DayTokens mirrors internal/store.DayTokens. +// DayTokens mirrors storecontract.DayTokens. type DayTokens struct { state protoimpl.MessageState `protogen:"open.v1"` Day string `protobuf:"bytes,1,opt,name=day,proto3" json:"day,omitempty"` @@ -7421,7 +7421,7 @@ type RecordDispatchRequest struct { BindingId string `protobuf:"bytes,1,opt,name=binding_id,json=bindingId,proto3" json:"binding_id,omitempty"` BindingVersion int64 `protobuf:"varint,2,opt,name=binding_version,json=bindingVersion,proto3" json:"binding_version,omitempty"` CaptureId string `protobuf:"bytes,3,opt,name=capture_id,json=captureId,proto3" json:"capture_id,omitempty"` - // task_id addresses the SQLite-owned task tables, which are not migrating. + // task_id addresses the tasks table. TaskId int64 `protobuf:"varint,4,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` unknownFields protoimpl.UnknownFields sizeCache protoimpl.SizeCache diff --git a/internal/contracts/state/v1/state_grpc.pb.go b/internal/contracts/state/v1/state_grpc.pb.go index f99fd10f0..a3a6141a3 100644 --- a/internal/contracts/state/v1/state_grpc.pb.go +++ b/internal/contracts/state/v1/state_grpc.pb.go @@ -92,12 +92,12 @@ const ( // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. // -// StateStore is the single gRPC service fronting archie.db (one store, one -// file). See docs/prds/state-store-contract.md for the ownership split: the +// StateStore is the single gRPC service fronting archie's PostgreSQL database. +// See docs/prds/state-store-contract.md for the ownership split: the // workflow-domain Store view (Update/Transition/InsertEvent) is consumer-owned -// in internal/domain/workflow, while the rest of this surface stays -// producer-owned in internal/store. Both are served by the same service and -// the same *store.Store implementation; the proto bypasses the Go +// in internal/domain/workflow, while the rest of this surface is +// producer-owned in internal/domain/storecontract. Both are served by the same +// service over internal/infrastructure/postgres; the proto bypasses the Go // interfacebloat cap (max 8), like gateway.v1.ChatService does. type StateStoreServiceClient interface { // Administrative task credential lifecycle. Worker credentials cannot call these. @@ -933,12 +933,12 @@ func (c *stateStoreServiceClient) EnqueueBindingTask(ctx context.Context, in *En // All implementations must embed UnimplementedStateStoreServiceServer // for forward compatibility. // -// StateStore is the single gRPC service fronting archie.db (one store, one -// file). See docs/prds/state-store-contract.md for the ownership split: the +// StateStore is the single gRPC service fronting archie's PostgreSQL database. +// See docs/prds/state-store-contract.md for the ownership split: the // workflow-domain Store view (Update/Transition/InsertEvent) is consumer-owned -// in internal/domain/workflow, while the rest of this surface stays -// producer-owned in internal/store. Both are served by the same service and -// the same *store.Store implementation; the proto bypasses the Go +// in internal/domain/workflow, while the rest of this surface is +// producer-owned in internal/domain/storecontract. Both are served by the same +// service over internal/infrastructure/postgres; the proto bypasses the Go // interfacebloat cap (max 8), like gateway.v1.ChatService does. type StateStoreServiceServer interface { // Administrative task credential lifecycle. Worker credentials cannot call these. diff --git a/proto/state/v1/state.proto b/proto/state/v1/state.proto index a7a67fbd1..f682cf832 100644 --- a/proto/state/v1/state.proto +++ b/proto/state/v1/state.proto @@ -4,12 +4,12 @@ package state.v1; import "google/protobuf/timestamp.proto"; -// StateStore is the single gRPC service fronting archie.db (one store, one -// file). See docs/prds/state-store-contract.md for the ownership split: the +// StateStore is the single gRPC service fronting archie's PostgreSQL database. +// See docs/prds/state-store-contract.md for the ownership split: the // workflow-domain Store view (Update/Transition/InsertEvent) is consumer-owned -// in internal/domain/workflow, while the rest of this surface stays -// producer-owned in internal/store. Both are served by the same service and -// the same *store.Store implementation; the proto bypasses the Go +// in internal/domain/workflow, while the rest of this surface is +// producer-owned in internal/domain/storecontract. Both are served by the same +// service over internal/infrastructure/postgres; the proto bypasses the Go // interfacebloat cap (max 8), like gateway.v1.ChatService does. service StateStoreService { // Administrative task credential lifecycle. Worker credentials cannot call these. @@ -298,7 +298,7 @@ message Event { string principal_id = 14; } -// CapturedEvent mirrors internal/store.CapturedEvent. +// CapturedEvent mirrors storecontract.CapturedEvent. message CapturedEvent { string id = 1; google.protobuf.Timestamp received_at = 2; @@ -349,7 +349,7 @@ message Binding { google.protobuf.Timestamp updated_at = 12; } -// WorkflowStat mirrors internal/store.WorkflowStat. +// WorkflowStat mirrors storecontract.WorkflowStat. message WorkflowStat { string workflow = 1; int64 runs = 2; @@ -361,7 +361,7 @@ message WorkflowStat { int64 total_tokens = 8; } -// StageStat mirrors internal/store.StageStat. +// StageStat mirrors storecontract.StageStat. message StageStat { string workflow = 1; string stage = 2; @@ -370,7 +370,7 @@ message StageStat { int64 errors = 5; } -// DayTokens mirrors internal/store.DayTokens. +// DayTokens mirrors storecontract.DayTokens. message DayTokens { string day = 1; int64 tokens = 2; @@ -716,7 +716,7 @@ message RecordDispatchRequest { string binding_id = 1; int64 binding_version = 2; string capture_id = 3; - // task_id addresses the SQLite-owned task tables, which are not migrating. + // task_id addresses the tasks table. int64 task_id = 4; } message RecordDispatchResponse {}