Skip to content

API and Protobuf Evolution

SyncTV is currently treated as a new project. Its own protobuf and API drafts may be reorganized freely while contracts are still being shaped. Field order, numbers, and message structure can be cleaned up without adding reserved entries for draft history.

Do not modify third-party vendored protobuf files such as:

  • synctv-proto/proto/buf/validate/validate.proto
  • Other vendored proto or code-generation dependency files
SurfaceMain files or entryUse
HTTP/OpenAPIsynctv-api/src/http/*, /api-docs/openapi.jsonWeb, mobile, third-party SDKs
gRPCclient.proto, admin.proto, provider protoStrongly typed clients and debugging
Realtime WebSocketClientMessage, ServerMessageRoom chat, playback, WebRTC, resource observation
management gRPCmanagement proto and CLIOperations control plane
ChangeCurrent policy
New featurePrefer clear messages, fields, errors, and permissions
Unclear field namesRename and regenerate, updating all callers
Messy field numbersOwn proto can be renumbered without reserved
Unused fieldsRemove after tests confirm no references
Third-party protoDo not edit unless intentionally upgrading the dependency
Error codesKeep range semantics clear and avoid duplicate codes
  1. Confirm the file is SyncTV-owned, not third-party vendored proto.
  2. Update .proto fields, numbers, comments, and RPCs.
  3. Regenerate Rust code.
  4. Update HTTP/gRPC/Realtime implementations and tests.
  5. Update gRPC Debugging, Realtime API, or SDK and API Examples.
  6. If client behavior changes, update Client Integration Guide and Errors.
  7. Run proto, API, and docs checks.
  1. Define auth, permissions, rate limit, body size, and error classification.
  2. Update handler, OpenAPI annotations, and tests.
  3. Start with the openapi feature and confirm Swagger UI and JSON generation.
  4. Update examples, error handling, and client docs.
  5. If room state changes, decide whether Realtime events or resource invalidation are required.

Realtime changes need special care:

  • ClientMessage and ServerMessage oneof fields should be easy to dispatch.
  • New observed resources need a version source, payload, trigger events, and delivery mode behavior.
  • Reconnect semantics must state which observations are rebuilt and which versions can be reused.
  • Avoid pushing large lists or binary data through frequent broadcast messages.
ChangeDocs to update
Login, 2FA, OAuth2, tokenClient integration, security model, errors
Rooms, permissions, membersRooms and permissions, user guide, workflows
Playback, Provider, proxyPlayback model, Provider recipes
Realtime messagesRealtime API, SDK examples
Configuration fieldConfiguration index, full example, topic page
Operations behaviorObservability, troubleshooting, capacity, rotation