fix(sdk): address beta testing and migration gaps - #1056
Conversation
There was a problem hiding this comment.
Ladon verdict: Approve
Approve — beta-gap fix across codemod, version-scoped models, and testing helpers; no blocking or medium findings.
What I checked:
- Codemod (
v3_to_v4.py) now identity-gates generated→public rewrites and fails closed on non-identical collisions; SKIP-hint collision path is covered by tests. - Version-scoped extension models normalize explicit optional
Noneto omission only when the schema forbids null; both omit and preserve branches are tested. - In-process testing helpers forward MCP session controls (stateless_http / session_idle_timeout=1800.0 / max_active_sessions) plus lifespan hooks with matching production defaults, asserted against the production factories.
High-risk flag: true, but all four reasons are (modified) files with no medium-or-higher findings; per the change-kind guidance modifications with no medium concern are presumed safe. No (deleted) entries. gated_paths is false; no author-team gate.
Note (non-blocking, low): The additive public surface at aliases.py:2107 ships under fix(sdk): rather than feat:. This is a semver-signal nit — additive (non-breaking) surface only affects the version-bump magnitude, not adopter deserialization, so it does not meet the high breaking-change bar. Worth a maintainer glance but not blocking.
Decision table: no critical/high (row 1 no), gated_paths false (row 2 no), no deletions (row 3 no), no medium (rows 4/5/8 no), no prior escalate (row 6 no), no team gate (row 7 no) → row 9 approve.
There was a problem hiding this comment.
Ladon verdict: Approve
Approve.
This is a subsequent push on a PR previously approved (prior head 36ccf4b, no findings). The current delta is a single test-only commit making two patch() call sites Python 3.10 compatible in tests/test_testing_decisioning.py — swapping string-path patch() for patch.object() on the importlib-resolved serve module, with wraps= preserving the real callable. Functionally equivalent; no production, wire-shape, or public-API surface touched.
Decision-table walk:
- Rows 1: no critical/high findings.
- Row 2:
gated_pathsis false — does not apply. - Row 3: no
(deleted)high-risk reasons — all high-risk entries are(modified). - Row 4: no medium findings.
- Row 5:
high_riskis true with(modified)entries, but no medium finding present — does not fire. - Row 6: prior decision was
approve, notescalate. - Row 7: no no-auto-approve team match.
- Row 8: fewer than three medium findings (zero).
- Row 9: approve.
Note: the high-risk flag fires on the src/adcp/types/** and migrate files listed in the diff stats, but the reviewer's delta analysis confirms this incremental commit is test-only and clean, with no medium-or-higher concerns on any modified sensitive file. review_decision is REVIEW_REQUIRED but no hard path gate applies (gated_paths false), so a clean diff approves per row 9.
Summary
Nonevalues to omission in version-pinned Pydantic extension models while preserving schema-nullable valuesWhy
SDK 8 beta adopter feedback exposed three production-parity and migration-safety gaps: test apps could not reproduce production lifespan/session configuration, versioned extension models rejected explicitly supplied optional
Nonevalues despite advertising nullable Python annotations, and the v3-to-v4 codemod could substitute a different generated class when a bare public name collided.Closes #1054.
Closes #1055.
Addresses the latest beta.5 follow-up in #911.
Validation
ruff check src/mypy src/adcp/mypy --strict tests/type_checks/