feat(creative): add opt-in async preview rendering - #6171
Conversation
There was a problem hiding this comment.
Ladon verdict: Escalate to human review
Escalate — gated schema paths require human/CODEOWNERS approval.
This PR modifies static/schemas/source/creative/preview-creative-request.json and static/schemas/source/creative/preview-creative-response.json, both under the deterministic hard approval gate (gated_paths: true). The required review status is REVIEW_REQUIRED, not APPROVED, so the gate is not satisfied (decision table row 2). Outcome must be escalate.
The change itself looks clean: an additive, opt-in async preview_creative (allow_async default false) plus a fourth PreviewCreativeSubmitted response arm returnable only when opted in. The reviewer confirms all four arms carry distinct discriminator consts at the live head (commit 2 fixed the discriminator regression from commit 1), so audit-oneof --check stays green; docs match the schema; and the minor changeset is correct for a non-breaking opt-in. No blocking or Medium findings.
Escalation reason:
- Modifies gated schema files
static/schemas/source/creative/preview-creative-request.jsonandstatic/schemas/source/creative/preview-creative-response.json;review_decisionisREVIEW_REQUIRED. Human/CODEOWNERS approval is required before merge.
Why human review
- Modifies gated path static/schemas/source/creative/preview-creative-request.json and preview-creative-response.json under the hard approval gate; review_decision is REVIEW_REQUIRED (not APPROVED). Human/CODEOWNERS review required.
- This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/creative/preview-creative-request.json (modified) matches
static/schemas/source/**; static/schemas/source/creative/preview-creative-response.json (modified) matchesstatic/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.
There was a problem hiding this comment.
Ladon verdict: Escalate to human review
Escalate — gated path requires human/CODEOWNERS review.
This PR modifies published protocol schema source under static/schemas/source/** (preview-creative-request.json, preview-creative-response.json), which sits behind a hard, path-based approval gate (gated_paths: true). The current review_decision is REVIEW_REQUIRED, not APPROVED, so decision-table row 2 fires and the outcome cannot be approve or plain comment.
The change itself looks clean per the reviewer: adds buyer-opt-in async rendering to preview_creative — a request-side allow_async boolean (default false) plus a fourth response oneOf arm PreviewCreativeSubmitted. The oneOf stays cleanly discriminated via response_type const across all four arms, with belt-and-suspenders not:{status==submitted} guards on the sync arms. Change is fully additive and opt-in-gated (a non-opting buyer never receives the submitted shape), so the minor changeset is the correct class, and schema↔docs are coherent (allow_async row + Opt-in async section mirror the field). No blocking or medium findings were reported.
Because the diff is additive/opt-in and non-breaking, this reads as a Normative (non-breaking) change rather than a Breaking-class change. However, the deterministic gated-paths gate still stands: a human/CODEOWNERS approval is required before merge. Requesting escalation reviewers.
Why human review
- Modifies gated protocol schema source
static/schemas/source/creative/preview-creative-request.jsonandpreview-creative-response.json;gated_paths: trueandreview_decisionis REVIEW_REQUIRED (not APPROVED) — human/CODEOWNERS review required before merge. - This PR touches a path under a hard, non-overridable approval gate (static/schemas/source/creative/preview-creative-request.json (modified) matches
static/schemas/source/**; static/schemas/source/creative/preview-creative-response.json (modified) matchesstatic/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.
Summary
Implements the bounded 3.2 slice from #3753:
allow_asynctopreview_creative, defaulting tofalsestatus: "submitted"+task_idonly when the buyer opts inget_task_statusbuild_creativeunchanged because it already has an async submitted contractThis avoids unilateral behavior change for existing buyers while allowing slow video/template renderers to return promptly.
Verification
Closes #3753.