[Samples] 04-PracticalImplementation: fix and verify all samples #1249
All Vouch review confidence checks passed
Residual risk 0.27 = Change Risk (0.50) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.50 · 408 lines diff across 5 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.360
Shallow Review Depth
shallow_review_depth
0.344
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #1249"
general
weight: 0.35
skytin1004
Part 17 of 22 of the split of #1225, #1226 and #1227, which were too large to review. Each new PR changes only the files in its own folder, so none of them conflict, and together they make exactly the same changes as those three PRs.
Merge after: #1233 (01-first-server), because the Java Content Safety sample uses the 01-first-server Java server at
/mcp. Merged earlier, this PR still applies cleanly; only those samples won't run until the other PR is in.What was broken and how it was fixed
All five samples were run.
| Sample | What was broken | Fix / verification |
|---|---|---|
| TypeScript | Didn't build: zod 3.24 is below the SDK's
^3.25peer, so the SDK installed its own zod 4 (TS2589).console.logwrote to stdout on a stdio server.buildalso started the server.openaiwas an unused dependency. | zod^3.25.76and a regenerated lockfile; logging to stderr;build=tsc;openairemoved. Verified the tool (valid model and an unsupported model →isError) and thetest://{query}template. || JavaScript | stdout logging crashed the client (
Invalid JSON: Completion finished…).search://{query}was registered as a string, so it was a fixed resource andsearch://catsreturned "not found". | stderr logging,ResourceTemplate, zod pin. Verified the tool and the template. || C# (Aspire) |
net9.0,Aspire.AppHost.Sdk 9.3.1,ModelContextProtocol.AspNetCore 0.-, floating9./1.package versions. The AppHosthttpprofile refused to start withoutASPIRE_ALLOW_UNSECURED_TRANSPORT. Divide by zero only returned a generic error. The README gave 5058 as the dashboard URL, passed the server URL to the Inspector as a command, and used the tool nameNextFivePrimeNumbers. |net10.0,Aspire.AppHost.Sdk/13.6.4, MCP 2.4.0, all versions pinned.ASPIRE_ALLOW_UNSECURED_TRANSPORT=truein the http profile;McpExceptionfor divide by zero; README fixed. Randotnet watch run --project ./src/AppHost --launch-profile http; all 5 tools work over Streamable HTTP (Python client and Inspector CLI); divide by zero now says why. || Python |
mcp.server.fastmcpimport (gone in SDK 2.x). The client spawnedpython, which isn't always on PATH. |MCPServer,mcp dev server.py --with typer,sys.executable. All 5 client steps (tools, resources, prompt) pass. || Java (Content Safety) | Spring Boot 3.4.4, LangChain4j
1.0.0-beta3, the removed SSE client (HttpMcpTransport), conflicting Jackson/slf4j pins. | Spring Boot 4.1.2,langchain4j-bom1.23.0,StreamableHttpMcpTransporttohttp://localhost:8080/mcp,ChatModel,isMicrosoftFoundry(true),azure-ai-contentsafety1.1.1. Ran with the 01-first-server Java calculator,gpt-5.1and Azure Content Safety: the web form and the CLI client call the MCPaddandhelptools, and the harmful prompt is blocked. |The lesson README no longer describes the C# SDK as preview, and the
paginationdoc snippets use the Python 2.x API.Testing
See the table. Not tested: the C#
httpsprofile (needs a trusted dev certificate),azd up, and the GitHub Copilot Chat steps. No changes totranslations/ortranslated_images/.🤖 Generated with Claude Code