Skip to content

fix(deps): rename Content to ContentBlock for rmcp v2; gate lint on Renovate PRs - #1343

Merged
clouatre merged 1 commit into
mainfrom
fix/rmcp-v2-content-block-1342
Jul 27, 2026
Merged

fix(deps): rename Content to ContentBlock for rmcp v2; gate lint on Renovate PRs#1343
clouatre merged 1 commit into
mainfrom
fix/rmcp-v2-content-block-1342

Conversation

@clouatre

@clouatre clouatre commented Jul 27, 2026

Copy link
Copy Markdown
Member

Summary

rmcp v2.2.0 introduced two breaking changes addressed in this PR:

  1. Renamed Content to ContentBlock across the MCP model. All import and call sites updated in 10 files. No behavior change.

  2. Deprecated LoggingLevel, SetLevelRequestParams, and all LoggingLevel variants (-D warnings promotes these to hard errors in CI). Rather than suppress with #[allow(deprecated)], the deprecated surface is removed entirely, aligned with MCP SEP-2577 which formally deprecated the Logging protocol feature (merged 2026-05-15) citing overlap with stderr and OpenTelemetry.

What was removed:

  • set_level ServerHandler override (logging/setLevel request handler)
  • notify_logging_message call sites (notifications/message MCP log forwarding)
  • log_level_filter field and mutex on CodeAnalyzer
  • LoggingLevel, SetLevelRequestParams, LevelFilter imports

What replaces it:

  • LogEvent.level is now tracing::Level directly
  • Log level is controlled via RUST_LOG env var or --log-level CLI flag
  • JSONL metrics and OTel log appender channels are unaffected

Changes

  • .github/workflows/ci.yml -- remove Renovate bot skip from Lint job if-condition
  • crates/aptu-coder/src/lib.rs -- remove deprecated imports and set_level override; remove log_level_filter field
  • crates/aptu-coder/src/logging.rs -- LogEvent.level: LoggingLevel -> tracing::Level; delete level_to_mcp
  • crates/aptu-coder/src/tools/server.rs -- remove log_level_filter parameter
  • crates/aptu-coder/src/main.rs -- update CodeAnalyzer::new() call
  • crates/aptu-coder/src/tools/analyze_directory.rs
  • crates/aptu-coder/src/tools/analyze_file.rs
  • crates/aptu-coder/src/tools/analyze_module.rs
  • crates/aptu-coder/src/tools/analyze_symbol.rs
  • crates/aptu-coder/src/tools/common.rs
  • crates/aptu-coder/src/tools/edit_overwrite.rs
  • crates/aptu-coder/src/tools/edit_replace.rs
  • crates/aptu-coder/src/tools/exec_command.rs
  • crates/aptu-coder/tests/integration_tests.rs
  • docs/ARCHITECTURE.md -- update logging module description to reflect removal
  • OBSERVABILITY.md -- replace stale "Log level and MCP client visibility" section; remove notifications/message and logging/setLevel references

Test plan

  • Tests pass (662 passed, 0 failed)
  • Linter clean (cargo clippy --locked --profile ci -- -D warnings)
  • Formatter clean (cargo fmt --check)
  • No #[allow(deprecated)] introduced
  • Security scan clean (no findings)

Closes #1342

@aptu-dev aptu-dev Bot added the bug Something isn't working label Jul 27, 2026
@clouatre
clouatre marked this pull request as ready for review July 27, 2026 02:59
@clouatre
clouatre force-pushed the fix/rmcp-v2-content-block-1342 branch from aba1511 to a8eee08 Compare July 27, 2026 04:31

@aptu-dev aptu-dev 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.

Aptu Review

✅ Approve — This PR updates the codebase to accommodate the breaking change in rmcp v2.2.0 where Content was renamed to ContentBlock. It also removes the conditional gate in the CI pipeline that previously skipped linting for Renovate-generated PRs.


Posted by aptu

@clouatre
clouatre force-pushed the fix/rmcp-v2-content-block-1342 branch from a8eee08 to 79817ad Compare July 27, 2026 04:58

@aptu-dev aptu-dev 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.

Aptu Review

✅ Approve — This PR updates the codebase to support the breaking changes in rmcp v2.2.0, specifically renaming 'Content' to 'ContentBlock' and updating related types. It also cleans up the logging infrastructure by removing redundant MCP-specific logging level mappings and enables CI linting for Renovate-generated PRs.

  • The removal of the set_level handler and log_level_filter state significantly changes the server's runtime configuration capabilities; ensure this aligns with the intended evolution of the MCP server interface.

Posted by aptu

Comment thread crates/aptu-coder/src/lib.rs
@clouatre
clouatre force-pushed the fix/rmcp-v2-content-block-1342 branch from 79817ad to 184dc8c Compare July 27, 2026 05:04
@aptu-dev aptu-dev Bot added the documentation Improvements or additions to documentation label Jul 27, 2026

@aptu-dev aptu-dev 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.

Aptu Review

✅ Approve — This PR updates the codebase to support rmcp v2.2.0 by renaming Content to ContentBlock and removing deprecated logging infrastructure in favor of standard tracing::Level. It also cleans up the CI configuration by removing the Renovate-specific lint gate.

  • The removal of the set_level handler is a breaking change for clients relying on dynamic log level adjustment via MCP, though this aligns with the cited SEP-2577.

Posted by aptu

Comment thread crates/aptu-coder/src/tools/exec_command.rs
…enovate PRs

Signed-off-by: Hugues Clouatre <hugues@linux.com>
@clouatre
clouatre force-pushed the fix/rmcp-v2-content-block-1342 branch from 184dc8c to c8a9fb2 Compare July 27, 2026 05:05

@aptu-dev aptu-dev 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.

Aptu Review

✅ Approve — This PR updates the codebase to support rmcp v2.2.0 by migrating from Content to ContentBlock and removing deprecated MCP logging features. It also cleans up the CI configuration by removing the Renovate-specific skip condition for linting.

  • The removal of logging/setLevel removes a runtime configuration capability that some users might have relied upon, though this is justified by the upstream spec change.

Posted by aptu

Comment thread .github/workflows/ci.yml
@clouatre
clouatre merged commit 1d958f6 into main Jul 27, 2026
15 checks passed
@clouatre
clouatre deleted the fix/rmcp-v2-content-block-1342 branch July 27, 2026 05:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(deps): rename Content to ContentBlock after rmcp v2 upgrade; gate CI on Renovate PRs

1 participant