Skip to content

feat: add GitHub Action for automated proto drift detection #49

Description

@rhuss

Problem

The SDK must stay in sync with upstream proto changes from NVIDIA/OpenShell. Proto files change frequently (OpenShell is pre-beta), and currently someone has to manually run /openshell-proto-sync or mise run proto:gen to detect drift.

Existing tooling

We already have the building blocks:

Tool What it does
mise run proto:gen Regenerates Go bindings from .proto source files using Buf
mise run proto:check Diffs generated files against source, fails if out of date (runs in make ci)
/openshell-proto-sync skill Full workflow: fetch upstream protos, regenerate, gap analysis, triage, implement small items, escalate large items to SpecKit brainstorm
UPSTREAM_PATH env var Overrides default upstream path for proto:gen

Proposal

Add a scheduled GitHub Action that:

  1. Runs on a cron schedule (daily or weekly, configurable).
  2. Checks out both repos: this SDK and NVIDIA/OpenShell (upstream main).
  3. Copies upstream proto files into the SDK's proto/ directory.
  4. Runs mise run proto:gen to regenerate bindings.
  5. Runs mise run proto:check to detect drift.
  6. If drift is detected:
    • Diffs the generated output to identify what changed (new fields, new RPCs, removed fields, new proto files).
    • Creates a GitHub issue with a structured gap analysis table (category, item, size, suggested action).
    • Labels the issue proto-sync.
    • Skips issue creation if an open issue with the same proto diff fingerprint already exists (avoid duplicates).
  7. If no drift: exits silently.

Optional enhancements (future)

  • Auto-create a PR with the regenerated bindings for purely mechanical syncs (no SDK code changes needed).
  • Post a Slack notification to the team channel when drift is detected.
  • Include a link to the /openshell-proto-sync skill in the issue body so the assignee knows how to resolve it.

Implementation notes

  • The Action needs access to the upstream repo (public, no auth needed).
  • Buf, protoc-gen-go, and protoc-gen-go-grpc need to be installed in the Action runner. These are already pinned in .mise.toml.
  • The drift fingerprint for dedup could be a hash of the diff output.

References

  • Proto sync skill: .claude/skills/openshell-proto-sync/SKILL.md
  • Mise proto tasks: .mise.toml (lines 75-130)
  • Existing proto sync CI PR against upstream: NVIDIA/OpenShell#2344

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions