Skip to content

fix: upgrade marvin>=3.2.0 to fix contact-extractor crash#211

Open
pdettori wants to merge 3 commits intomainfrom
fix/pin-marvin-below-3.1
Open

fix: upgrade marvin>=3.2.0 to fix contact-extractor crash#211
pdettori wants to merge 3 commits intomainfrom
fix/pin-marvin-below-3.1

Conversation

@pdettori
Copy link
Copy Markdown
Contributor

@pdettori pdettori commented Apr 2, 2026

Summary

  • Upgrade marvin>=3.2.0 in a2a/a2a_contact_extractor/pyproject.toml (3.0.x/3.1.x incompatible with pydantic-ai>=1.56)
  • Pin CVE-affected indirect deps: fastmcp>=3.2.0, anthropic>=0.87.0, aiohttp>=3.13.4
  • Add dependabot ignore for marvin major bumps (require manual testing)
  • uv.lock updated: marvin 3.1.1 → 3.2.7, fastmcp 3.1.1 → 3.2.0, anthropic 0.86.0 → 0.88.0, aiohttp 3.13.3 → 3.13.5

Root Cause

AttributeError: 'Agent' object has no attribute '_deprecated_result_tool_name'
  File "marvin/engine/streaming.py", line 90, in handle_agentlet_events

The pydantic-ai>=1.56.0 CVE pin (CVE-2026-25580) pulled in pydantic-ai 1.71.0, which removed _deprecated_result_tool_name from the Agent class. Marvin 3.0.x/3.1.x still referenced this attribute, causing AttributeError on every run_async() call with union result_type. Marvin 3.2.0+ is compatible.

CVEs Fixed

Package CVE Severity
fastmcp CVE-2026-32871 Critical
fastmcp CVE-2026-27124 High
fastmcp CVE-2025-64340 Medium
anthropic CVE-2026-34452, CVE-2026-34450 Medium
aiohttp CVE-2026-34525, CVE-2026-34516, CVE-2026-34515, CVE-2026-22815 Medium
aiohttp 6 additional CVEs Low

Test plan

  • Rebuilt contact-extractor image in Kind cluster with marvin 3.2.7
  • Sent contact extraction request — successful extraction, no AttributeError
  • Verified agent card endpoint works
  • Verified all bumped package versions in running pod

Assisted-By: Claude (Anthropic AI) noreply@anthropic.com

Marvin 3.0.x/3.1.x are incompatible with pydantic-ai>=1.56.0 (required
for CVE-2026-25580). The Agent class lost the `_deprecated_result_tool_name`
attribute in pydantic-ai 1.56+, causing AttributeError in marvin's
streaming.py when using `run_async()` with union result_type.

Upgrade to marvin>=3.2.0 which is compatible with modern pydantic-ai.

Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>
Signed-off-by: Paolo Dettori <dettori@us.ibm.com>
@pdettori pdettori force-pushed the fix/pin-marvin-below-3.1 branch from 28a610e to ad8d3af Compare April 2, 2026 20:20
pdettori added 2 commits April 2, 2026 16:42
Pin indirect dependencies to fix code scanning alerts:
- fastmcp>=3.2.0: CVE-2026-32871 (critical SSRF), CVE-2026-27124 (high)
- anthropic>=0.87.0: CVE-2026-34452, CVE-2026-34450
- aiohttp>=3.13.4: CVE-2026-34525, CVE-2026-34516, CVE-2026-34515,
  CVE-2026-22815, and 6 low-severity CVEs

Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>
Signed-off-by: Paolo Dettori <dettori@us.ibm.com>
Marvin upgrades can break the contact-extractor agent due to
pydantic-ai compatibility issues. Require manual testing before
accepting major version bumps.

Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com>
Signed-off-by: Paolo Dettori <dettori@us.ibm.com>
Copy link
Copy Markdown
Collaborator

@cwiklik cwiklik left a comment

Choose a reason for hiding this comment

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

Review Summary

The code changes are solid — upgrading marvin to >=3.2.0 for pydantic-ai compatibility, pinning CVE-affected indirect deps (fastmcp>=3.2.0, anthropic>=0.87.0, aiohttp>=3.13.4), and configuring dependabot to avoid risky auto-upgrades. All 3 commits signed-off with proper Assisted-By trailer. All 11 CI checks passing.

Areas reviewed: Python (deps), YAML (dependabot), Security (CVEs), Commit conventions
Commits: 3 commits, all signed-off: ✅
CI status: all 11 checks passing ✅

Must-fix

PR title and description are stale and contradict the actual changes:

  • Title says fix: pin marvin<3.1.0 to fix contact-extractor crash — but the actual constraint is marvin>=3.2.0
  • Body says marvin 3.1.1 → 3.0.6 — but the lockfile shows marvin 3.1.1 → 3.2.7
  • Body says Pin marvin>=3.0.0,<3.1.0 — but pyproject.toml shows marvin>=3.2.0

The PR title becomes permanent git history (squash/merge commit). Please update to match the actual change, e.g.:

  • Title: fix: upgrade marvin>=3.2.0 to fix contact-extractor crash
  • Body: Update the summary bullets and uv.lock line to reflect the upgrade

Highlights

  • Good approach pinning CVE-affected indirect deps as direct constraints with clear comments
  • Smart dependabot ignore for marvin major bumps given the pydantic-ai compatibility sensitivity
  • Clean commit structure — each commit addresses a distinct concern (marvin fix, CVE bumps, dependabot config)

@pdettori pdettori changed the title fix: pin marvin<3.1.0 to fix contact-extractor crash fix: upgrade marvin>=3.2.0 to fix contact-extractor crash Apr 3, 2026
Copy link
Copy Markdown
Contributor

@esnible esnible left a comment

Choose a reason for hiding this comment

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

This looks good.

We need to be able to tell if version changes break the examples. Thus we need tests for them. I created CI to make sure the Dockerfiles build and the servers are able to start.

I did not create CI that verifies if the servers actually serve traffic. Perhaps this is needed? Perhaps we should test each example by sending it A2A or MCP traffic?

Copy link
Copy Markdown
Collaborator

@cwiklik cwiklik left a comment

Choose a reason for hiding this comment

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

Review Summary

Previous review's must-fix (stale PR title/description) has been addressed. Title and body now accurately describe the upgrade to marvin>=3.2.0 with CVE-affected indirect dep pins. Code is unchanged and CI remains green.

Areas reviewed: Python (deps), YAML (dependabot), Security (CVEs), Commit conventions
Commits: 3 commits, all signed-off: ✅
CI status: all 11 checks passing ✅

No remaining issues — good to merge.

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.

3 participants