Files
MikrotikManager/docs/mcp-sdk-http-terminal-component-20261101.md
T

3.0 KiB

SDK-owned HTTP terminal budget — staged component acceptance

Five actual installed-SDK groups PASS, CLI0; source patch not applied. Exact receipt/pins. Owned localhost HTTP closed, selected source/compiled pins unchanged, one runtime attempt/no failures. No PG, external service or product/package/tracker edits; no18/10 historical SDK matrix repeat.

Three-file review patch: tmp/mcp-sdk-terminal-http-20261101/implementation.patch, SHA25618ecdba0bf7a00e5791399a850a3290e808686e1faf32dab207d19b62e0496d6. Helper strict/lint/fixture syntax and apply-check0; full-backend noEmit overlay918roots/2244sources/error0. Review contract and exact commands remain in tmp/mcp-sdk-terminal-http-20261101/REVIEW.md.

Public connect/send sees genuine SDK-encoded terminal messages before serialization. Before callback, oversized discovery/validation errors receive a complete explicit limited refusal; factoryless JSON facade handles only cases where no factory ran. Ordinary in-budget diagnostics stay unchanged. Factoryless overflow preserves HTTP status but uses the reviewed bounded diagnostic-code fallback. After callback entry, the guard's first branch passes the ORIGINAL message without new stringify/inspection/throw; registered factual receipts remain under the existing B1 contract.

Actual SDK case Observed
Legacy discovery Normal catalogue/schema and terminal SSE framing pass
Modern discovery and metadata Installed Client baseline; genuine resultType/serverInfo/cache fields. SDK catalogue2,400,784B legacy /2,400,933B modern becomes214B JSON refusal (legacy237B SSE), callback0
Pre-callback SDK strict-schema error 780,236B raw malformed-UTF8 request produces2,340,292B encoded SDK diagnostic; bounded214B refusal before callback/effect
Factoryless SDK header rejection 780,195B raw request; observed body lower bound4,680,318B; bounded214B JSON, original HTTP400, factory0/callback0
Protected results Actual synthetic applied/pending outcomes and cancellation state changes, original outgoing-message identity and idempotency preserved in both eras;6 unique in-memory effects including2 cancellations

The JSON-RPC terminal ceiling is2,097,301B, derived from B1 result1MiB + existing encoded-ID boundary1MiB + JSON-RPC33 + actual modern stamp116. A terminal SSE frame adds23B. It is not the2MiB+1KiB planning reservation and does not raise Flow2/8MiB or source caps. Actual compiled result-budget, wire-admission and result-delivery hashes are pinned alongside the fixture and verified unchanged.

Activation remains false. The synthetic SDK catalogue is not the current full production catalogue; that actual measurement and production route/auth/audit composition remain required before applying/activating the candidate. Keepalive15s/default auto/notifications were preserved. Whole-stream, STDIO multiplex, headers, generic heap/input/upstream and whole2GB remain open. This closes a child component of EXT-2, not any of the five EXTERNAL/UI/RAM parents or the≈35 parent estimate.