Skip to content

fix(a2a): Checkpoint export + TaskState enum cleanup, pin release as 4.0.1#260

Closed
bokelley wants to merge 1 commit intomainfrom
bokelley/release-4.0.1
Closed

fix(a2a): Checkpoint export + TaskState enum cleanup, pin release as 4.0.1#260
bokelley wants to merge 1 commit intomainfrom
bokelley/release-4.0.1

Conversation

@bokelley
Copy link
Copy Markdown
Contributor

Summary

Two small follow-ups to PR #258, plus a `Release-As: 4.0.1` footer to override the pending 5.0.0 release PR (#257).

Code changes

  • Export `Checkpoint` from top-level `adcp` — callers can now `from adcp import Checkpoint` instead of `from adcp.client import Checkpoint`, which matters because it's the type used as a persistence-key dict.
  • Enum comparisons in `_process_task_response` — `task_state == TaskState.completed` / `TaskState.failed` matches the enum-based frozenset used for non-terminal states. An upstream rename in a2a-sdk now becomes a type error instead of a silent classification drift.

Release positioning: 4.0.1 not 5.0.0

PR #258 landed with `feat(a2a)!:` + `BREAKING CHANGE:` footer, so release-please opened #257 for 5.0.0. The breaking bits were:

  • `pending_task_id` → `active_task_id` (public property rename)
  • `ValueError` → `TypeError` on non-A2A `context_id=` / `reset_context()`

4.0.0 shipped <48h before #258 landed. Per the salesagent roadmap, MCP is the critical path; A2A adoption is deferred behind pluggable TaskStore / push-notification work that isn't merged yet. Treating these as pre-adoption corrections rather than a major bump.

What happens after merge

Once this lands on main, release-please will regenerate #257 at 4.0.1 instead of 5.0.0. Merge that and PyPI publishes 4.0.1.

Test plan

  • `ruff check src/` — clean
  • `mypy src/adcp/` — 684 files, clean
  • `pytest tests/test_protocols.py tests/integration/test_a2a_context_id.py` — 70/70 pass

Heads-up, not blocking 4.0.1

  • a2a-sdk 1.0.1 is out (our pin is `<1.0`). Not backward-compatible — types moved, `DefaultRequestHandler` renamed, `ServerError` removed, `Part`/`Message` construction changed. Repo already tracks this as a separate compat PR (see pyproject.toml comment at a2a-sdk line). The `A2AClient is deprecated` warnings in our test output are the 0.3.x line signalling the 1.0 migration.

🤖 Generated with Claude Code

…te enum

- Export ``Checkpoint`` TypedDict from the top-level ``adcp`` package
  so callers can ``from adcp import Checkpoint`` instead of reaching
  into ``adcp.client`` for the persistence-key type.
- Compare ``task.status.state`` against ``TaskState.completed`` /
  ``TaskState.failed`` in ``_process_task_response`` to match the
  enum-based membership check in ``_NONTERMINAL_TASK_STATES`` — an
  upstream rename in a2a-sdk now fails as a type error instead of a
  silent classification drift.

Also flips the in-progress release-please PR from 5.0.0 to 4.0.1. The
prior commit (#258) landed breaking-style changes (``pending_task_id``
→ ``active_task_id``, ``ValueError`` → ``TypeError`` on non-A2A) but
4.0.0 shipped under 48h earlier with no known A2A adopters — the
salesagent migration is on MCP, and A2A adoption is deferred behind
pluggable TaskStore / push-notification work. Treating those as
pre-adoption corrections rather than a major bump.

Release-As: 4.0.1

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@bokelley bokelley force-pushed the bokelley/release-4.0.1 branch from d8eab37 to 5c4413b Compare April 23, 2026 11:41
@bokelley
Copy link
Copy Markdown
Contributor Author

Folding into the consolidated 4.1.0 a2a-sdk 1.0 migration PR. Both changes (Checkpoint top-level export, TaskState enum comparisons in _process_task_response) will land there.

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