Skip to content

WIP: webhooks: remove subject-based subscription surface (v0.7.0)#27

Closed
makegov-hal[bot] wants to merge 1 commit into
mainfrom
issue-2275-drop-subjects
Closed

WIP: webhooks: remove subject-based subscription surface (v0.7.0)#27
makegov-hal[bot] wants to merge 1 commit into
mainfrom
issue-2275-drop-subjects

Conversation

@makegov-hal
Copy link
Copy Markdown

@makegov-hal makegov-hal Bot commented May 12, 2026

Summary

Mirror of makegov/tango#2267 in the Python SDK — removes subject-based webhook subscriptions.

  • Deletes list_/get_/create_/update_/delete_webhook_subscription methods on TangoClient
  • Deletes WebhookSubscription and WebhookSubjectTypeDefinition dataclasses (and their tango package re-exports)
  • Drops subject fields from WebhookEventType / WebhookEventTypesResponse / sample-payload responses
  • Deletes the tango webhooks subscriptions Click subgroup; replaces the no-arg simulate fallback payload with a no-subject shape
  • Trims tests (test_client.py, test_webhooks_cli.py, test_production_smoke.py) and docs (README.md, docs/WEBHOOKS.md, docs/API_REFERENCE.md)
  • SemVer bump: 0.6.00.7.0 (still pre-1.0)

Endpoint CRUD, signing helpers, WebhookReceiver, test_webhook_delivery, get_webhook_sample_payload, and list_webhook_event_types are unaffected.

Dependency

Must land after the tango API surface change (makegov/tango#2270) ships. Drafted now so it's ready when tango is.

Verification

  • uv run ruff check tango/ — clean
  • uv run ruff format --check tango/ tests/test_client.py tests/test_webhooks_cli.py tests/production/test_production_smoke.py — clean (after running formatter on tango/models.py)
  • uv run mypy tango/client.py tango/models.py tango/__init__.py tango/webhooks/cli.py — clean
  • uv run pytest tests/test_client.py tests/test_webhooks_cli.py tests/test_webhooks_simulate.py tests/test_webhooks_signing.py tests/test_webhooks_receiver.py — 110 passed
  • Production smoke (tests/production/) deliberately not run — would hit live tango, not safe pre-#2270

Pre-existing failures (not caused by this PR)

uv run pytest tests/ --ignore=tests/production shows 21 failures in tests/test_models.py and tests/test_shapes.py. These touch shape/factory machinery I didn't modify (no diff in those files) and reproduce on main as well. Not addressed here.

Pre-existing lint warnings

uv run ruff check . (whole tree) reports 24 errors, all in tests/test_shapes.py — pre-existing.

Closes makegov/tango#2275 — part of makegov/tango#2267.

~ Hal

Tango is dropping subject-based webhook subscriptions (see
makegov/tango#2267). This PR mirrors the removal in the Python SDK:
list/get/create/update/delete_webhook_subscription methods, the
`tango webhooks subscriptions` CLI group, and the subject fields on
event-type / subscription / sample-payload models, plus matching
tests + docs.

Endpoint CRUD, signing helpers, `WebhookReceiver`, `test_delivery`,
`get_webhook_sample_payload`, and `list_webhook_event_types` are
untouched.

SemVer-major (0.6.0 → 0.7.0).

Closes makegov/tango#2275
Part of makegov/tango#2267
@infinityplusone infinityplusone changed the base branch from main to feat/api-parity May 12, 2026 20:21
@infinityplusone infinityplusone changed the base branch from feat/api-parity to main May 12, 2026 20:21
infinityplusone added a commit that referenced this pull request May 12, 2026
Folds in the work from PR #27 (issue-2275-drop-subjects) plus three
cleanup-batch carry-overs from tango's `dogpile/api-cleanup-batch`:

- #2256: add `endpoint` kwarg to create_webhook_alert (multi-endpoint
  accounts can now use the convenience wrapper)
- #2254: remove `ordering` kwarg from list_notices and list_protests
  (server rejects every value)
- #2252: switch test_webhook_delivery to canonical `endpoint` body key

Closes makegov/tango#2275 — part of makegov/tango#2267.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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