Skip to content

Migrate Frontman to MCP 2026-07-28 - #1392

Draft
BlueHotDog wants to merge 8 commits into
mainfrom
feat/mcp-2026-07-28-phase-1
Draft

BlueHotDog wants to merge 8 commits into
mainfrom
feat/mcp-2026-07-28-phase-1

Conversation

@BlueHotDog

@BlueHotDog BlueHotDog commented Aug 10, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • migrate Frontman atomically to the latest-only MCP 2026-07-28 contract, removing the initialization handshake, protocol sessions, private Relay fallback, and deprecated HTTP+SSE transport
  • add standard Streamable HTTP POST /mcp servers for Next.js, Astro, Vite, and WordPress plus the browser Streamable HTTP client
  • move browser-to-Phoenix MCP onto the documented custom Phoenix transport with bounded execution, exact cancellation, replay safety, durable ownership, restart-safe recovery, and canonical result persistence
  • cut application consumers over to modern discovery, tool catalogs, consent, ACP reconnect initialization replay, and framework/browser tool routing
  • add tool content and output-schema safety, trusted-principal rate limiting, authorization boundaries, payload-safe logging, and reserved metadata rejection
  • remove legacy Relay runtime, schemas, routes, generated assets, tests, fixtures, and compatibility paths
  • vendor the checksum-pinned normative oracle and official conformance runner with 443-row traceability, capability, threat-model, implementation-limit, transport, endpoint/auth, troubleshooting, and migration documentation
  • replace duplicated generated schema bodies with one compact, losslessly deduplicated $defs bundle while preserving all 75 stable per-schema filenames as small $ref entry points
  • replace filename-only schema warnings with ref-aware semantic compatibility checks for deleted definitions, required additions, type and enum narrowing, closed objects, tightened bounds, and union regressions; intentional breaks require a protocol-major changeset
  • remove the 4,325-line implementation diary and keep enduring architecture, security, conformance, and migration documentation
  • add breaking changesets for affected packages and expand CI, black-box, WordPress, installed-framework, generated-asset, and root aggregate ownership

Diff Reduction

  • PR additions reduced from 77,079 to 52,809
  • generated schema output reduced from 28,641 lines to approximately 3,800
  • compact schema output is slightly smaller than the pre-migration generated-schema baseline
  • all prior per-schema package paths remain present

Verification

  • compact generation is losslessly dereferenced against all 75 raw Sury definitions; every named definition compiles independently under strict JSON Schema 2020-12
  • 14 schema compaction and compatibility tests pass
  • 123 protocol tests, all 129 official examples, all 443 traceability requirements, and the 1,000-case deterministic property profile pass
  • Phoenix precommit passes 828/828; focused cross-language schema contracts pass 27/27
  • frontman-client passes 170/170; frontman-core passes 483/483; application client passes 334/334
  • applicable pinned official server and client conformance scenarios pass with no failures, expected failures, warnings, or unexpected applicable skips
  • real WordPress root/scoped runtime and genuine Playground scoped-runtime vectors pass
  • generated schema/browser asset, source-comment, formatting, strict Credo, git diff --check, and pre-push ReScript dead-code gates pass
  • an earlier uninterrupted credentialed make mcp-verify and installed Next.js/Astro/Vite/Vue-Vite E2E 11/11 are accepted evidence
  • the post-compaction aggregate rerun passed every gate through official conformance, then its installed E2E connected to another worktree already owning hard-coded port 5173; the four recovery scenarios therefore never reached their fixture /mcp endpoints. The post-E2E source and generated checks were run directly and pass. No product or schema failure was observed in that contaminated rerun

Disclosed Limits

  • the pinned client conformance harness corrects malformed upstream discovery fixtures and one schema-invalid null argument; this is documented and is not claimed as pristine unmodified-fixture client conformance
  • Phoenix execution ownership and restart recovery are accepted for Frontman's supported single-node deployment; multi-node and cross-node acceptance are out of scope
  • BASE-AUTH-001 is an explicitly accepted application-authentication SHOULD deviation; Frontman does not implement or claim MCP OAuth conformance
  • MRTR, Roots, Sampling, and Elicitation are not advertised
  • schema compatibility analysis conservatively reports unsupported complex changes as unknown; breaking or unknown changes fail unless an explicit protocol-major changeset authorizes an intentional break

Release Status

The implementation phases are accepted, but this PR does not authorize publishing. Remaining release work includes final README/architecture/integration/marketing and breaking-migration review, credential rotation, and final security, package, version, and publishing checks.

@BlueHotDog
BlueHotDog requested a review from itayadler as a code owner August 10, 2026 09:42

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

| Connected({tools}) =>
tools->Array.map(tool => {

P2 Badge Filter hidden relay tools before advertising them

When the connected framework registry contains an internal tool such as load_agent_instructions (visibleToAgent = false), this maps every relay tool into the MCP catalog while dropping that visibility policy. The Phoenix side consequently defaults the tool to visible and exposes it to normal agents; filter tools by visibleToAgent before serialization instead of removing the policy without enforcing it.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 58 to 62
let definition = dict{
"name": JSON.Encode.string(T.name),
"description": JSON.Encode.string(T.description),
"access": T.access->S.decodeOrThrow(~from=ToolTypes.accessSchema, ~to=S.json),
"inputSchema": T.inputSchema->S.toJSONSchema->jsonSchemaAsJson,
"visibleToAgent": JSON.Encode.bool(T.visibleToAgent),
"executionMode": T.executionMode->S.decodeOrThrow(~from=executionModeSchema, ~to=S.json),
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Preserve read access in standard annotations

When the planner runs with %{access: [:read]}, every browser MCP tool serialized here is later parsed by FrontmanServer.Tools.MCP.from_map/1 with the default :read_write access, so read-only tools such as get_dom, take_screenshot, and search_text are filtered out in Tasks.Execution.run/7. Map the internal access value to the standard annotations.readOnlyHint field and restore it when constructing the server-side tool policy.

Useful? React with 👍 / 👎.

Comment on lines +271 to +272
when is_binary(type) and is_list(versions) and is_map(capabilities) and is_integer(ttl) and
ttl >= 0 and scope in ["private", "public"] ->

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Reject unsupported result discriminators

When a peer returns resultType: "input_required" or an unknown extension value while also including the discovery fields, this guard accepts it as a completed discovery result and MCPInitializer proceeds without satisfying the requested input; the identical issue exists in the tools/list guard below. Since this runtime only implements complete results, require resultType == "complete" and reject every unsupported discriminator rather than accepting any string.

Useful? React with 👍 / 👎.

Comment on lines +197 to +205
| Ok({taskId, toolCallId}) =>
try {
let {serverInterface} = handler
let result = await serverInterface.executeTool(
serverInterface.server,
~name=request.params.name,
~arguments=request.params.arguments,
~taskId,
~toolCallId,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Verify execution context ownership before running tools

When a tools/call message on one task channel supplies another task's taskId or an unrelated toolCallId, this code immediately passes those peer-controlled identifiers into tool execution without any ownership, existence, replay, or channel-binding check. Task-aware tools such as question can therefore mutate the wrong task, and image-reference resolution can read another task's context; retain the channel's session identity and validate both durable identifiers before invoking executeTool.

Useful? React with 👍 / 👎.

@BlueHotDog BlueHotDog changed the title Align MCP contract with 2026-07-28 Migrate Frontman to MCP 2026-07-28 Aug 20, 2026
@BlueHotDog
BlueHotDog force-pushed the feat/mcp-2026-07-28-phase-1 branch from e118654 to ef79d58 Compare September 1, 2026 19:20
@BlueHotDog
BlueHotDog marked this pull request as draft October 14, 2026 13:25

This branch has not been deployed

No deployments
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