Skip to content

fix(a2a): treat a 0.3 historyLength of 0 as unlimited - #44

Open
Superagentic-AI wants to merge 1 commit into
mainfrom
fix/a2a-v03-history-length-zero
Open

Superagentic-AI wants to merge 1 commit into
mainfrom
fix/a2a-v03-history-length-zero

Conversation

@Superagentic-AI

Copy link
Copy Markdown
Contributor

Why

The reference A2A Python SDK just fixed its 0.3 compat layer so that a v0.3 `historyLength` of `0` means unlimited on JSON-RPC and REST, matching its gRPC path (a2aproject/a2a-python#1311, fixed in #1312 on 2026-10-16). SuperOptiX's server applied 1.0 semantics (zero means no history) to every caller, so a 0.3 client sending `historyLength: 0` got an empty history from SuperOptiX but the full history from the SDK.

What

  • `_history_length_param` and `_legacy_configuration` in `superoptix/protocols/a2a/server.py`: when the caller is on the 0.3 line (`A2A-Version: 0.3` or a 0.3 slash method), a zero historyLength is treated as unset.
  • Applied to JSON-RPC `SendMessage` / `GetTask` and REST `/message:send` / `GET /tasks/{id}`.
  • 1.0 behaviour is unchanged, so CORE-HIST-003 (zero returns no history) still holds.
  • Four new tests in `tests/test_a2a_conformance.py::TestLegacyHistoryLengthZero` (0.3 JSON-RPC send and get, 0.3 REST get, and a 1.0 REST get guard).

Notes

  • Small interop fix, no version bump, no release. `server.py` is identical on `release/2.0`, so this cherry-picks cleanly there.
  • Locally (unlocked env) the new tests pass. `test_vary_names_the_negotiating_header` and a few `test_a2a_adapt` cases fail on unmodified main too in that env, so they are not from this change; CI on the locked env is the source of truth.

On the 0.3 line historyLength=0 means no limit (proto-derived wire, no
unset), while 1.0 keeps zero as 'no history' (CORE-HIST-003). Mirror
a2aproject/a2a-python#1311 so 0.3 clients get the same history from
SuperOptiX as from the reference SDK, on JSON-RPC send/get and REST
send/get. Adds four conformance tests.

This branch has not been deployed

No deployments
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