version: v2 # One module rooted at this directory, because that is what the imports assume: # every file opens with `import "kbve/common/v1/..."`, which resolves against # this directory and nowhere else. modules: - path: . name: buf.build/kbve/proto lint: use: - STANDARD # meme/ and kbve/common.proto predate this tree. They are the hand-written # pair apps/memes-web generates its Zod schemas from, and they are superseded # by kbve/meme/v1 and kbve/common/v1 -- same domains, versioned packages. # They are ignored rather than deleted so that migration is its own change # with its own review, instead of a silent edit to an app's codegen input. ignore: - meme - kbve/common.proto # The RPC naming rules exist so a request can gain a field without dragging # every other caller of the same message along. They assume the request type # is the RPC's own wrapper, and in these two places it is not. # # ClickHouse's TailLogs streams `LogEntry`, which is a log row -- the same # row QueryLogsResponse returns in a repeated field. Renaming it # TailLogsResponse would name a row after one of the two RPCs that emit it. # # Redis's RedisCommand and RedisResponse are the command envelope, carried # over the websocket path in RedisWsMessage as well as over gRPC. Their names # describe what they are; SendCommandRequest would describe only one of the # two transports that carry them. # # ROWS's HealthStream is bidirectional and open for the life of a game # server. ServerHeartbeat is what the server sends on a timer and # ServerCommand is what ROWS pushes back; neither is a request or a response. # # The ignored enums mirror a Postgres SMALLINT domain whose zero is a real # value rather than an unspecified sentinel, and whose numbers are what the # transport puts on the wire: mc lot_state 0 is vacant, build_apply_state 0 # is queued, build_action_kind 0 is build, and gh.issue_event.delivery_state # 0 is pending. Each of those zeros is also the column's own DEFAULT, so an # unset field decodes to what the database would have stored. The job board's # enums are the same case at scale, and empire's CityStateStatus has no # unspecified value because a city-state nobody has spoken to is hostile. ignore_only: ENUM_ZERO_VALUE_SUFFIX: - kbve/empire/v1/empire.proto - kbve/git/v1/git_event_queue.proto - kbve/jobboard/v1/jobboard.proto - kbve/mc/v1/mc_lot.proto RPC_REQUEST_STANDARD_NAME: - kbve/redis/v1/redis.proto - kbve/rows/v1/rows_service.proto RPC_RESPONSE_STANDARD_NAME: - kbve/redis/v1/redis.proto - kbve/clickhouse/v1/clickhouse.proto - kbve/rows/v1/rows_service.proto breaking: use: - FILE