Skip to content

chore(deps): drop the MessagePack pin that Aspire 13.6.3 makes redundant - #1356

Merged
mforce merged 2 commits into
mainfrom
chore/drop-messagepack-pin
Oct 24, 2026
Merged

mforce merged 2 commits into
mainfrom
chore/drop-messagepack-pin

Conversation

@mforce

@mforce mforce commented Oct 24, 2026

Copy link
Copy Markdown
Owner

I pinned MessagePack in the AppHost to patch GHSA-qhrr-8q5h-9q3h (NU1902), because Aspire.Hosting and StreamJsonRpc brought in the vulnerable 2.5.302 as a transitive package. Since #1350 moved Aspire to 13.6.3, Aspire requires 2.5.307 itself, so the pin no longer raises anything. This PR removes the pin and brings the MCP comments up to the SDK versions the API now uses.

What changed

  • Directory.Packages.props no longer has the MessagePack version, and src/Cluckwork.AppHost/Cluckwork.AppHost.csproj no longer references it. Both workaround comments are gone.
  • I regenerated the two AppHost locks. MessagePack is now a transitive package in both, still at 2.5.307. No other lock changed.
  • Three code comments and one README row named MCP SDK 2.2.0 or Microsoft.Extensions.AI 10.8.3. The API now resolves 2.3.0 and 10.11.0. Before I updated each version, I checked in the upstream source that the behaviour the comment describes is still there.

MessagePack after the change

Only the two AppHost locks contain MessagePack. Both resolve 2.5.307.

Lock Brought in by Minimum it declares
src/Cluckwork.AppHost Aspire.Hosting, Aspire.Hosting.JavaScript, Aspire.Hosting.PostgreSQL, Aspire.Hosting.Redis (13.6.3) 2.5.307
StreamJsonRpc 2.25.29 2.5.302
tests/Cluckwork.AppHost.Tests Aspire.Hosting, Aspire.Hosting.AppHost, Aspire.Hosting.Testing, Aspire.Hosting.JavaScript, Aspire.Hosting.PostgreSQL, Aspire.Hosting.Redis (13.6.3) 2.5.307
StreamJsonRpc 2.25.29 2.5.302

A --locked-mode restore and dotnet build Cluckwork.slnx both finish with no warnings, so NuGet audit reports nothing, NU1902 included.

MCP comment updates

  • McpToolErrors.cs:12 (SDK 2.2.0 to 2.3.0). At the csharp-sdk v2.3.0 tag, McpServerImpl.cs:1714-1728 still logs tool exceptions at Error through ToolCallError (:2531). It skips only a cancellation of the request token and InputRequiredException (:1718). CreateToolCallErrorResult (:1743-1754) still passes the model only an McpException's message.
  • McpToolErrors.cs:54 (Microsoft.Extensions.AI 10.8.3 to 10.11.0). Between the dotnet/extensions v10.8.3 and v10.11.0 tags, the only change in AIFunctionFactory.cs is how bind options are keyed: by parameter position instead of by ParameterInfo instance. Argument binding at v10.11.0 (:962-1001) is unchanged. It reads each argument by name with the tool's serializer, and a missing argument takes its default or fails. AIFunctionMcpServerTool.cs is identical at v2.2.0 and v2.3.0, so the method is still first in Metadata.
  • Program.cs:255 (SDK 2.2.0 to 2.3.0). At v2.3.0, StreamableHttpServerTransport.cs:243 still links _transportDisposedCts.Token with the caller's token, and lines 230-250 are identical to v2.2.0. StreamableHttpHandler.cs:190 still passes context.RequestAborted. The :243 reference in the comment stays correct.
  • tools/verify/mcp/README.md:10. probe.cs stays pinned to 2.2.0. The row called that "the server's SDK", which is no longer true, so it now says the probe is older than the server's SDK and checks that an older client still works.

The 2.2.0 references in docs/decisions/806-mcp-endpoint.md and docs/plans/770-mcp-server/ stay. They record what I verified at the time.

Lock churn I reverted

My first regeneration used dotnet restore --force-evaluate. That also moved StackExchange.Redis (3.4.5 to 3.4.20) and System.IO.Hashing in five locks that have nothing to do with this change. I reverted those locks and regenerated with --force, which honours the existing locks, so only the two AppHost locks changed.

Other places that name MessagePack

  • CHANGELOG.md keeps its entry for the original pin, because it is release history.
  • .github/workflows/dependency-submission.yml:23 names the advisory as the reason for the daily schedule, not the pin.
  • The --locked-mode drift guard in ci.yml changes Microsoft.OpenApi. The Dockerfile restore layer does not include the AppHost. Neither needs a change.
  • No test reads the pin or these comments.

Tests

  • dotnet build Cluckwork.slnx: 0 warnings, 0 errors.
  • Cluckwork.AppHost.Tests: 10 of 10 passed.
  • Cluckwork.Api.IntegrationTests filtered to the Mcp namespace, on Postgres in Testcontainers: 251 of 251 passed.
  • The two image-pin guards in SchemaDocsTests: passed.
  • The pre-commit hook: Domain 496 of 496, Application 785 of 785.

Related: #1352 tracks when to take MessagePack 3.x. It still applies to the transitive package, and this PR does not close it.

Aspire.Hosting 13.6.3 and its JavaScript, PostgreSQL, Redis, AppHost and Testing packages each require MessagePack 2.5.307 or later, so both AppHost locks still resolve 2.5.307 without the pin. Remove the central version, the AppHost reference and their comments, and regenerate the two AppHost locks.

Update the MCP comments to the versions the API now resolves (SDK 2.3.0, Microsoft.Extensions.AI 10.11.0). The behaviour each comment cites is unchanged at those versions. Describe the verify probe, still on 2.2.0, as an older-client check.
@mforce
mforce merged commit d699b3d into main Oct 24, 2026
22 checks passed
@mforce
mforce deleted the chore/drop-messagepack-pin branch October 24, 2026 07:18
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