Skip to content

fix(sdk): address beta testing and migration gaps - #1056

Merged
bokelley merged 2 commits into
mainfrom
upstream-feedback-follow-up
Aug 21, 2026
Merged

fix(sdk): address beta testing and migration gaps#1056
bokelley merged 2 commits into
mainfrom
upstream-feedback-follow-up

Conversation

@bokelley

Copy link
Copy Markdown
Contributor

Summary

  • forward production lifespan hooks and MCP session controls through the public in-process testing helpers
  • normalize optional non-nullable None values to omission in version-pinned Pydantic extension models while preserving schema-nullable values
  • add collision-safe semantic aliases and source-aware codemod mappings, with identity checks that refuse unsafe automatic rewrites

Why

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 None values 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

  • three independent expert reviews: code, protocol/schema, and Python/Pydantic; no blockers found
  • focused change suite: 333 passed; public API suite: 21 passed
  • full pytest run: 6,740 passed, 40 skipped, 9 deselected, 1 xfailed; its two failures were the then-stale intentional API snapshot and an unrelated sub-microsecond wall-clock race, both of which passed on rerun after the snapshot update
  • ruff check src/
  • mypy src/adcp/
  • mypy --strict tests/type_checks/
  • pre-commit suite on the committed diff

@bokelley
bokelley marked this pull request as ready for review August 20, 2026 08:04
aao-secretariat[bot]
aao-secretariat Bot previously approved these changes Aug 20, 2026

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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 None to 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.

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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_paths is 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_risk is true with (modified) entries, but no medium finding present — does not fire.
  • Row 6: prior decision was approve, not escalate.
  • 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.

@bokelley
bokelley disabled auto-merge August 21, 2026 04:00
@bokelley
bokelley merged commit 16e6bbb into main Aug 21, 2026
27 checks passed
@bokelley
bokelley deleted the upstream-feedback-follow-up branch August 21, 2026 04:00
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.

types: make_versioned_base should omit optional None values testing: forward lifespan and MCP session settings from build_asgi_app

1 participant