Skip to content

fix(types): add UpdateMediaBuyResponse1 ergonomic coercion#857

Closed
sangilish wants to merge 1 commit into
adcontextprotocol:mainfrom
sangilish:fix/update-media-buy-response-coercion
Closed

fix(types): add UpdateMediaBuyResponse1 ergonomic coercion#857
sangilish wants to merge 1 commit into
adcontextprotocol:mainfrom
sangilish:fix/update-media-buy-response-coercion

Conversation

@sangilish
Copy link
Copy Markdown
Contributor

@sangilish sangilish commented May 25, 2026

Summary

Follow-up to #854.

This extends the generated ergonomic coercion pass to include the update-media-buy success response arm. UpdateMediaBuySuccessResponse / UpdateMediaBuyResponse1 now gets the same package-subclass and media_buy_status string coercion treatment that CreateMediaBuyResponse1 already had.

What changed

  • Added UpdateMediaBuyResponse1 to scripts/generate_ergonomic_coercion.py response analysis.
  • Regenerated src/adcp/types/_ergonomic.py so affected_packages, packages, and media_buy_status are patched at import time.
  • Added regression coverage for package subclass inputs on both update response package fields and string media_buy_status coercion.

Testing

  • uv run --extra dev pytest tests/test_type_coercion.py tests/test_code_generation.py -q --tb=short
  • uv run --extra dev pytest tests/test_type_aliases.py tests/test_public_api.py tests/type_checks -q --tb=short
  • uv run --extra dev pytest -q --tb=short
  • uv run --extra dev ruff check scripts/generate_ergonomic_coercion.py src/adcp/types/_ergonomic.py tests/test_type_coercion.py
  • uv run --extra dev mypy src/adcp/types
  • uv run --extra dev mypy src/adcp

GitHub CI: all normal CI jobs are green, including Python 3.10-3.13, Postgres conformance, schema validation, downstream import smoke, storyboards, IPR, and GitGuardian.

Note: full uv run --extra dev ruff check still reports unrelated existing lint failures in tests outside this PR's touched files, so I used the targeted ruff command above for the changed files.

CI note: the only failing GitHub check is code_review (Argus). It fails before review execution while minting the GitHub App token because the app client id / app id secret is unavailable in this fork PR context. This is not a code/test failure in this branch.

@sangilish sangilish marked this pull request as ready for review May 25, 2026 17:15
@bokelley
Copy link
Copy Markdown
Contributor

Superseded by #864, which mirrors this follow-up onto a repo-owned branch so the required base-repo checks can run.

@bokelley bokelley closed this May 26, 2026
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.

2 participants