Skip to content

feat(spec): console-management ops — pricing/custody/engine/gpu (epic P3) - #72

Merged
yakimoto merged 6 commits into
mainfrom
feat/mcp-spec-console-ops
Sep 1, 2026
Merged

feat(spec): console-management ops — pricing/custody/engine/gpu (epic P3)#72
yakimoto merged 6 commits into
mainfrom
feat/mcp-spec-console-ops

Conversation

@yakimoto

@yakimoto yakimoto commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

What

Six new operations across four paths in openapi.yaml, giving the DERIVED MCP plane coverage
of the console-management surfaces: /pricing/manifests (GET+POST), /custody/{op} (POST,
4-op enum), /engine/capabilities (GET), /gpu/infer (POST) + /gpu (GET). Schemas:
PricingManifest + ValidationError (the gateway's standard error shape).

Why — the derivation law

wave-gateway's MCP product tools are a derived-only projection (openapi-spec ops ∩
enforcedV1Groups, mcp-product-tools.ts:20-25). The audit found pricing/custody/members/
mail/engine/gpu unreachable BY CONSTRUCTION — not an MCP gap but a SPEC gap. This PR closes
the spec half; a gateway deploy regenerates the tool list.

Excluded, with receipts (the real-systems law)

  • members — console-plane: org roster lives in Supabase org_members behind the session
    (/api/console/members), NOT a gateway-enforced group. The derivation would drop it; a spec
    entry would advertise a route the gateway doesn't serve.
  • mail/timeline — spoke-direct (wave-mail-edge); mail is not in EDGE_SPOKE_GROUPS, so
    /v1/mail is not gateway-enforced. Same verdict.

Verification

  • yaml.safe_load parses; 4 paths / 6 ops / both schemas present.
  • Shapes derived from the handlers: pricing (src/pricing-manifests.ts response {org,manifests}),
    custody (src/capability-custody.ts receipt-only), engine (capabilities.json contract),
    gpu (wave-gpu-edge metering notes).

Notes

The P3 chain: this PR merges → api-spec regen (npm run spec:sync pins the SHA) → gateway
deploy → MCP tool list includes wave_pricingManifestsList / wave_custodyOperation /
wave_engineCapabilities / wave_gpuInfer / wave_gpuStatus.


Note

Medium Risk
Spec-only, but it formalizes operator-plane custody and billable GPU inference; incorrect shapes or scope docs could mislead integrators until gateway enforcement matches.

Overview
Expands the public OpenAPI contract so console-management gateway routes that already exist can be derived into MCP product tools (spec ∩ enforced route groups).

Adds four paths and six operations: GET/POST /pricing/manifests (org-scoped list and validated upsert; pricing:read / pricing:write), POST /custody/{op} with grant|revoke|inspect|exercise (custody:write, metadata-only receipts, 503 when unconfigured), GET /engine/capabilities (engine:read), and GET/POST /gpu/infer (plane status and metered inference; gpu:read / gpu:write). Introduces the PricingManifest component schema and new OpenAPI tags (Pricing, Custody, Engine, Gpu).

Regenerates generated/api-types.d.ts so TypeScript clients pick up the new paths entries and operations typings. No runtime gateway behavior changes in this repo—downstream spec sync and gateway deploy are what surface new MCP tools.

Reviewed by Cursor Bugbot for commit 4567374. Bugbot is set up for automated code reviews on this repo. Configure here.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Summary by Sourcery

Expand the OpenAPI contract to expose existing console-management pricing, custody, engine, and GPU surfaces for downstream API tooling.

New Features:

  • Add OpenAPI coverage for pricing manifest listing and upsert operations, custody actions, engine capabilities, and GPU inference and status endpoints.

Enhancements:

  • Define the associated pricing, custody, engine, and GPU tags, operation contracts, authorization requirements, and response shapes in the public API specification.

Build:

  • Regenerate API type definitions from the expanded OpenAPI contract.

Tests:

  • Verify the updated OpenAPI document parses and contains the expected paths, operations, and schemas.

Review in cubic

…y, engine capabilities, gpu infer/status (rendering-completeness-epic P3)

The MCP product-tool plane is a DERIVED projection (openapi-spec ops ∩ enforcedV1Groups) —
spec-coverage is the bottleneck, so these four paths/ops unlock derived wave_* tools:
- /pricing/manifests GET+POST (pricing:read/write) — shapes from src/pricing-manifests.ts
- /custody/{op} POST grant|revoke|inspect|exercise (custody:write, operator-plane) — from
  src/capability-custody.ts (receipt-only responses; secrets never in payloads)
- /engine/capabilities GET (engine:read) — media-engine capability contract
- /gpu/infer POST + GET status (gpu:read/write) — wave-gpu-edge

EXCLUDED with receipts: members (console-plane — Supabase org_members behind the session,
NOT a gateway-enforced group; the derivation would drop it) and mail/timeline (spoke-direct,
mail is not in EDGE_SPOKE_GROUPS so /v1/mail is not gateway-enforced).

Gateway deploy follows the merge; the derived tool list regenerates on deploy.
@codeant-ai

codeant-ai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Your free trial PR review limit of 300 PRs has been reached. Please upgrade your plan to continue using CodeAnt AI.

@qodo-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because your workspace is out of credits. Ask your workspace admin to add credits to resume reviews. Manage billing

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry @yakimoto, this account has used its review budget of 2,500,000 diff characters for the last 7 days.

You can request another review in 1 day and 11 hours by commenting @sourcery-ai review.

@cursor

cursor Bot commented Sep 1, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_2b448546-ec1c-4761-b191-b1bce8331276)

@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 4 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available. Your 92 included PR review attempts over the past 7 days set your current allowance at 1 review per hour.

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Team

Run ID: ba4593b0-73d6-4c24-8fea-9c63a1e45154

📥 Commits

Reviewing files that changed from the base of the PR and between 42b1781 and 4567374.

⛔ Files ignored due to path filters (1)
  • generated/api-types.d.ts is excluded by !**/generated/**
📒 Files selected for processing (1)
  • openapi.yaml

Comment @coderabbitai help to get the list of available commands.

@sourcery-ai

sourcery-ai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Reviewer's Guide

Extends openapi.yaml with six gateway-enforced operations across pricing, custody, engine, and GPU surfaces, including their request/response shapes, authorization and error behavior, plus shared pricing and validation schemas so downstream spec synchronization can derive the corresponding MCP tools.

Sequence diagram for gateway-enforced GPU inference

sequenceDiagram
    participant MCP as MCP client
    participant Gateway as Wave Gateway
    participant GPU as wave-gpu-edge

    MCP->>Gateway: gpuInfer
    Gateway->>GPU: POST /gpu/infer + x-wave-gateway-secret
    GPU-->>Gateway: Job receipt + x-wave-meter
    Gateway-->>MCP: Job receipt

    MCP->>Gateway: gpuStatus
    Gateway->>GPU: GET /gpu
    GPU-->>Gateway: Plane status
    Gateway-->>MCP: Plane status
Loading

File-Level Changes

Change Details Files
Adds OpenAPI coverage for pricing manifest management.
  • Defines org-scoped manifest listing and create/upsert operations.
  • Documents pricing permissions and unauthorized/forbidden responses.
  • Adds reusable PricingManifest and ValidationError schemas.
openapi.yaml
Adds the custody capability operation surface.
  • Introduces a parameterized POST endpoint with grant, revoke, inspect, and exercise operations.
  • Documents custody request fields, receipt-only responses, validation failures, and unconfigured-service errors.
  • Captures org scoping and operator-plane authorization requirements.
openapi.yaml
Adds media engine and GPU plane endpoints.
  • Defines the engine capability contract read operation.
  • Defines GPU inference dispatch and GPU status operations.
  • Documents per-operation permissions, gateway secret stamping, and GPU metering behavior.
openapi.yaml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Comment thread openapi.yaml Outdated
Comment thread openapi.yaml
@macroscopeapp

macroscopeapp Bot commented Sep 1, 2026

Copy link
Copy Markdown

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — The change expands the public contract and downstream tool surface to include pricing writes, held-fund custody operations, and metered GPU inference. Its security, financial, and externally exposed capability implications warrant human review despite no handler implementation changing in this repository.

Not approved because:

  • Credit balance exhausted. Approvability relies on correctness review in order to determine eligibility

Review your spending limits in Billing settings. You can add or adjust custom eligibility rules. Learn more.

…the sdk-types gate compares the committed artifact)
@codeant-ai

codeant-ai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Your free trial PR review limit of 300 PRs has been reached. Please upgrade your plan to continue using CodeAnt AI.

@cursor

cursor Bot commented Sep 1, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_38db4807-697f-4526-a80c-74231763777c)

@codeant-ai

codeant-ai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Your free trial PR review limit of 300 PRs has been reached. Please upgrade your plan to continue using CodeAnt AI.

@cursor

cursor Bot commented Sep 1, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_a9ac5102-abe2-49e5-bdee-cf924766e06d)

…w (responses/ValidationError ref, drop the duplicate schema); declare the new tags
@codeant-ai

codeant-ai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Your free trial PR review limit of 300 PRs has been reached. Please upgrade your plan to continue using CodeAnt AI.

@cursor

cursor Bot commented Sep 1, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_ae1a3772-7413-402a-a9a0-7547b866fe0a)

@codeant-ai

codeant-ai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Your free trial PR review limit of 300 PRs has been reached. Please upgrade your plan to continue using CodeAnt AI.

@cursor

cursor Bot commented Sep 1, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_c1b2cf2a-36e5-4d65-a820-859cf9475e2e)

@gitar-bot

gitar-bot Bot commented Sep 1, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 2 resolved / 2 findings

Adds six new console-management operations (/pricing/manifests, /custody/{op}, /engine/capabilities, /gpu/infer, /gpu) to the OpenAPI spec with PricingManifest and ValidationError schemas, unblocking derived MCP tooling. Resolved schema reuse and tag declaration issues; no open findings.

✅ 2 resolved
Quality: New ValidationError schema diverges from standard Error envelope

📄 openapi.yaml:2095-2099 📄 openapi.yaml:2142-2155 📄 openapi.yaml:4113-4122 📄 openapi.yaml:21-23 📄 openapi.yaml:2285-2290 📄 openapi.yaml:4113-4121 📄 openapi.yaml:2099 📄 openapi.yaml:2146 📄 openapi.yaml:2155
The new operations point their 400/503 responses at a brand-new #/components/schemas/ValidationError whose shape is { ok: boolean, error: { code, message } }. This contradicts the spec's own documented normalized WAVE envelope { "error": { "code", "message" } } (openapi.yaml:22) and the existing Error schema that every other error response (Unauthorized, Forbidden, ValidationError response, etc.) references. The added ok field is not part of the gateway error contract and no fields are marked required, so generated clients/docs will advertise a wrong, non-standard error body. Reuse the existing #/components/responses/ValidationError/#/components/schemas/Error instead of defining a new divergent schema.

Quality: New tags Pricing/Custody/Engine/Gpu not declared in top-level tags

📄 openapi.yaml:2048 📄 openapi.yaml:2107 📄 openapi.yaml:2159 📄 openapi.yaml:2180 📄 openapi.yaml:2208 📄 openapi.yaml:40-54 📄 openapi.yaml:2073 📄 openapi.yaml:40
The new operations use tags Pricing, Custody, Engine, and Gpu, but none are added to the top-level tags: list where every other tag is declared with a description (openapi.yaml:40+). Undeclared tags render without descriptions and break the file's convention. Add the four tag entries to the top-level tags: list.

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@codeant-ai

codeant-ai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Your free trial PR review limit of 300 PRs has been reached. Please upgrade your plan to continue using CodeAnt AI.

@cursor

cursor Bot commented Sep 1, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_f7caad76-8477-4689-a8f7-aac5d354dce5)

@yakimoto
yakimoto merged commit b7b6ba9 into main Sep 1, 2026
20 checks passed
@yakimoto
yakimoto deleted the feat/mcp-spec-console-ops branch September 1, 2026 14:59
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.

1 participant