From 9d73b47387e33a1e970cd6eeec0b9779455a4244 Mon Sep 17 00:00:00 2001 From: rachitm022 Date: Mon, 16 Nov 2026 14:31:49 +0530 Subject: [PATCH 1/2] fix(reporting): unblock status webhook bootstrap --- docs/reporting-status-notifications.md | 61 ++-- src/adcp/decisioning/handler.py | 14 +- src/adcp/reporting/outbox/status_support.py | 113 ++++++-- .../test_reporting_status_capabilities.py | 269 +++++++++++++++++- 4 files changed, 394 insertions(+), 63 deletions(-) diff --git a/docs/reporting-status-notifications.md b/docs/reporting-status-notifications.md index 97f83a20b..378006a3f 100644 --- a/docs/reporting-status-notifications.md +++ b/docs/reporting-status-notifications.md @@ -22,10 +22,11 @@ status store, pure projector, due sweeper, C outbox/HTTP worker, signing and subscription resolvers, and a mounted `ReportingStatusNotificationHandler`. `scheduled=True` is the adopter's commitment to supervise all worker phases; the SDK does not start them implicitly. Capability checks validate schema, -baseline, policy agreement, the actual `get_reporting_status` tool, and signing -material for validated `readiness_subscriptions`. An empty subscription lookup -does not prove signing readiness. Memory implementations are conformance tools -and never advertise durability. +baseline, policy agreement, the actual `get_reporting_status` tool, and delivery +configuration for every active subscription. Optional +`readiness_subscriptions` remain supported as additional signing probes, but an +external subscriber is not a prerequisite for capability discovery. Memory +implementations are conformance tools and never advertise durability. Activity storage is optional for status delivery. If the C HTTP worker has an activity recorder attached, readiness also validates that recorder's C tables @@ -51,25 +52,33 @@ for lifecycle work as well as capability proof; incomplete results refuse work before any side effects. Resolve all three fields from one complete deployment-wide transaction or -configuration revision, including the account enumeration and its signing -readiness probes. Request body, `ext` and arbitrary request context are never -resolver inputs. A request-scoped account or convenient single-account sample -cannot prove deployment-wide readiness. An incomplete, empty or unavailable -surface cannot advertise status notifications. Every listed account must be -migrated, baselined and structurally ready; one unready account suppresses the -global claim. An empty `readiness_subscriptions=()` is valid for strict type -checking but fails readiness at runtime. Every account needs a validated signing -probe, even when it has no active subscribers. +configuration revision. Request body, `ext` and arbitrary request context are +never resolver inputs. A request-scoped account or convenient single-account +sample cannot prove deployment-wide readiness. An incomplete or unavailable +surface cannot advertise status notifications. A complete empty account surface +is valid and lets a deployment advertise before its first account or subscriber +is enrolled. Every listed account must be migrated, baselined and structurally +ready; one unready account suppresses the global claim. Every active subscription +and every supplied readiness probe must retain valid authorization, +proof-of-control, signing and delivery configuration. Empty +`readiness_subscriptions=()` is valid and does not weaken those checks. Readiness is structural. A valid waiver, an outage, incomplete coverage and other current business health never disable a ready feature. Explicit claims with missing components raise secret-free configuration errors; omission stays -omission. Calling `support.advertised_notifications()` explicitly opts into -automatic advertisement when ready. Generated reporting capability models emit +omission. The decisioning handler calls `support.advertised_notifications()` +for each capability request and projects the result only when that request's +`webhook_signing.supported` is true. Generated reporting capability models emit only explicitly set optional task, notification and tier fields. Required -`configuration_task` and `status_task` declarations must also be supplied by the -adopter; do not rely on generated defaults to mount handlers. Other claimed -tasks must have real overrides and appear in `tools/list` and MCP/A2A dispatch. +`configuration_task` declarations must be supplied by the adopter. Ready status +support projects its mounted `status_task` with the notification claim. Other +claimed tasks must have real overrides and appear in `tools/list` and MCP/A2A +dispatch. + +This bootstrap rule does not enroll a receiver. Consumers still require the +signed-webhook capability and their full notification set before registering +doorbells. Authorization, proof-of-control, signing-scope and delivery checks +run for every active subscription during readiness and again at delivery time. `DecisioningPlatform` does not gain reporting task implementations from a capability declaration. Compose real handlers, as in @@ -81,7 +90,7 @@ participant. It checks types under `mypy --strict`. ### ESA decisioning setup -ESA upgrades to `adcp>=9.6.3`; no `adcp-reporting-storage` upgrade or wire-schema +ESA upgrades to `adcp>=10.0.0b19`; no `adcp-reporting-storage` upgrade or wire-schema change is required for dynamic account resolution. Import the public surface and support types from `adcp.reporting.outbox` and pass the support to ordinary decisioning `serve()`. It binds its generated handler to the support @@ -89,9 +98,10 @@ automatically; the adopter does not construct or mutate that handler. The following composition assumes the real platform reporting handlers, PostgreSQL store, worker, projector and sweeper are configured. The adopter's -`read_reporting_accounts_and_probes()` reads the complete deployment account IDs -and validated readiness subscriptions together in one transaction/revision; -it takes no request inputs and must fail if that complete read is unavailable. +`read_reporting_accounts()` reads the complete deployment account IDs in one +transaction/revision; it takes no request inputs and must fail if that complete +read is unavailable. Deployments with internal signing probes may return them in +the same snapshot. ```python from adcp.decisioning import serve @@ -99,11 +109,11 @@ from adcp.reporting.outbox import ReportingStatusAccountSurface, ReportingStatus async def account_surface() -> ReportingStatusAccountSurface: - account_ids, readiness_subscriptions = await read_reporting_accounts_and_probes() + account_ids = await read_reporting_accounts() return ReportingStatusAccountSurface( account_ids=tuple(account_ids), account_surface_complete=True, - readiness_subscriptions=tuple(readiness_subscriptions), + readiness_subscriptions=(), ) @@ -122,6 +132,9 @@ This ordinary `serve()` call mounts the handler; `scheduled=True` still requires ESA to supervise lifecycle work. Capability checks resolve a fresh surface, so adding an account requires no server restart. The global claim stays suppressed until that account has been baselined and all readiness checks pass. The +complete empty surface advertises during bootstrap when webhook signing and the +durable lifecycle are ready. A newly enrolled active subscription is validated +on the next proof and on delivery. The [custom-handler lifecycle example](../examples/reporting_status_notifications.py) also accepts this resolver; omitting it adapts the supplied static account and probe sequences to a constant async snapshot. diff --git a/src/adcp/decisioning/handler.py b/src/adcp/decisioning/handler.py index 888ad31f1..68829853b 100644 --- a/src/adcp/decisioning/handler.py +++ b/src/adcp/decisioning/handler.py @@ -2438,7 +2438,7 @@ async def get_adcp_capabilities( # truncate and flag *_complete: false rather than serve them whole. bound_capability_domain_lists(response) - from adcp.reporting.outbox.status_support import validate_status_claims + from adcp.reporting.outbox.status_support import _project_ready_status_claims from adcp.reporting.outbox.support import validate_activity_claims reporting = getattr(self._platform, "_reliable_reporting_service", None) @@ -2448,7 +2448,17 @@ async def get_adcp_capabilities( adcp_version=context.resolved_adcp_version if context is not None else None, ) - await validate_status_claims(response, support=self._reporting_status, handler=self) + signing = response.get("webhook_signing", {}) + signing_supported = isinstance(signing, dict) and signing.get("supported") is True + advertised_status: dict[str, str] = {} + if signing_supported and self._reporting_status is not None: + advertised_status = await self._reporting_status.advertised_notifications() + _project_ready_status_claims( + response, + advertised=advertised_status, + support=self._reporting_status, + handler=self, + ) await validate_activity_claims( response, diff --git a/src/adcp/reporting/outbox/status_support.py b/src/adcp/reporting/outbox/status_support.py index 849999dd3..c322b3627 100644 --- a/src/adcp/reporting/outbox/status_support.py +++ b/src/adcp/reporting/outbox/status_support.py @@ -20,6 +20,11 @@ logger = logging.getLogger(__name__) +_STATUS_NOTIFICATION_CLAIMS = { + "status_task": "get_reporting_status", + "status_notification": "reporting.status_changed", +} + @dataclass(frozen=True, kw_only=True) class ReportingStatusAccountSurface: @@ -107,11 +112,15 @@ async def account_ready(self, *, account_id: str) -> bool: return await self._account_ready(account_id=account_id, surface=surface) async def _account_ready( - self, *, account_id: str, surface: ReportingStatusAccountSurface + self, + *, + account_id: str, + surface: ReportingStatusAccountSurface, + queue_ready: bool = False, ) -> bool: - if not await self.queue_durable() or not await self.store.baseline_ready( - account_id=account_id - ): + if not queue_ready and not await self.queue_durable(): + return False + if not await self.store.baseline_ready(account_id=account_id): return False assert isinstance(self.store, ReportingDurableStatusStore) if await self.store.managed_delivery_recorded(account_id=account_id): @@ -119,9 +128,12 @@ async def _account_ready( subscriptions = await self.worker.subscriptions.list_active( account_id=account_id, notification_type="reporting.status_changed" ) - probes = tuple(s for s in surface.readiness_subscriptions if s.account_id == account_id) - if not probes: - return False + probes: list[ReportingNotificationSubscription] = [] + for subscription in surface.readiness_subscriptions: + if type(subscription) is not ReportingNotificationSubscription: + raise ReportingNotificationError("status_subscription_unready") + if subscription.account_id == account_id: + probes.append(subscription) identities: set[str] = set() for subscription in subscriptions: if ( @@ -163,12 +175,19 @@ async def durable(self) -> bool: return False if ( not surface.account_surface_complete - or not surface.account_ids or any(not account_id for account_id in surface.account_ids) - or not surface.readiness_subscriptions or self.handler is None ): return False + accounts = frozenset(surface.account_ids) + if any( + type(subscription) is not ReportingNotificationSubscription + or subscription.account_id not in accounts + for subscription in surface.readiness_subscriptions + ): + raise ReportingNotificationError("status_subscription_unready") + if not await self.queue_durable(): + return False projection = getattr(self.handler, "reporting_status_handler", None) if ( type(projection) is not ReportingStatusHandler @@ -179,23 +198,18 @@ async def durable(self) -> bool: not in {t["name"] for t in get_tools_for_handler(self.handler, _include_schemas=False)} ): return False - return all( - [ - await self._account_ready(account_id=a, surface=surface) - for a in sorted(set(surface.account_ids)) - ] - ) + for account_id in sorted(set(surface.account_ids)): + if not await self._account_ready( + account_id=account_id, + surface=surface, + queue_ready=True, + ): + return False + return True async def advertised_notifications(self) -> dict[str, str]: """An explicit global claim, after checking the entire trusted surface.""" - return ( - { - "status_task": "get_reporting_status", - "status_notification": "reporting.status_changed", - } - if await self.durable() - else {} - ) + return dict(_STATUS_NOTIFICATION_CLAIMS) if await self.durable() else {} async def validate_status_claims( @@ -203,20 +217,41 @@ async def validate_status_claims( *, support: ReportingStatusSupport | None, handler: ADCPHandler[Any] | None = None, +) -> None: + claim = response.get("media_buy", {}).get("reporting_delivery", {}).get("status_notification") + if claim is None: + return + ready = support is not None and await support.durable() + _validate_ready_status_claims( + response, + support=support, + handler=handler, + ready=ready, + ) + + +def _validate_ready_status_claims( + response: dict[str, Any], + *, + support: ReportingStatusSupport | None, + handler: ADCPHandler[Any] | None, + ready: bool, ) -> None: claim = response.get("media_buy", {}).get("reporting_delivery", {}).get("status_notification") if claim is None: return block = response.get("media_buy", {}).get("reporting_delivery", {}) + signing = response.get("webhook_signing", {}) if ( claim != "reporting.status_changed" or support is None or block.get("status_task") != "get_reporting_status" + or not isinstance(signing, dict) + or signing.get("supported") is not True or (handler is not None and support.handler is not handler) + or not ready ): raise ReportingNotificationError("status_capability_requires_durable_reporting") - if not await support.durable(): - raise ReportingNotificationError("status_capability_requires_durable_reporting") from adcp.server.mcp_tools import get_tools_for_handler assert support.handler is not None @@ -224,3 +259,31 @@ async def validate_status_claims( for field, task in block.items(): if field.endswith("_task") and isinstance(task, str) and task not in mounted: raise ReportingNotificationError("reporting_capability_requires_mounted_task") + + +def _project_ready_status_claims( + response: dict[str, Any], + *, + advertised: dict[str, str], + support: ReportingStatusSupport | None, + handler: ADCPHandler[Any], +) -> None: + if advertised: + if advertised != _STATUS_NOTIFICATION_CLAIMS: + raise ReportingNotificationError("status_capability_requires_durable_reporting") + media_buy = response.setdefault("media_buy", {}) + if not isinstance(media_buy, dict): + raise ReportingNotificationError("status_capability_requires_durable_reporting") + reporting_delivery = media_buy.setdefault("reporting_delivery", {}) + if not isinstance(reporting_delivery, dict) or any( + field in reporting_delivery and reporting_delivery[field] != value + for field, value in advertised.items() + ): + raise ReportingNotificationError("status_capability_requires_durable_reporting") + reporting_delivery.update(advertised) + _validate_ready_status_claims( + response, + support=support, + handler=handler, + ready=bool(advertised), + ) diff --git a/tests/conformance/reporting/test_reporting_status_capabilities.py b/tests/conformance/reporting/test_reporting_status_capabilities.py index 97f6b76c8..119bf2835 100644 --- a/tests/conformance/reporting/test_reporting_status_capabilities.py +++ b/tests/conformance/reporting/test_reporting_status_capabilities.py @@ -4,12 +4,13 @@ import json from dataclasses import FrozenInstanceError, replace from itertools import product +from typing import Any, cast import pytest from adcp_reporting_storage import PgReportingActivityUnionStore from adcp.decisioning import DecisioningCapabilities, DecisioningPlatform, SingletonAccounts -from adcp.decisioning.capabilities import Account, MediaBuy +from adcp.decisioning.capabilities import Account, MediaBuy, WebhookSigning from adcp.decisioning.serve import create_adcp_server_from_platform from adcp.exceptions import ADCPTaskError from adcp.reporting.ledger import InMemoryReportingLedgerStore, ReportingDeliveryEscalation @@ -54,6 +55,69 @@ class ReportingPlatform(DecisioningPlatform): accounts = SingletonAccounts(account_id="acct_a") +class ReportingAccounts(SingletonAccounts): + def upsert(self, refs: list[Any], ctx: Any | None = None) -> list[Any]: + del refs, ctx + return [] + + +class ScopedSigningReportingPlatform(ReportingPlatform): + accounts = ReportingAccounts(account_id="acct_a") + capabilities = replace( + ReportingPlatform.capabilities, + media_buy=MediaBuy( + reporting_delivery=ReportingDeliveryCapabilities.model_validate( + { + "supported": True, + "configuration_task": "sync_accounts", + "status_task": "get_reporting_status", + "offerings": [_OFFERING], + "automated_recovery_window_seconds": 0, + "status_retention_days": 30, + } + ) + ), + experimental_features=["media_buy.reporting_delivery"], + ) + + def get_adcp_capabilities_for_request( + self, params: Any, context: ToolContext | None + ) -> DecisioningCapabilities | None: + del params + if context is None or context.caller_identity != "signed-buyer": + return None + return replace( + self.capabilities, + webhook_signing=WebhookSigning( + supported=True, + delivery_retry_horizon_seconds=86400, + profile="adcp/webhook-signing/v1", + algorithms=["ed25519"], + legacy_hmac_fallback=False, + ), + webhook_signing_managed_externally=True, + ) + + +class AdvertisedStatusSupport: + def __init__(self) -> None: + self.handler: Any | None = None + self.calls = 0 + + def _bind_handler(self, handler: Any) -> None: + self.handler = handler + + async def advertised_notifications(self) -> dict[str, str]: + self.calls += 1 + return { + "status_task": "get_reporting_status", + "status_notification": "reporting.status_changed", + } + + async def durable(self) -> bool: + return True + + async def support_for(h, accounts=("acct_a",)): n = NotificationHarness(h.reliable) probes = tuple( @@ -62,6 +126,7 @@ async def support_for(h, accounts=("acct_a",)): ) for a in accounts ) + for subscription in probes: n.subscriptions.put(subscription) @@ -86,6 +151,34 @@ async def resolve(request, context): ) +async def test_generated_handler_projects_status_only_for_signed_discovery() -> None: + support = AdvertisedStatusSupport() + handler, executor, _ = create_adcp_server_from_platform( + ScopedSigningReportingPlatform(), + reporting_status=cast(ReportingStatusSupport, support), + auto_emit_task_webhooks=False, + validate_at_init=False, + ) + try: + unsigned = await handler.get_adcp_capabilities( + {}, ToolContext(caller_identity="unsigned-buyer") + ) + assert "status_notification" not in ( + unsigned.get("media_buy", {}).get("reporting_delivery", {}) + ) + assert support.calls == 0 + + signed = await handler.get_adcp_capabilities( + {}, ToolContext(caller_identity="signed-buyer") + ) + reporting = signed["media_buy"]["reporting_delivery"] + assert reporting["status_task"] == "get_reporting_status" + assert reporting["status_notification"] == "reporting.status_changed" + assert support.calls == 1 + finally: + executor.shutdown(wait=True) + + async def test_static_lifecycle_default_iterates_without_advertising_status( status_harness, monkeypatch ): @@ -266,6 +359,14 @@ async def resolve_surface() -> ReportingStatusAccountSurface: } ) ), + webhook_signing=WebhookSigning( + supported=True, + delivery_retry_horizon_seconds=86400, + profile="adcp/webhook-signing/v1", + algorithms=["ed25519"], + legacy_hmac_fallback=False, + ), + webhook_signing_managed_externally=True, ) service = ReliableReportingService( store=h.ledger, @@ -274,7 +375,10 @@ async def resolve_surface() -> ReportingStatusAccountSurface: escalation=escalation, ) handler, executor, _ = create_adcp_server_from_platform( - service.install(platform), reporting_status=support, validate_at_init=False + service.install(platform), + reporting_status=support, + auto_emit_task_webhooks=False, + validate_at_init=False, ) request = {} context = ToolContext() @@ -340,18 +444,16 @@ async def resolve_surface() -> ReportingStatusAccountSurface: # Catches stale constructor evidence being merged into an incomplete resolver surface. -@pytest.mark.parametrize("missing", ["complete", "accounts", "account_id", "probes"]) -async def test_dynamic_surface_requires_complete_nonempty_evidence(status_harness, missing): +@pytest.mark.parametrize("missing", ["complete", "account_id"]) +async def test_dynamic_surface_requires_complete_valid_account_ids(status_harness, missing): h = status_harness await h.seed(readable=True) await h.status.baseline(account_id="acct_a") _, static = await support_for(h) surface = ReportingStatusAccountSurface( - account_ids=( - () if missing == "accounts" else (("",) if missing == "account_id" else ("acct_a",)) - ), + account_ids=(("",) if missing == "account_id" else ("acct_a",)), account_surface_complete=missing != "complete", - readiness_subscriptions=() if missing == "probes" else static.readiness_subscriptions, + readiness_subscriptions=static.readiness_subscriptions, ) async def resolve_surface() -> ReportingStatusAccountSurface: @@ -438,8 +540,8 @@ async def resolve_surface() -> ReportingStatusAccountSurface: await support.durable() -# Catches partial signing evidence being combined with stale constructor probes. -async def test_dynamic_surface_requires_a_probe_for_every_account(status_harness): +# Catches synthetic signing probes becoming a prerequisite for discovery. +async def test_dynamic_surface_does_not_require_readiness_probes(status_harness): h = status_harness if isinstance(h.ledger, InMemoryReportingLedgerStore): pytest.skip("durability advertisement requires PostgreSQL") @@ -451,14 +553,157 @@ async def test_dynamic_surface_requires_a_probe_for_every_account(status_harness surface = ReportingStatusAccountSurface( account_ids=("acct_a", "acct_b"), account_surface_complete=True, - readiness_subscriptions=static.readiness_subscriptions[:1], + readiness_subscriptions=(), ) async def resolve_surface() -> ReportingStatusAccountSurface: return surface support = replace(static, account_surface_resolver=resolve_surface) - assert await support.advertised_notifications() == {} + advertised = await support.advertised_notifications() + assert bool(advertised) is (not isinstance(h.ledger, InMemoryReportingLedgerStore)) + + +async def test_complete_empty_surface_and_zero_subscribers_bootstrap_capability( + status_harness, +): + h = status_harness + if isinstance(h.ledger, InMemoryReportingLedgerStore): + pytest.skip("durability advertisement requires PostgreSQL") + escalation = ReportingDeliveryEscalation() + h.status = type(h.status)(h.ledger, escalation=escalation) + notifications, static = await support_for(h) + notifications.subscriptions.values.clear() + surface_calls = 0 + + async def resolve_surface() -> ReportingStatusAccountSurface: + nonlocal surface_calls + surface_calls += 1 + return ReportingStatusAccountSurface( + account_ids=(), + account_surface_complete=True, + readiness_subscriptions=(), + ) + + support = replace( + static, + handler=None, + account_surface_resolver=resolve_surface, + ) + service = ReliableReportingService( + store=h.ledger, + account_context=_account_context, + consumer_status_enabled=True, + escalation=escalation, + ) + handler, executor, _ = create_adcp_server_from_platform( + service.install(ScopedSigningReportingPlatform()), + reporting_status=support, + auto_emit_task_webhooks=False, + validate_at_init=False, + ) + try: + unsigned = await handler.get_adcp_capabilities( + {}, ToolContext(caller_identity="unsigned-buyer") + ) + assert "status_notification" not in ( + unsigned.get("media_buy", {}).get("reporting_delivery", {}) + ) + assert surface_calls == 0 + + signed = await handler.get_adcp_capabilities( + {}, ToolContext(caller_identity="signed-buyer") + ) + reporting = signed["media_buy"]["reporting_delivery"] + assert reporting["status_task"] == "get_reporting_status" + assert reporting["status_notification"] == "reporting.status_changed" + assert surface_calls == 1 + assert notifications.subscriptions.lists == [] + finally: + executor.shutdown(wait=True) + await service.close() + + +@pytest.mark.parametrize("incomplete", ["projector", "baseline"]) +async def test_signed_discovery_omits_status_when_infrastructure_is_incomplete( + status_harness, incomplete +): + h = status_harness + if isinstance(h.ledger, InMemoryReportingLedgerStore): + pytest.skip("durability advertisement requires PostgreSQL") + escalation = ReportingDeliveryEscalation() + h.status = type(h.status)(h.ledger, escalation=escalation) + await h.seed(readable=True) + if incomplete == "projector": + await h.status.baseline(account_id="acct_a") + notifications, static = await support_for(h) + notifications.subscriptions.values.clear() + support = replace( + static, + handler=None, + readiness_subscriptions=(), + projector=None if incomplete == "projector" else static.projector, + ) + service = ReliableReportingService( + store=h.ledger, + account_context=_account_context, + consumer_status_enabled=True, + escalation=escalation, + ) + handler, executor, _ = create_adcp_server_from_platform( + service.install(ScopedSigningReportingPlatform()), + reporting_status=support, + auto_emit_task_webhooks=False, + validate_at_init=False, + ) + try: + capabilities = await handler.get_adcp_capabilities( + {}, ToolContext(caller_identity="signed-buyer") + ) + assert "status_notification" not in ( + capabilities.get("media_buy", {}).get("reporting_delivery", {}) + ) + finally: + executor.shutdown(wait=True) + await service.close() + + +async def test_malformed_active_subscription_refuses_signed_discovery(status_harness, monkeypatch): + h = status_harness + if isinstance(h.ledger, InMemoryReportingLedgerStore): + pytest.skip("durability advertisement requires PostgreSQL") + escalation = ReportingDeliveryEscalation() + h.status = type(h.status)(h.ledger, escalation=escalation) + await h.seed(readable=True) + await h.status.baseline(account_id="acct_a") + notifications, static = await support_for(h) + + async def malformed_subscriptions( + *, account_id: str, notification_type: str + ) -> tuple[object, ...]: + del account_id, notification_type + return (object(),) + + monkeypatch.setattr(notifications.subscriptions, "list_active", malformed_subscriptions) + support = replace(static, handler=None, readiness_subscriptions=()) + service = ReliableReportingService( + store=h.ledger, + account_context=_account_context, + consumer_status_enabled=True, + escalation=escalation, + ) + handler, executor, _ = create_adcp_server_from_platform( + service.install(ScopedSigningReportingPlatform()), + reporting_status=support, + auto_emit_task_webhooks=False, + validate_at_init=False, + ) + try: + with pytest.raises(ReportingNotificationError, match="^status_subscription_unready$"): + await handler.get_adcp_capabilities({}, ToolContext(caller_identity="signed-buyer")) + finally: + executor.shutdown(wait=True) + await service.close() # Catches repeated resolver calls combining accounts and probes from different snapshots. From d000f99abdb1e57473b770d572b170fceaa5616a Mon Sep 17 00:00:00 2001 From: rachitm022 Date: Mon, 16 Nov 2026 14:38:33 +0530 Subject: [PATCH 2/2] test(reporting): align status readiness matrix --- tests/conformance/reporting/test_reporting_status_delivery.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/conformance/reporting/test_reporting_status_delivery.py b/tests/conformance/reporting/test_reporting_status_delivery.py index d34023e92..1b60d4cbd 100644 --- a/tests/conformance/reporting/test_reporting_status_delivery.py +++ b/tests/conformance/reporting/test_reporting_status_delivery.py @@ -199,7 +199,6 @@ async def test_colliding_notification_ids_isolate_reemit_fanout_delivery_restart "schema", "worker", "task", - "signing_probe", "account_surface", ], ) @@ -243,8 +242,6 @@ async def resolve(request, context): support = replace(support, worker=n.worker()) elif missing == "task": support = replace(support, handler=None) - elif missing == "signing_probe": - support = replace(support, readiness_subscriptions=()) elif missing == "account_surface": support = replace(support, account_surface_complete=False) elif missing == "schema" and h.reliable.blobs.pool is not None: @@ -258,6 +255,7 @@ async def resolve(request, context): else {} ) claim = { + "webhook_signing": {"supported": True}, "media_buy": { "reporting_delivery": { "status_task": "get_reporting_status",