Skip to content

Tech debt: Standardize clip type naming — 'medium-clip' vs 'medium' inconsistency #72

@htekdev

Description

@htekdev

Problem

The codebase uses \medium-clip\ as the canonical clip type (in \clipType\ fields, schedule.json keys, pipeline types), but Late API queues are named with just \medium\ (e.g., \linkedin-medium, not \linkedin-medium-clip).

This mismatch caused a bug where \getQueueId()\ failed to find Late queues for medium clips — it looked up \linkedin-medium-clip\ but the queue was named \linkedin-medium. The approval flow silently fell back to local scheduling instead of using Late queues.

Temporary fix applied: Added normalization (\medium-clip\ → \medium) in two places:

  • \src/L3-services/queueMapping/queueMapping.ts\ — \getQueueId()\
  • \src/L3-services/queueSync/queueSync.ts\ — queue name construction

What needs to happen

Standardize on one name everywhere. Options:

  1. Use \medium\ everywhere — rename \medium-clip\ to \medium\ in types, schedule.json, pipeline, metadata, Azure tables
  2. Use \medium-clip\ everywhere — rename Late queues from \linkedin-medium\ to \linkedin-medium-clip\

Option 1 (\medium) is simpler and consistent with \short\ and \�ideo\ (neither have a suffix).

Affected areas

  • \src/L0-pure/types/index.ts\ — clip type definitions
  • \schedule.json\ — \�yClipType\ keys
  • \src/L3-services/queueMapping/queueMapping.ts\ — normalization hack
  • \src/L3-services/queueSync/queueSync.ts\ — normalization hack
  • \src/L3-services/queueBuilder/queueBuilder.ts\ — metadata.clipType
  • \src/L7-app/review/approvalQueue.ts\ — clipType references
  • Azure Storage Tables — existing Content records with \clipType: 'medium-clip'\
  • Any agent prompts that reference medium-clip

Risk

Low — mostly string renames, but Azure Table records with existing \medium-clip\ values would need migration or dual-read support.

Metadata

Metadata

Labels

bugSomething isn't workingenhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions