Skip to content

Hoist remaining inline-enum duplicates (follow-up to #3144) #3166

Description

@bokelley

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:

  1. Verify each candidate's value sets are byte-identical across consumers (confirm with rg over static/schemas/source/).
  2. Add a new enums/<name>.json per shared set; pick names distinct from existing ones.
  3. Update each call site to \$ref the new file.
  4. minor bump, source-only (no dist/ edits per the immutability convention reaffirmed in fix(schema): correct title annotation in rate-limited error-details schema #3149 review).
  5. Follow-on: the SDK ships deprecated re-export aliases for any per-parent Values names 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.json payment_terms is a different set than account.json).
  • \$defs hoisting 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

🤖 Filed by Claude Code

Metadata

Metadata

Assignees

No one assigned

    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

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions