Skip to content

feat: adopt Distributed Model for image generation contracts #5

@MrBT-nano

Description

@MrBT-nano

Proposal: Transition to Distributed Model (Option B) for vtuber_image.v1

To improve coordination and ensure that vtuber-image remains the source of truth for its own gRPC interface, we propose adopting the Distributed Model.

Current Problem

  1. Contract Drift: vtuber-contracts currently maintains a manual copy of image.proto, which has already drifted from the implementation in vtuber-image.
  2. Naming Mismatch: The service and message names in vtuber-contracts (ImageGeneratorService) did not match the initial implementation in vtuber-image (ImageGenerator), leading to integration failures.
  3. Buf Version Inconsistency: The ci.yml in vtuber-contracts uses inconsistent versions of buf, causing "generated/ is out of sync" errors.

What we have done in vtuber-image

  • Aligned all names to match vtuber-contracts standards:
    • service ImageGeneratorService
    • message GenerateRequest
    • message GenerateResponse
  • Verified the build with these new names.

Proposed Solution (Distributed Model)

  1. Source of Truth: vtuber-image will now be the official owner of proto/vtuber_image/v1/image.proto.
  2. Registry Integration: We should use Buf Schema Registry (BSR) or a similar mechanism to allow vtuber-contracts to depend on the vtuber-image protos without manual copying.
  3. CI Alignment: Synchronize buf versions to 1.68.4 across all CI jobs in vtuber-contracts.

Requested Actions for vtuber-contracts

  • Remove the local copy of proto/vtuber_image/v1/image.proto.
  • Configure buf.yaml to depend on the vtuber-image module (once published to BSR).
  • Align ci.yml to use a consistent buf version (recommended: 1.68.4).
  • Run buf generate and commit the updated generated/ files to resolve the "out of sync" errors.

This change ensures that any future updates to the image generation API are driven by the service that implements it, preventing the "buf can't see across repo" issue by using a proper registry.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions