fix(agent-team): register QuestionSet with the langgraph checkpoint serializer #30

Merged
amoussa1229 merged 1 commit from fix/agent-team-msgpack-questionset into main 2026-06-22 20:14:27 +00:00
amoussa1229 commented 2026-06-22 20:11:03 +00:00 (Migrated from github.com)

Silences (by properly allowlisting, not muting) the LangGraph msgpack warning that fires on every checkpoint load: "Deserializing unregistered type agent_team.transport.base.QuestionSet … will be blocked in a future version." Left unfixed, a future LangGraph would block it and break durable resume.

Change (graph.py)

  • Added build_checkpoint_serde() → JsonPlusSerializer(allowed_msgpack_modules=[("agent_team.transport.base","QuestionSet")]) (the explicit-allow path the warning recommends; not LANGGRAPH_STRICT_MSGPACK, no log silencing).
  • Rewrote build_sqlite_checkpointer to open its own connection and construct SqliteSaver(conn, serde=serde) (the from_conn_string helper has no seam to inject a serde), preserving the existing @contextmanager contract.

Verification

  • ruff clean; pytest (agent-team) 963 passed (+3: serde allowlist, serde round-trip no-warning, end-to-end SqliteSaver round-trip no-warning).
  • Runtime-confirmed: configured checkpointer round-trips a QuestionSet with no "unregistered type" warning; confirmed the warning DOES fire with the default serde (fix is load-bearing).

Version note

The build agent validated against the Mac's local langgraph 1.1.10; the box / requirements.txt pin 1.2.5 (and Dependabot #24 proposes 1.2.6). The JsonPlusSerializer(allowed_msgpack_modules=...) API is stable across these — CI subproject-tests runs on the pinned 1.2.5, so merge only on green there.

Silences (by properly allowlisting, not muting) the LangGraph msgpack warning that fires on every checkpoint load: *"Deserializing unregistered type agent_team.transport.base.QuestionSet … will be blocked in a future version."* Left unfixed, a future LangGraph would **block** it and break durable resume. ### Change (`graph.py`) - Added `build_checkpoint_serde()` → `JsonPlusSerializer(allowed_msgpack_modules=[("agent_team.transport.base","QuestionSet")])` (the explicit-allow path the warning recommends; not `LANGGRAPH_STRICT_MSGPACK`, no log silencing). - Rewrote `build_sqlite_checkpointer` to open its own connection and construct `SqliteSaver(conn, serde=serde)` (the `from_conn_string` helper has no seam to inject a serde), preserving the existing `@contextmanager` contract. ### Verification - `ruff` clean; `pytest` (agent-team) **963 passed** (+3: serde allowlist, serde round-trip no-warning, end-to-end SqliteSaver round-trip no-warning). - Runtime-confirmed: configured checkpointer round-trips a QuestionSet with **no** "unregistered type" warning; confirmed the warning DOES fire with the default serde (fix is load-bearing). ### Version note The build agent validated against the Mac's local **langgraph 1.1.10**; the box / `requirements.txt` pin **1.2.5** (and Dependabot #24 proposes 1.2.6). The `JsonPlusSerializer(allowed_msgpack_modules=...)` API is stable across these — **CI `subproject-tests` runs on the pinned 1.2.5**, so merge only on green there.
This repo is archived. You cannot comment on pull requests.
No description provided.