refactor: quality cleanup - supervisor MCP dispatch (chunk 4/11) #524

Closed
didericis-codex wants to merge 1 commits from refactor/supervisor-mcp-dispatch into refactor/egress-policy-pipeline
Collaborator

Stacked on #523. Fourth quality-cleanup PR tracked by #444.

Separates supervisor MCP dispatch from its stdlib HTTP transport:

  • Framework-neutral dispatcher: JSON-RPC method selection and MCP tool routing live in mcp_dispatch.py, independent of BaseHTTPRequestHandler.
  • Explicit tool stages: route listing, proposal polling, and proposal creation are injected handlers, so dispatch order is directly testable without sockets or resolver setup.
  • Resolved route rendering: per-bottle route serialization moves out of the transport while retaining fail-closed empty-policy behavior on attribution/control-plane failures.
  • Transport boundary: MCPHandler retains body limits, JSON-RPC framing, identity extraction, typed error mapping, and HTTP response writing.

The supervisor transport module is reduced below 800 lines, and new focused tests cover protocol methods, every tool class, and unknown-method handling.

Remaining stack

  • #525 — authoritative backend cleanup and destructive revalidation.
  • #526 — bounded gateway HTTP work and strict policy introspection.
  • #527 — gateway shutdown diagnostics.

Final stack extension

  • #528 — authoritative resource identities and bounded artifact transfers.

Validation: The complete eleven-PR stack passes all 2,520 unit tests; full-repository Pyright reports 0 errors; git diff --check passes.

Refs #444.

Final stack extension

  • #530 — cleanup execution and mandatory authenticated-secret integrity.

Final stack extension

  • #531 — bounded heavy Git and cleanup operations.

Final stack extension

  • #532 — fail-closed shared database and gateway credential permissions.
Stacked on #523. Fourth quality-cleanup PR tracked by #444. Separates supervisor MCP dispatch from its stdlib HTTP transport: - **Framework-neutral dispatcher:** JSON-RPC method selection and MCP tool routing live in `mcp_dispatch.py`, independent of `BaseHTTPRequestHandler`. - **Explicit tool stages:** route listing, proposal polling, and proposal creation are injected handlers, so dispatch order is directly testable without sockets or resolver setup. - **Resolved route rendering:** per-bottle route serialization moves out of the transport while retaining fail-closed empty-policy behavior on attribution/control-plane failures. - **Transport boundary:** `MCPHandler` retains body limits, JSON-RPC framing, identity extraction, typed error mapping, and HTTP response writing. The supervisor transport module is reduced below 800 lines, and new focused tests cover protocol methods, every tool class, and unknown-method handling. **Remaining stack** - #525 — authoritative backend cleanup and destructive revalidation. - #526 — bounded gateway HTTP work and strict policy introspection. - #527 — gateway shutdown diagnostics. **Final stack extension** - #528 — authoritative resource identities and bounded artifact transfers. **Validation:** The complete eleven-PR stack passes all 2,520 unit tests; full-repository Pyright reports 0 errors; `git diff --check` passes. Refs #444. **Final stack extension** - #530 — cleanup execution and mandatory authenticated-secret integrity. **Final stack extension** - #531 — bounded heavy Git and cleanup operations. **Final stack extension** - #532 — fail-closed shared database and gateway credential permissions.
didericis force-pushed refactor/supervisor-mcp-dispatch from 52da0bb692 to 0255d29ff1 2026-07-26 22:58:40 -04:00 Compare
didericis-codex changed title from refactor: quality cleanup - supervisor MCP dispatch (chunk 3/3) to refactor: quality cleanup - supervisor MCP dispatch (chunk 4/7) 2026-07-26 23:17:35 -04:00
didericis force-pushed refactor/supervisor-mcp-dispatch from 0255d29ff1 to c1de7ee020 2026-07-26 23:40:00 -04:00 Compare
didericis-codex changed title from refactor: quality cleanup - supervisor MCP dispatch (chunk 4/7) to refactor: quality cleanup - supervisor MCP dispatch (chunk 4/8) 2026-07-26 23:41:31 -04:00
didericis force-pushed refactor/supervisor-mcp-dispatch from c1de7ee020 to 7a537180b0 2026-07-26 23:56:17 -04:00 Compare
didericis-codex changed title from refactor: quality cleanup - supervisor MCP dispatch (chunk 4/8) to refactor: quality cleanup - supervisor MCP dispatch (chunk 4/9) 2026-07-27 00:02:29 -04:00
didericis force-pushed refactor/supervisor-mcp-dispatch from 7a537180b0 to f409f4bc31 2026-07-27 00:17:52 -04:00 Compare
didericis-codex changed title from refactor: quality cleanup - supervisor MCP dispatch (chunk 4/9) to refactor: quality cleanup - supervisor MCP dispatch (chunk 4/10) 2026-07-27 00:25:52 -04:00
didericis added 1 commit 2026-07-27 00:46:33 -04:00
refactor(supervisor): separate MCP dispatch from transport
test / image-input-builds (pull_request) Failing after 13m22s
test / unit (pull_request) Failing after 13m27s
test / coverage (pull_request) Has been skipped
test / integration-docker (pull_request) Has been cancelled
tracker-policy-pr / check-pr (pull_request) Successful in 14s
bb1776a858
didericis force-pushed refactor/supervisor-mcp-dispatch from f409f4bc31 to bb1776a858 2026-07-27 00:46:34 -04:00 Compare
didericis-codex changed title from refactor: quality cleanup - supervisor MCP dispatch (chunk 4/10) to refactor: quality cleanup - supervisor MCP dispatch (chunk 4/11) 2026-07-27 00:48:52 -04:00
didericis-codex closed this pull request 2026-07-27 01:35:30 -04:00
Some checks are pending
test / image-input-builds (pull_request) Failing after 13m22s
test / unit (pull_request) Failing after 13m27s
test / coverage (pull_request) Has been skipped
test / integration-docker (pull_request) Has been cancelled
tracker-policy-pr / check-pr (pull_request) Successful in 14s

Pull request closed

Sign in to join this conversation.