Repository navigation
Closed
Labels
claude-triagedIssue has been triaged by the Claude Code triage routine. Remove to re-triage.enhancementNew feature or requestschemaJSON Schema source-of-truth: definitions, codegen artifacts, validation, hygiene
Description
Context
#3144 / #3148 hoisted 4 of the most-duplicated inline string-literal unions into enums/ files (payment-terms, audio-channel-layout, media-buy-valid-action, rights-billing-period). Independent SDK-side review of #3148 spotted ~25 more inline-enum duplicates in static/schemas/source/ that follow the same byte-identical pattern across multiple parents and would benefit from the same treatment.
This is the tracker for the next tranche.
Candidates
Per the protocol-expert scan of source schemas:
match_type—["broad", "exact", "phrase"]— appears in ~5 files (10 sites)- billing party —
["advertiser", "agent", "operator"]— ~4 files kind—["event_series", "publication", "rotation", "series"]— ~3 files- travel-unit —
["hr", "min"] - geometry —
["MultiPolygon", "Polygon"] - video constants:
frame_rate_type,scan_type,gop_type,moov_atom_position - feature-status —
["failed", "passed", "unevaluated", "warning"] - sync-action —
["created", "deleted", "failed", "unchanged", "updated"] account_scope- snapshot-unavailable-reason
verdict—["fail", "pass"]- approval
status—["approved", "conditions", "denied"] - account-status
Several of these surface as per-parent Foo_BarValues exports in adcp-client's inline-enums.generated.ts (mirrors the concrete duplicates that motivated #3144).
Approach
Same as #3148:
- Verify each candidate's value sets are byte-identical across consumers (confirm with
rgoverstatic/schemas/source/). - Add a new
enums/<name>.jsonper shared set; pick names distinct from existing ones. - Update each call site to
\$refthe new file. minorbump, source-only (nodist/edits per the immutability convention reaffirmed in fix(schema): correct title annotation in rate-limited error-details schema #3149 review).- Follow-on: the SDK ships deprecated re-export aliases for any per-parent
Valuesnames that landed in a published release.
Out of scope for this issue
- Subset enums (e.g.,
audio-asset-requirements.json["mono","stereo"]is a constraint, not the layout type). - Distinct enum sets that look duplicated but aren't (e.g.,
insertion-order.jsonpayment_termsis a different set thanaccount.json). \$defshoisting for re-referenced complex object types (BriefAsset1,VASTAsset1, etc.) — see Rename SCREAMING_SNAKE schema artifacts that surface as public TypeScript types #3145 for that thread.
Refs
- Closed by feat(schema): hoist 4 duplicate inline enum sets into shared enums/ definitions #3148: 4 enums hoisted (
payment-terms,audio-channel-layout,media-buy-valid-action,rights-billing-period) - SDK consumer: adcp-client#941 (now closed by Hoist duplicate inline-union literal sets into shared definitions #3144); follow-up adcp-client#942 / Rename SCREAMING_SNAKE schema artifacts that surface as public TypeScript types #3145 covers the SCREAMING_SNAKE + numbered-dupe codegen artifacts
🤖 Filed by Claude Code
Metadata
Metadata
Assignees
Labels
claude-triagedIssue has been triaged by the Claude Code triage routine. Remove to re-triage.enhancementNew feature or requestschemaJSON Schema source-of-truth: definitions, codegen artifacts, validation, hygiene
Activity
bokelley commentedon Apr 25, 2026
Triage
Classification: Feature request (schema hygiene)
Bucket(s): spec / protocol
Status: drafting-pr
Milestone: 3.1.0
What the experts said:
$refsubstitution is semantically equivalent under draft-07. Three fixes applied before PR:match-type.jsonuses call-site order["broad","phrase","exact"](not alphabetical);approval-status.jsonrenamedgovernance-decision.jsonto avoid collision withcreative-approval-status.jsonand carriesx-status: experimental;verdict.jsonuses["pass","fail"]per call sites.Foo_BarValuesexports) is acceptable; SDK cleanup deferred to adcp-client#942 as proposed.$commentadded tosync-accounts-response.jsonaction field explaining why the 4-value subset stays inline.My take: All 16 candidate enum sets verified byte-identical across call sites. 15 new enum files created, 24 schemas updated (46 replacements). Draft PR #3174 targets
main,minorchangeset.Draft PR: #3174 —
feat(schema): hoist 16 duplicate inline enum sets into shared enums/ filesTriaged by Claude Code. Session: https://claude.ai/code/session_01W7bQfLgAFaDVKEUxkf4E7R
Generated by Claude Code
feat(schema): hoist 13 duplicate inline enum sets into shared enums/ …
bokelley commentedon Apr 25, 2026
Triage
Outcome: Execute PR — Non-breaking schema refactor with clear precedent (#3148). Expert panel converged.
Analysis
Verified all 13 candidate enum sets are byte-identical across their call sites. All pass the hoisting bar: same values, same order, same wire semantics in every consumer. Created 13 new
$id-bearing enum files instatic/schemas/source/enums/and updated 21 consumer schemas to$refthem.Deliberately excluded (with rationale):
geometry ["Polygon","MultiPolygon"]— GeoJSON RFC 7946 subset; hoisting would imply AdCP owns this discriminator. Left inline.sync-action— Diverging value sets across consumers (accounts: 4, audiences: 5, creatives: 2). Cannot unify safely.account-status— Already hoisted;enums/account-status.jsonalready exists.Non-breaking: Replacing
{type,enum}with$refto an identical enum set resolves to the same JSON Schema constraint graph. All validators produce identical results. No wire values added, removed, or reordered.Bump:
minor— new$id-bearing addressable schema resources (consistent with #3148).Expert sign-offs
minorbump correctFollow-up noted
get-media-buy-artifacts-response.jsonhas an unhoisted 3-value["pass","fail","unevaluated"]inline enum forlocal_verdict— distinct from bothbinary-verdictandfeature-check-status. Should be a follow-up issue.PR
Draft PR: #3174
Generated by Claude Code
fix(agents): webhook-miss sweep grace period (no double-fire) (#3178)
feat(schema): hoist 13 duplicate inline enum sets into shared enums/ …