Skip to content

feat(mcpgen): capture top-level x-sire-scoping OpenAPI extension#8

Merged
dndungu merged 2 commits into
mainfrom
ts2.6-scoping-extension
Jun 5, 2026
Merged

feat(mcpgen): capture top-level x-sire-scoping OpenAPI extension#8
dndungu merged 2 commits into
mainfrom
ts2.6-scoping-extension

Conversation

@dndungu

@dndungu dndungu commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Part 1 of E-WORKER-SCOPING TS2.6 (gate keystone), cross-repo path chosen by the founder.

What: mcpgen.MCPServer now carries a Scoping json.RawMessage field, populated by Convert() from the spec's top-level x-sire-scoping OpenAPI extension (read via libopenapi doc.Extensions). mint does not interpret the value — it is an opaque passthrough; the Sire API scoping layer (ADR 121) parses + enforces it downstream.

Why: MCPServer previously captured only Name/Version/Description/BaseURL/Tools/Auth — top-level extensions were dropped. The API's scoping enforcement resolver needs the descriptor to reach it off the parsed spec (the single-source-of-truth, ADR-faithful path). This change makes that possible.

Resilience: an absent or undecodable extension yields nil Scoping (omitted from JSON), which downstream is treated as end-user-unavailable (fail-closed default-deny) — never an error during spec parsing.

Tests: present (descriptor captured as canonical JSON) + absent (nil, omitted from marshaled output). Full mint suite green, gofmt/vet/golangci-lint clean.

Next: after this merges + a mint release (v1.7.8), the api side bumps the mint dep, implements an integration.Registry-backed ManifestSource, wires it in serve.go, and declares the Shopify Pattern-B reference descriptor.

dndungu added 2 commits June 4, 2026 21:54
Adds MCPServer.Scoping (json.RawMessage) populated by Convert() from the
spec's top-level `x-sire-scoping` extension via libopenapi doc.Extensions.
mint treats the value as an opaque passthrough; the Sire API scoping layer
(ADR 121) parses and enforces it. Absent/undecodable extension yields nil
(fail-closed default-deny downstream). Unblocks api-side TS2.6 descriptor
sourcing off the integration registry's parsed spec.
…heck)

Pre-existing govulncheck failures (main last ran CI in April, before these
CVEs published) that block all PRs: stdlib net/textproto/crypto/x509/
html/template/net (fixed in go 1.26.2-1.26.4), golang.org/x/net GO-2026-5026
(v0.55.0), go-jose/v4 (v4.1.4). govulncheck now reports no vulnerabilities.
Aligns mint with the rest of the project (api go.work already requires 1.26.4).
@dndungu dndungu merged commit 8ae10d4 into main Jun 5, 2026
3 checks passed
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