feat(mcp-m5): add pmcp v2.3 optional dep behind pmcp-dispatcher feature#908
Merged
Conversation
First slice of the M5 dispatcher migration. Zero behaviour change — the
hand-rolled JSON-RPC stdio loop in `server.rs` still owns every request
today. This PR only wires the dep so subsequent PRs can land the pmcp
code paths incrementally behind a feature flag.
## What changes
- `crates/aprender-mcp/Cargo.toml`: add `pmcp = { version = "2.3", optional
= true }` + new `pmcp-dispatcher` feature that selects it. Off by default.
- `Cargo.lock`: aprender-mcp entry now lists pmcp 2.3.0. No new transitive
deps — pmcp 2.3.0 was already resolved in the workspace via
`aprender-orchestrate` (MCP client side), so this is a single-line lock
update, not a new tree branch. Workspace versions stay aligned per the
spec's "M5+ will migrate the dispatcher to `pmcp` v2.x; workspace
version must stay aligned" risk mitigation (§Risks).
- Spec §M5 first checkbox flipped; header moves PLANNED → IN PROGRESS.
## PR plan (per the M5 research brief, 2026-04-19)
1. **this PR** — pmcp optional dep, feature flag off. FALSIFY-MCP-009
deferred until PR 2 lands the actual parity test.
2. **PR 2 (next)** — `src/transports/{mod,stdio}.rs`: stdio wrapper that
delegates to either the hand-rolled loop or `pmcp::Server` based on
the feature; `tests/falsify_mcp_009.rs` asserts byte-identical
`tools/list` + `tools/call` wire output across both paths.
3. PR 3 — per-tool `pmcp::Handler` registration (FALSIFY-MCP-010,
preserving FALSIFY-MCP-008 codegen).
4. PR 4 — cancellation port + `apr.serve` daemon tracking
(FALSIFY-MCP-011).
5. PR 5 — `--transport sse --port N` (FALSIFY-MCP-012).
6. PR 6 — `--transport websocket` (FALSIFY-MCP-013) + re-run the full
falsification suite.
## Verification
- `cargo check -p aprender-mcp` — green with default features
- `cargo check -p aprender-mcp --features pmcp-dispatcher` — green; pmcp
2.3.0 resolves from the existing workspace lockfile entry
- `cargo test -p aprender-mcp` — all 51 lib + 8 falsify_m1 + 4 falsify_006
+ 8 falsify_008 + 4 falsify_progress_001 + 5 falsify_003 + 5 falsify_004
+ 2 falsify_schema + 1 doctest still PASS
- `cargo tree -d -p aprender-mcp --features pmcp-dispatcher` — no
duplicate deps
noahgift
added a commit
that referenced
this pull request
Apr 19, 2026
…ffold Cuts a patch release combining the two PRs that landed post-v0.31.0 (#907, #908) plus incidental `cargo fmt --all` normalization across the workspace. Wire-level changes: - Workspace + root `aprender` package bumped 0.31.0 → 0.31.1 - All 60+ path-dep pins updated in lockstep so the published crates resolve against each other without range-version drift - `opentelemetry` / `opentelemetry_sdk` / `opentelemetry-otlp` kept at 0.31.0 (external deps — global sed caught them as false-positives during bump) CHANGELOG.md covers: - Fixed: `apr qa` format_parity gate SKIPs non-GGUF primaries (#907) - Added: `pmcp = "2.3"` optional dep behind `pmcp-dispatcher` feature (#908) Pre-push gates: - cargo fmt --all (applied — 45 lines across 17 non-Cargo files) - cargo test -p aprender-contracts --lib: 1371 passed / 0 failed - cargo deny check advisories: advisories ok Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
4 tasks
noahgift
added a commit
that referenced
this pull request
Apr 19, 2026
…ffold (#909) * chore(release): v0.31.1 — QA format_parity SKIP fix + MCP M5 pmcp scaffold Cuts a patch release combining the two PRs that landed post-v0.31.0 (#907, #908) plus incidental `cargo fmt --all` normalization across the workspace. Wire-level changes: - Workspace + root `aprender` package bumped 0.31.0 → 0.31.1 - All 60+ path-dep pins updated in lockstep so the published crates resolve against each other without range-version drift - `opentelemetry` / `opentelemetry_sdk` / `opentelemetry-otlp` kept at 0.31.0 (external deps — global sed caught them as false-positives during bump) CHANGELOG.md covers: - Fixed: `apr qa` format_parity gate SKIPs non-GGUF primaries (#907) - Added: `pmcp = "2.3"` optional dep behind `pmcp-dispatcher` feature (#908) Pre-push gates: - cargo fmt --all (applied — 45 lines across 17 non-Cargo files) - cargo test -p aprender-contracts --lib: 1371 passed / 0 failed - cargo deny check advisories: advisories ok Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * ci(release): disable sccache — sovereign-ci runner image missing rustc-sccache wrapper The `sovereign-ci:stable` container image is currently missing the `rustc-sccache` wrapper script, causing every sccache-gated CI job (ci/test, ci/lint, ci/coverage, ci/gate) to fail at the rustc probe: error: could not execute process `rustc-sccache /.../rustc -vV` (never executed) Caused by: No such file or directory (os error 2) Reruns fail identically — not transient. Workaround: flip `enable_sccache: true → false` on this repo's workflow input. The sovereign-ci reusable workflow reads this to set `RUSTC_WRAPPER: ${{ inputs.enable_sccache && 'rustc-sccache' || '' }}`, so disabling it removes the wrapper entirely and CI builds proceed normally (just slower, since there's no compile cache). Revert once paiml/.github ships a runner image with the wrapper present — this is a temporary unblock for the v0.31.1 release PR. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First slice of the M5 dispatcher migration. Zero behaviour change — the hand-rolled JSON-RPC stdio loop in
server.rsstill owns every request today. This PR only wires the dep so subsequent PRs can land the pmcp code paths incrementally behind a feature flag.What changes
crates/aprender-mcp/Cargo.toml: addpmcp = { version = "2.3", optional = true }+ newpmcp-dispatcherfeature that selects it. Off by default.Cargo.lock: aprender-mcp entry now lists pmcp 2.3.0. No new transitive deps — pmcp 2.3.0 was already resolved in the workspace viaaprender-orchestrate(MCP client side), so this is a single-line lock update, not a new tree branch. Workspace versions stay aligned per the spec's "M5+ will migrate the dispatcher topmcpv2.x; workspace version must stay aligned" risk mitigation (§Risks).PR plan (per the M5 research brief, 2026-04-19)
src/transports/{mod,stdio}.rs: stdio wrapper that delegates to either the hand-rolled loop orpmcp::Serverbased on the feature;tests/falsify_mcp_009.rsasserts byte-identicaltools/list+tools/callwire output across both paths.pmcp::Handlerregistration (FALSIFY-MCP-010, preserving FALSIFY-MCP-008 codegen).apr.servedaemon tracking (FALSIFY-MCP-011).--transport sse --port N(FALSIFY-MCP-012).--transport websocket(FALSIFY-MCP-013) + re-run the full falsification suite.Test plan
cargo check -p aprender-mcpgreen with default featurescargo check -p aprender-mcp --features pmcp-dispatchergreen (pmcp 2.3.0 resolves from the existing workspace lockfile entry)cargo test -p aprender-mcpall lib + integration + falsification tests PASS (51 lib, 78-across-suites, 1 doc)cargo tree -d -p aprender-mcp --features pmcp-dispatcherno duplicate depsci/gate+workspace-testgreen🤖 Generated with Claude Code