Skip to content

fix(docs): replace phantom creative and governance error codes with canonical enum members#5819

Open
aleksUIX wants to merge 1 commit into
adcontextprotocol:mainfrom
aleksUIX:fix/creative-governance-phantom-error-codes
Open

fix(docs): replace phantom creative and governance error codes with canonical enum members#5819
aleksUIX wants to merge 1 commit into
adcontextprotocol:mainfrom
aleksUIX:fix/creative-governance-phantom-error-codes

Conversation

@aleksUIX

@aleksUIX aleksUIX commented Jul 6, 2026

Copy link
Copy Markdown

Summary

sync_creatives, build_creative, the Creative Protocol specification, check_governance, and sync_plans document 13 errors[].code values that do not exist in static/schemas/source/enums/error-code.json. SDKs that validate errors[].code against the published enum reject responses built from the docs literally, and sellers reading the spec either ship a non-conformant code or invent their own. Same failure mode as #4852 (fixed in #4860) and the sync_catalogs reconciliation in #5307.

Change

Each phantom is remapped to the existing canonical code whose semantics match, following the #4860 precedent of preferring existing enum members over minting new values:

Doc Phantom Canonical replacement
sync_creatives.mdx INVALID_FORMAT UNSUPPORTED_FEATURE (same mapping #4860 chose for the identical case on create_media_buy)
sync_creatives.mdx ASSET_PROCESSING_FAILED, FORMAT_MISMATCH VALIDATION_ERROR (rows merged; error.field identifies the asset path)
sync_creatives.mdx BRAND_SAFETY_VIOLATION CREATIVE_REJECTED
sync_creatives.mdx CREATIVE_IN_ACTIVE_DELIVERY INVALID_STATE
specification.mdx ASSET_MISSING, ASSET_INVALID folded into the VALIDATION_ERROR bullet
specification.mdx GENERATION_FAILED replaced with guidance: generation-pipeline failures surface as task-level failure with the most specific applicable code, per the open-vocabulary rule on error-code.json
build_creative.mdx INVALID_MANIFEST VALIDATION_ERROR
check_governance.mdx AMBIGUOUS_CHECK_TYPE INVALID_REQUEST
check_governance.mdx SELLER_NOT_RECOGNIZED PERMISSION_DENIED
sync_plans.mdx INVALID_PLAN INVALID_REQUEST
sync_plans.mdx BUDGET_BELOW_COMMITTED VALIDATION_ERROR

Also fixes the one live emission: the training-agent reference implementation returned INVALID_FORMAT from its preview handler (server/src/training-agent/task-handlers.ts), now UNSUPPORTED_FEATURE.

If the working group would rather mint dedicated codes for any of these (the governance pair in particular), happy to rework against the enum-membership criterion in docs/spec-guidelines.md; this PR takes the conservative docs-only path so no wire change is involved.

Files

  • docs/creative/task-reference/sync_creatives.mdx, docs/creative/specification.mdx, docs/creative/task-reference/build_creative.mdx
  • docs/governance/campaign/tasks/check_governance.mdx, docs/governance/campaign/tasks/sync_plans.mdx
  • server/src/training-agent/task-handlers.ts
  • .changeset/fix-creative-governance-phantom-error-codes.md (patch)

Verification

  • scripts/lint-error-codes.cjs clean; scripts/lint-error-code-drift.cjs clean (no enum change)
  • scripts/check-changeset-protocol-scope.cjs origin/main passes
  • Docs example validation tests pass locally; the only local failures (canonical-reference-resolver.test.cjs and 3 unit tests) reproduce identically on clean main, so they are environment issues unrelated to this change

…anonical enum members

sync_creatives, build_creative, the creative specification, check_governance,
and sync_plans documented 13 errors[].code values that do not exist in
enums/error-code.json. Remap each to the existing code with matching
semantics (UNSUPPORTED_FEATURE, VALIDATION_ERROR, CREATIVE_REJECTED,
INVALID_STATE, INVALID_REQUEST, PERMISSION_DENIED); replace GENERATION_FAILED
with task-failure guidance per the open-vocabulary rule. Also fix the one
live INVALID_FORMAT emission in the training-agent reference implementation.
Same failure mode as adcontextprotocol#4852 / adcontextprotocol#5307.
@aao-ipr-bot

aao-ipr-bot Bot commented Jul 6, 2026

Copy link
Copy Markdown

IPR Policy Agreement Required

@aleksUIX — thanks for the contribution. Before this PR can be merged, the AgenticAdvertising.Org IPR Policy requires your agreement.

To agree, post a new comment on this PR with the exact phrase:

I have read the IPR Policy

Your signature is recorded once and covers all contributions to AAO repositories. See signatures/README.md for what gets recorded and why.

@aao-release-bot aao-release-bot 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.

Argus is not auto-reviewing this PR because it modifies protected paths that require human review (.changeset/fix-creative-governance-phantom-error-codes.md). A human reviewer should review and merge this PR; Argus will resume on subsequent PRs once these changes land on main.

@aleksUIX

aleksUIX commented Jul 6, 2026

Copy link
Copy Markdown
Author

I have read the IPR Policy

@aao-ipr-bot

aao-ipr-bot Bot commented Jul 6, 2026

Copy link
Copy Markdown

IPR Policy — signed

Thanks, @aleksUIX. Your agreement to the IPR Policy is recorded at signatures/ipr-signatures.json and applies to all AAO repositories.

aao-ipr-bot Bot pushed a commit that referenced this pull request Jul 6, 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.

1 participant