Skip to content

docs: generate gRPC schema reference - #1719

Open
Sanskarzz wants to merge 1 commit into
stacklok:mainfrom
Sanskarzz:feat/grpc-api-docs
Open

Sanskarzz wants to merge 1 commit into
stacklok:mainfrom
Sanskarzz:feat/grpc-api-docs

Conversation

@Sanskarzz

Copy link
Copy Markdown

Summary

  • Generate a Docusaurus-compatible gRPC schema reference from the public
    HarnessService and ScheduleService protobuf contracts.
  • Add task docs:grpc-ref, include it in task docs, and add a non-mutating CI
    freshness check.
  • Link the generated schema from the handwritten gRPC reference and transport
    guide.

Development stage

  • Plan / Interface — Bounded/Architectural behavioral and exact-interface contract; no implementation
  • Implementation — based on an approved, merged Plan / Interface PR
  • Combined — compact one-task Bounded/Architectural exception; no separate plan PR,
    and the in-PR plan declares **Expected tasks:** 1, a non-placeholder
    **Combined rationale:**, and no runtime/public/operator/persistence/trust-boundary
    interface change (None — rationale; workflow-only meta-changes may review process
    docs/skills here)
  • Spike / Routine — acceptance-plan spine exempt; Spike evidence does not ship as-is

Contract linkage

  • Work classification: Routine
  • Classification rationale: Documentation generation and navigation only; no runtime, protobuf, or public API behavior changes.
  • Decision record: None — this adds derived documentation for existing contracts.
  • Human waiver of spine: No
  • Acceptance plan: N/A — Routine work is exempt.
  • Human decisions resolved and recorded: N/A — there are no contract decisions.
  • Plan / Interface PR: N/A
  • Approved commit baseline: N/A
  • Combined/exemption rationale: Routine documentation/tooling change.

Interface conformance

  • The generated page documents the existing public mecatl.v1.HarnessService
    and mecatl.v1.ScheduleService contracts. It does not change those contracts.

Issue relationship

Closes #712

Type of change

  • Behavioral/interface plan
  • Bug fix
  • New feature
  • Refactoring (no behavior change)
  • Dependency update
  • Documentation/process
  • Other (describe):

Test plan

Baseline checks

  • Acceptance-plan checker
  • Linting (task lint)
  • Offline test suite (task test)
  • Offline demo (go run ./cmd/mecademo)
  • Markdown changed: docs generation/link checks (task docs)
  • User docs/user-facing behavior changed: site build (task site:build)
  • Guarded engine API affected: compatibility check (task api:check)
  • Intentional engine API change: task api:update + engine/CHANGELOG.md
  • Landed plan: strict acceptance trace (task ac-trace-strict)
  • Final implementation review: /panel-review

The full Go lint/test/demo and engine API gates were not run because this change
does not modify Go code, runtime behavior, or the engine API. Documentation and
workflow-specific gates are listed below.

Additional focused checks:

  • task docs:grpc-ref
  • task lint:actions
  • buf build
  • Non-mutating regeneration and diff of user-docs/reference/grpc-schema.md
  • Source/generated RPC count comparison (88 in both), plus source-type coverage

Changes

File Change
buf.gen.grpc-docs.yaml Pins the Buf-compatible documentation plugin and output.
scripts/grpc-schema.md.tmpl Defines the Docusaurus-safe generated reference format.
user-docs/reference/grpc-schema.md Adds the generated public gRPC schema reference.
Taskfile.yml Adds generation to the normal documentation workflow.
.github/workflows/ci.yml Checks freshness without modifying the checkout.

User-facing change

Readers can look up both public gRPC services, all RPC signatures and streaming
directions, and their messages, enums, fields, and protobuf comments on one
generated reference page.

Special notes for reviewers

The generator intentionally includes only the public Harness and Schedule
contracts. HTTP/OpenAPI/SSE generation remains outside this change and is
tracked separately in #1706. Driver and other internal protobuf contracts are
also excluded.

Descriptions come directly from protobuf comments so the reference cannot
silently diverge from the schema. Some existing comments contain internal ADR,
issue, or implementation references; cleaning those comments would require a
separate protobuf-comment change and is outside #712's no-proto-change scope.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a generated gRPC API reference

1 participant