Skip to content

mcp: OSS-370 partial integration (path B hold, 9 stream ops pending) - #531

Merged
athNdev merged 21 commits into
mainfrom
codex/mcp-integration
Nov 18, 2026
Merged

athNdev merged 21 commits into
mainfrom
codex/mcp-integration

Conversation

@athNdev

@athNdev athNdev commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

OSS-370 — path B partial integration at head 18348416764900bd8f570e0d4c1db8eafa4b5270

No merge, release or registry write. Chosen path: B — no enabled-but-unusable tool advertisement.

Why B

The standalone carbonpanel-mcp gateway has no authenticated controller-side streaming transport and must not share panel/node storage with the gateway process. The prior scoped_stream_* prototype held bytes inside the gateway; mounting those tools in production would advertise tools that always fail. They are therefore absent from the generated catalog and from NewServer. SetStreamTransfer has no production call site — no tools/list-only or nil-transfer advertisement is used as evidence.

Exact PENDING inventory (9)

internal/mcp/integration_pending.go: DownloadArchive, ExportWorld, GetFile, InitFileDownload, SaveUploadedFile, InitUpload, UploadChunk, rest_upload_stream, rest_download_stream. Each has a reason and a follow-up item. Committed plan: docs/plans/mcp-controller-side-stream-transport.md (controller-side authenticated bounded frame RPCs, fresh files:create[server_id] at commit, bounded session context with real deadlines/cancellation, documented session policy on permission change).

Reconciled 221-RPC / OSS-383 surface

Current main merged (including PR538 18846336) and catalogs regenerated: declared 231, mounted 221, supported 201. player_service_lookup_player and player_query/request_id on the manual allowlist are LISTED, REACHABLE and VERIFIED via real tools/call: FOUND/NOT_FOUND/AMBIGUOUS/UNAVAILABLE statuses, exact UUID/username field assertions, no persistent identity mutation, and scoped allowlist add with its request id. Prior gates kept: exact typed-field mapping, negative fixtures, allowlist, and no double registration.

Counts (honest)

declared 231 / mounted 221 / combined tools 198 / LISTED 201 / REACHABLE 201 / VERIFIED 192 / PENDING 9 / EXCLUDED 58. TestFamilyAudit/SupportedOperationsGate is intentionally RED for the 9 pending operations; full coverage and publication gates remain open.

Verification

Pinned Go 1.26.11: go build ./... and go vet ./... pass; go test ./... -count=1 passes all packages except the intentionally RED SupportedOperationsGate (9 PENDING); golangci-lint --new-from-rev=7e6b1216 reports 0 issues; knowledge-lint -fix + final pass 40/40 queries. No full-coverage claim until the 9 pending operations have production transport evidence.

- check Close and structured-error helper returns in fixtures (errcheck)
- use fmt.Fprintf in catalog generator per QF1012
- remove unused specFor helper
Machine-readable descriptors for 52 RPCs across nine supported service families plus 11 scoped REST/protocol surfaces; typed handlers for all 51 reachable tools with confirm gates, bounded args and response redaction. Disposable httptest fixtures prove success, scoped PermissionDenied and Unauthenticated for every reachable tool. Only daemon discovery stays excluded, with exact source and named equivalent. The first-slice catalog is untouched; the integration owner consumes the exported descriptors.
Add the OSS-373 scoped-administration module as two isolated files under
internal/mcp with the family_admin_ prefix; shared catalog files are untouched.

- LISTED 56 RPCs across AuthService, UserService, RoleService, SubuserService,
  ProxyService and ConfigService with typed Connect client, exact live RBAC
  scope, read/mutation flag, bounds and classification.
- REACHABLE 46 tools using typed clients, bound checks in Go and schema,
  confirm gates on all 25 mutations, and protojson normalization with secret
  redaction (invite codes, plaintext tokens, password/credential properties).
- EXCLUDED 10 procedures as private protocol mechanics or intentional
  operator-only operations, each with exact file:line source evidence and a
  supported equivalent where one exists.
- VERIFIED 46 tools with disposable httptest Connect handlers behind the real
  auth interceptor, scoped tokens, and structured success/PermissionDenied/
  Unauthenticated evidence; plus scope-drift, redaction and coverage tests.

Verification: go build ./...; go vet ./internal/mcp/...;
go test ./internal/mcp/... -count=1; knowledge-lint read-only OK.
OSS-374 full-coverage lane: machine-readable audit of 22 mounted REST/transport surfaces with exact file:line source reasons, SUPPORTED WORKFLOW vs PRIVATE/TRANSPORT decisions and typed equivalents. Adds typed-path clients and fixture evidence (success plus structured denial) using existing ACLs and bounded upload/download sessions. Additive only; shared catalog files untouched.
Adds a machine-checkable coverage matrix for every declared RPC (230),
mounted RPC (220) and non-RPC product surface, with exact file:line
reasons and supported equivalent flows for every exclusion. Keeps LISTED,
REACHABLE and VERIFIED as separate counts. The gate test fails on any
supported operation that lacks a listed, reachable, fixture-verified tool;
integrity checks pass and prove the baseline evidence is accurate.

Only family_audit_* files are added; shared catalog files are untouched.
Merge the five family heads (core lint fix, server, content, admin, stream,
audit) into one generated catalog. A single cataloggen run now emits both the
descriptor table and the combined exposed tool list, resolving duplicate
first-slice/family tools by source precedence. Production registration mounts
the pinned 30-tool slice, every family hand-off and 23 integration-owned
tools covering the previously unimplemented SUPPORTED operations.

Audit exclusions stay exact: 58 OUT OF SCOPE operations are removed from the
live tool set with their source reasons and equivalent flows preserved in the
matrix. The SupportedOperationsGate is green for all 200 SUPPORTED operations
(LISTED=200, REACHABLE=200, VERIFIED=200 behind the production auth
interceptor); declared=230, mounted=220, combined tools=197.

Also updates the governing MCP knowledge concept and adapts stale family
test assumptions to the integrated catalog.
Replace the registration/regex VERIFIED signal with executable invocation
evidence: every supported operation is driven through a real tools/call over
the SDK stdio wire against a disposable typed Connect fixture behind the
production auth interceptor. Evidence requires the typed method to be reached,
arguments mapped into the request, the handler outcome/Connect status observed,
and resource scope exercised (granted success plus denied ungranted token).
Review tools also prove their confirm gate where the spec declares one.

Bind the audit allowlist to the server before any add* helper runs, so excluded
tools are never inserted into the live set. Register in reverse generator
priority because go-sdk replaces same-name tools last-wins, and assert live
tools/list metadata matches the generated catalog. Add end-to-end byte evidence
for scoped upload/download and verify real AuthService.Logout behavior for a
dp_ API token (reports success but does not revoke the token); pin the honest
tool description. Correct the server instructions to report the combined count.
@athNdev athNdev changed the title mcp: integrate combined OSS-370 catalog with full audit coverage mcp: integrate combined OSS-370 catalog with executable full-coverage evidence Nov 18, 2026
Add family_admin_conformance_test.go as the OSS-373 executable evidence
layer. No shared catalog or integration file is touched.

- 46 real MCP SDK stdio tools/call requests drive typed Connect clients
  against recording handlers mounted at each exact generated procedure
  behind rpc.NewAuthInterceptor; each case asserts the typed handler was
  reached once, the mapped bounded request fields, the scoped bearer
  header, and the handler's real response outcome.
- 39 scoped PermissionDenied and 44 Unauthenticated rejections assert
  zero typed handler calls; object-scope outcomes assert srv-1 reaches
  the handler and srv-2 is denied before it.
- All 25 confirm-gated mutations assert confirmation_required with zero
  RPCs reaching a handler.
- 8 secret-bearing results assert invite codes, one-time API token
  plaintext and password-typed config values are redacted; a live
  Velocity-secret probe proves no MCP tool reaches that procedure.
- AuthService.Logout with a dp_ API token is exercised through the real
  interceptor: handler returns 'logged out', the token still authenticates
  and a subsequent tools/call succeeds. No token revocation is claimed.

Pinned Go 1.26.11: go test/vet ./internal/mcp/... pass;
golangci-lint --new-from-rev=HEAD ./... reports 0 issues.
Replace substring argument checks with exact typed protobuf field assertions
covering ids, booleans (including presence flags), enums, numeric caps, bytes,
repeated and map fields. Add negative mapping fixtures that fail when wrong
fields, missing ids, conflicting world refs or out-of-range values are accepted
instead of refused before any typed RPC.

Add a scoped streaming transfer built on the shared W17 storageworker
StreamingFS contract and bounds, with session-consuming byte transfer, SHA-256,
cancellation, size-cap, expiry and cross-owner/cross-server refusals. Download
and upload surfaces now require that evidence before VERIFIED is granted; raw
byte channels stay out of the tool catalog. Merge the admin family conformance
evidence and adapt its isolated fixture to the production exclusion policy.
scoped_stream_commit no longer writes through a direct helper. It commits the
accumulated frames through the authorized production path: typed InitUpload,
bounded UploadChunk frames and server-scoped SaveUploadedFile RPCs, all behind
the real auth interceptor and with fresh files:create[server_id] authorization.
Read-only and revoked principals are refused with zero controller writes.
scoped_stream_chunk no longer re-reads the whole file with unary GetFile per
frame; authorization is established once at open and frames come from the
owned session with request cancellation/deadlines intact. The scoped tools are
mounted by the production NewServer constructor and covered by a wiring test.
PR537 moved upload handler anchors; refresh the stream audit source lines.
When scoped capability tools share a typed procedure, the catalog now keeps
the first (canonical) declaration instead of letting a later capability tool
replace get_file's declared tool name.
Regenerate the combined catalog and audit matrix for current main: 231
declared, 221 mounted, 201 supported operations. Add the read-only
player_service_lookup_player tool and wire player_query/request_id on the
manual allowlist tool. Add executable tools/call evidence for FOUND,
NOT_FOUND, AMBIGUOUS and UNAVAILABLE, exact UUID/username field mapping,
no persistent identity mutation, and the scoped allowlist add with its
request id. Refresh drift/audit counts and the governing knowledge concept.
The standalone gateway has no authenticated controller-side streaming
transport and must not share panel/node storage, so mounted stream tools would
always fail with unavailable. Remove them from the generated catalog and
NewServer, record an exact 9-operation PENDING inventory in
integration_pending.go, and commit the follow-up plan in
docs/plans/mcp-controller-side-stream-transport.md. VERIFIED stays tied to
executable tools/call evidence; the 9 operations remain LISTED/REACHABLE but
not VERIFIED. All 221-RPC / OSS-383 player evidence is preserved.
@athNdev athNdev changed the title mcp: integrate combined OSS-370 catalog with executable full-coverage evidence mcp: OSS-370 partial integration (path B hold, 9 stream ops pending) Nov 18, 2026
Keep the full-coverage gate RED for the 9 PENDING streaming operations and
add an independently reviewable PartialSliceRegressionGate that requires every
non-pending operation to be LISTED, REACHABLE and VERIFIED with executable
evidence, and validates that the PENDING inventory is exact.
@athNdev
athNdev merged commit 246f8e2 into main Nov 18, 2026
11 of 12 checks passed
@athNdev
athNdev deleted the codex/mcp-integration branch November 18, 2026 11:22
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