Skip to content

feat(schema): add operation_id to reporting-webhook for delivery correlation - #7895

Merged
bokelley merged 5 commits into
adcontextprotocol:mainfrom
sujanchalla0510:fix-7885-reporting-webhook-operation-id
Oct 6, 2026
Merged

bokelley merged 5 commits into
adcontextprotocol:mainfrom
sujanchalla0510:fix-7885-reporting-webhook-operation-id

Conversation

@sujanchalla0510

@sujanchalla0510 sujanchalla0510 commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #7885.

media_buy_delivery webhook payloads require operation_id, but a buyer who registered only reporting_webhook in create_media_buy had no channel to supply one — sellers had to invent a value (spec-forbidden), emit a schema-invalid payload, or send nothing (the Embedded Sales Agent currently fails closed and skips these reports entirely).

What changed:

  • static/schemas/source/core/reporting-webhook.json: adds optional operation_id with the same constraints as push_notification_config.operation_id (minLength: 1, maxLength: 255, ^[A-Za-z0-9_.:-]{1,255}$). The description specifies the seller MUST echo it verbatim into every webhook payload's operation_id on each media_buy_delivery report sent to that registration, MUST NOT derive it by parsing the URL, and MUST NOT emit media_buy_delivery webhooks to a registration that omits it (the fail-closed behavior becomes specified behavior; expected to become required in 4.0).
  • docs/building/by-layer/L3/webhooks.mdx: short note in the Reporting webhooks section documenting the new field and the fail-closed rule.
  • Changeset: minor bump for adcontextprotocol.

How it was tested:

  • Draft-07 meta-validation of the edited schema; all local $refs resolve.
  • Local instance validation: a registration without operation_id still validates (optional preserved); a registration with a valid operation_id validates; empty/space-containing/over-255 values are rejected.
  • Constraint parity with push-notification-config.operation_id verified programmatically (minLength/maxLength/pattern/type identical).
  • node scripts/check-changeset-protocol-scope.cjs origin/main passes; changeset status --since=origin/main reports the expected minor bump.

Decision for human review (Option C)

This PR implements Option C from the #7885 triage: operation_id is an optional schema field, and sellers MUST NOT send media_buy_delivery reports to a registration that omits it (fail-closed becomes specified behavior; expected to become required in 4.0). It was chosen over Option B (seller synthesizes a stable ID) because a synthesized value contradicts the existing "MUST NOT derive" rule and the buyer cannot correlate it.

⚠️ The maintainer has not explicitly confirmed C over synthesizing an ID. This is the one judgment call for human review. If B is preferred, it is a one-sentence swap in the field description.

Open questions from protocol-expert review (not changed here, to keep scope):

  • Should create/update additionally reject a registration without operation_id with INVALID_REQUEST (as push_notification_config does) instead of silent suppression only? A 3.2.x buyer omitting the field on a 3.3 seller currently gets no reports and no error.
  • Replace vs merge semantics of reporting_webhook on update_media_buy / control_media_buy: if it replaces, an update omitting operation_id would suppress a working stream.
  • Confirm "3.3" as the target release number used in the docs.

Update (merge with main / #7900)

  • Merged origin/main; reconciled the 3.2 "interim reporting correlation" section: kept it, reworded to "standardized as an optional field in 3.3; the 3.2 interim wire shape is identical", fail-closed MUST NOT scoped to 3.3.
  • Added the field to the update_media_buy and create_media_buy parameter tables and notes in buy_products, accept_proposal, control_media_buy.
  • Canonical-projection check: no canonical-* schema mirrors the reporting-webhook shape (only the update_reporting_webhook action enum), so none needs the field.
  • Verified: build:schemas, test:schemas, test:doc-compliance-drift, test:compliance-snippets, changeset scope check (minor).

🤖 Generated with Claude Code

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ladon verdict: Escalate to human review

Escalate — gated path touched without required approval.

This PR modifies static/schemas/source/core/reporting-webhook.json, which matches the deterministic hard approval gate (static/schemas/source/**). gated_paths is true and review_decision is REVIEW_REQUIRED (not APPROVED), so decision-table row 2 fires: the gate is not satisfied and a human / CODEOWNERS approval is required before this can merge.

Change assessment (informational): The change adds an optional operation_id to core/reporting-webhook.json, mirroring push_notification_config.operation_id exactly. Schema↔docs coherence, changeset scope/type (correct minor), oneOf discriminator, and immutability all check out — this is a clean, non-breaking, additive change with no blocking findings.

Medium follow-up (non-blocking, not pinnable inline): The canonical buyer-facing docs (create_media_buy.mdx:890 and optimization-reporting.mdx:250/265) still omit operation_id, so they teach a registration flow that now fails-closed and silently does not deliver. Worth addressing, but those lines are outside the diff.

Escalation reason:

  • Modifies static/schemas/source/core/reporting-webhook.json — gated protocol-source path requiring human/CODEOWNERS review; review_decision is REVIEW_REQUIRED, not APPROVED.

Why human review

  • Modifies static/schemas/source/core/reporting-webhook.json — a gated protocol-source path under a hard approval gate; review_decision is REVIEW_REQUIRED (not APPROVED), so human/CODEOWNERS review is required before merge.
  • This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/reporting-webhook.json (modified) matches static/schemas/source/**) and the current GitHub review decision is 'REVIEW_REQUIRED', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.

@aao-secretariat aao-secretariat Bot added the ladon/needs-human-review Ladon has escalated this PR for human review. label Oct 3, 2026
@aao-secretariat
aao-secretariat Bot requested a review from bokelley October 3, 2026 00:12
@sujanchalla0510

Copy link
Copy Markdown
Contributor Author

Noted the Ladon escalation — this touches the gated schema path (static/schemas/source/**), so a human/CODEOWNERS review is required before merge, which matches the needs-wg-review label on #7885. The change is intentionally additive and non-breaking (optional field, same constraints as push_notification_config.operation_id), with a minor protocol changeset.

Followed up on the Medium finding: the three buyer-facing reporting_webhook registration examples (create_media_buy JS + Python, optimization-reporting Bearer + HMAC) now include operation_id, so the docs no longer teach a registration flow that fails closed and silently delivers nothing. New head: 28419d8.

@aao-secretariat aao-secretariat Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ladon verdict: Escalate to human review

Escalate — gated protocol-source path requires human/CODEOWNERS approval.

This PR makes an additive change to static/schemas/source/core/reporting-webhook.json (adds an operation_id field) and propagates the example into two docs pages, with a correct minor-scoped changeset. The reviewer reported a clean pass: no schema↔docs drift, no oneOf discriminator regression, no dist artifact edits, and schema constraints matching the existing push_notification_config.operation_id. There are no Critical/High/Medium findings.

However, the change touches a file under a hard, non-overridable approval gate (static/schemas/source/**) and the current GitHub review decision is REVIEW_REQUIRED, not APPROVED. Per decision-table row 2, the gate is not satisfied and Ladon cannot auto-approve regardless of how clean the diff is. A human/CODEOWNERS approval must be recorded before merge.

This continues the prior escalate decision; the escalation persists solely due to the unsatisfied gated-path gate, not because of any new actionable finding.

Escalation reasons

  • Modifies static/schemas/source/core/reporting-webhook.json — a gated protocol-source path under a hard approval gate; review_decision is REVIEW_REQUIRED (not APPROVED), so human/CODEOWNERS review is required before merge.

Why human review

  • Modifies static/schemas/source/core/reporting-webhook.json — a gated protocol-source path (static/schemas/source/**) under a hard approval gate; review_decision is REVIEW_REQUIRED, not APPROVED, so human/CODEOWNERS review is required before merge.
  • This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/core/reporting-webhook.json (modified) matches static/schemas/source/**) and the current GitHub review decision is 'REVIEW_REQUIRED', not APPROVED. This is a hard gate enforced in code — Ladon cannot auto-approve until a human/CODEOWNERS approval is recorded, regardless of how clean the diff is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ladon/needs-human-review Ladon has escalated this PR for human review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

reporting_webhook cannot carry the operation_id that media_buy_delivery webhooks require (3.2.1)

2 participants