Skip to content

Standardize clip type naming: rename medium-clipmedium everywhere#83

Open
Copilot wants to merge 6 commits into
mainfrom
copilot/standardize-clip-type-naming
Open

Standardize clip type naming: rename medium-clipmedium everywhere#83
Copilot wants to merge 6 commits into
mainfrom
copilot/standardize-clip-type-naming

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 23, 2026

medium-clip was the canonical ClipType value in code/types, but Late API queues were named linkedin-medium (not linkedin-medium-clip), causing getQueueId() to silently miss queue lookups and fall back to local scheduling.

Core renames

  • ClipType union: 'video' | 'short' | 'medium-clip''video' | 'short' | 'medium' in platformContentStrategy.ts, postStore.ts, types/index.ts, realign.ts, IdeaDiscoveryAgent.ts, ideaBodyFormatter.ts
  • CONTENT_MATRIX keys in platformContentStrategy.ts: all 'medium-clip' entries → 'medium'
  • schedule.json: all byClipType keys "medium-clip""medium" across all 5 platforms
  • queueBuilder.ts: assignment + getMediaRule() call updated
  • ScheduleAgent.ts: prompt descriptions updated

Backward compatibility (dual-read)

Existing persisted files with clipType: 'medium-clip' are normalized on read — no migration needed:

  • postStore.tsreadQueueItem()
  • ideaStore.tsreadIdea() + validation set accepts both values
  • migrateIdeasToGithub.tsassertClipType() normalizes before validation

Tests

All 16 affected test files updated to 'medium'. Two regression tests added to verify the dual-read normalization (postStore.test.ts, new ideaStore.test.ts).

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • getlate.dev
    • Triggering command: /usr/local/bin/node /usr/local/bin/node --conditions node --conditions development --experimental-import-meta-resolve --require /home/REDACTED/work/vidpipe/vidpipe/node_modules/vitest/suppress-warnings.cjs /home/REDACTED/work/vidpipe/vidpipe/node_modules/vitest/dist/workers/forks.js k/vidpipe/vidpipu+x ck.sh bash --no�� --noprofile -c odules/.bin/sh --noprofile cat p/bin/bash bash (dns block)
    • Triggering command: /usr/local/bin/node /usr/local/bin/node --conditions node --conditions development --experimental-import-meta-resolve --require /home/REDACTED/work/vidpipe/vidpipe/node_modules/vitest/suppress-warnings.cjs /home/REDACTED/work/vidpipe/vidpipe/node_modules/vitest/dist/workers/forks.js -c ash bash --no�� --noprofile -c ndor/bin/bash --noprofile -c pe preToolUse bash (dns block)
    • Triggering command: /usr/local/bin/node /usr/local/bin/node --conditions node --conditions development --experimental-import-meta-resolve --require /home/REDACTED/work/vidpipe/vidpipe/node_modules/vitest/suppress-warnings.cjs /home/REDACTED/work/vidpipe/vidpipe/node_modules/vitest/dist/workers/forks.js e/node_modules/v.github/hooks/pre-reexport-block.sh ndor/bin/bash (dns block)
  • https://api.github.com/repos/htekdev/content-management/issues
    • Triggering command: /usr/local/bin/node /usr/local/bin/node --conditions node --conditions development --experimental-import-meta-resolve --require /home/REDACTED/work/vidpipe/vidpipe/node_modules/vitest/suppress-warnings.cjs /home/REDACTED/work/vidpipe/vidpipe/node_modules/vitest/dist/workers/forks.js -c h .sh -r .toolName bash st-edit-invalidate.sh --noprofile -c .sh bash (http block)
    • Triggering command: /usr/local/bin/node /usr/local/bin/node --conditions node --conditions development --experimental-import-meta-resolve --require /home/REDACTED/work/vidpipe/vidpipe/node_modules/vitest/suppress-warnings.cjs /home/REDACTED/work/vidpipe/vidpipe/node_modules/vitest/dist/workers/forks.js -c h bash --no�� --noprofile -c h --noprofile -c .sh bash (http block)
    • Triggering command: /usr/local/bin/node /usr/local/bin/node --conditions node --conditions development --experimental-import-meta-resolve --require /home/REDACTED/work/vidpipe/vidpipe/node_modules/vitest/suppress-warnings.cjs /home/REDACTED/work/vidpipe/vidpipe/node_modules/vitest/dist/workers/forks.js -c --raw --event-ty--noprofile bash --no�� --noprofile -c ck.sh /home/REDACTED/wor/home/REDACTED/work/vidpipe/vidpipe/node_modules/@ffprobe-installer/linux-x64/ffpr--conditions .github/hooks/pr-v ck.sh bash (http block)
  • https://api.github.com/repos/htekdev/gh-hookflow/releases/latest
    • Triggering command: /usr/bin/gh gh extension install htekdev/gh-hookflow (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI requested review from Copilot and removed request for Copilot April 23, 2026 13:05
Agent-Logs-Url: https://github.com/htekdev/vidpipe/sessions/0cd701e8-1baa-46db-ab73-4f58eb179904

Co-authored-by: htekdev <100806365+htekdev@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot April 23, 2026 13:08
Agent-Logs-Url: https://github.com/htekdev/vidpipe/sessions/0cd701e8-1baa-46db-ab73-4f58eb179904

Co-authored-by: htekdev <100806365+htekdev@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot April 23, 2026 13:14
Agent-Logs-Url: https://github.com/htekdev/vidpipe/sessions/0cd701e8-1baa-46db-ab73-4f58eb179904

Co-authored-by: htekdev <100806365+htekdev@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot April 23, 2026 13:20
… everywhere

- Rename ClipType union member 'medium-clip' → 'medium' in:
  - src/L0-pure/types/index.ts (IdeaPublishRecord)
  - src/L3-services/postStore/postStore.ts (QueueItemMetadata, GroupedQueueItem)
  - src/L3-services/socialPosting/platformContentStrategy.ts (ClipType + CONTENT_MATRIX)
  - src/L3-services/scheduler/realign.ts (all type annotations)
  - src/L4-agents/IdeaDiscoveryAgent.ts (ClipInfo interface + value)
- Rename string values 'medium-clip' → 'medium' in:
  - src/L3-services/queueBuilder/queueBuilder.ts
  - src/L0-pure/ideaFormatting/ideaBodyFormatter.ts
  - src/L7-app/commands/migrateIdeasToGithub.ts
  - src/L4-agents/ScheduleAgent.ts (prompt descriptions)
- Update schedule.json: all byClipType 'medium-clip' keys → 'medium'
- Add dual-read backward compat in postStore and ideaStore to normalize
  old 'medium-clip' values from existing files to 'medium'
- Update all test files to use 'medium' instead of 'medium-clip'
- Add regression tests for the dual-read normalization

Agent-Logs-Url: https://github.com/htekdev/vidpipe/sessions/0cd701e8-1baa-46db-ab73-4f58eb179904

Co-authored-by: htekdev <100806365+htekdev@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot April 23, 2026 13:23
Copilot AI requested review from Copilot and removed request for Copilot April 23, 2026 13:28
Copilot AI changed the title [WIP] Standardize clip type naming for consistency Standardize clip type naming: rename medium-clipmedium everywhere Apr 23, 2026
Copilot AI requested a review from htekdev April 23, 2026 13:31
Copilot stopped work on behalf of htekdev due to an error April 23, 2026 13:31
@htekdev htekdev marked this pull request as ready for review May 15, 2026 14:22
Copilot AI review requested due to automatic review settings May 15, 2026 14:22
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR standardizes the medium clip type from medium-clip to medium across scheduling, queueing, idea metadata, and tests so Late queue lookup keys align with configured queue names.

Changes:

  • Renames ClipType/metadata values and schedule keys from medium-clip to medium.
  • Adds backward-compatible read normalization for some local persisted idea/queue metadata.
  • Adds/removes Copilot hook/review artifacts alongside the rename.
Show a summary per file
File Description
src/L7-app/commands/migrateIdeasToGithub.ts Normalizes legacy clip type during idea migration.
src/L4-agents/ScheduleAgent.ts Updates schedule agent prompt/tool descriptions.
src/L4-agents/IdeaDiscoveryAgent.ts Emits medium for medium clip discovery info.
src/L3-services/socialPosting/platformContentStrategy.ts Updates clip type union and media matrix keys.
src/L3-services/scheduler/realign.ts Updates realign clip type typings.
src/L3-services/queueMapping/queueMapping.ts Updates queue naming documentation.
src/L3-services/queueBuilder/queueBuilder.ts Uses medium when resolving/building medium queue items.
src/L3-services/postStore/postStore.ts Updates queue metadata type and normalizes legacy reads.
src/L1-infra/ideaStore/ideaStore.ts Accepts and normalizes legacy idea publish records.
src/L0-pure/types/index.ts Updates canonical IdeaPublishRecord.clipType.
src/L0-pure/ideaFormatting/ideaBodyFormatter.ts Updates idea publish comment formatting/parser constants.
src/__tests__/unit/L7-app/approvalQueue*.test.ts Updates approval queue test types/expectations.
src/__tests__/unit/L5-assets/MainVideoAsset.test.ts Updates medium clip fixture slug.
src/__tests__/unit/L3-services/**/*.test.ts Updates scheduler, post store, and strategy tests.
src/__tests__/unit/L1-infra/ideaStore.test.ts Adds idea store legacy normalization tests.
src/__tests__/unit/L0-pure/ideaBodyFormatter.test.ts Updates formatter test fixture.
src/__tests__/integration/** Updates integration tests to use medium.
src/__tests__/e2e/** Updates e2e clip type expectations.
schedule.json Renames schedule byClipType keys to medium.
.github/reviewed.md Removes stale generated review artifact.
.github/hooks/*.sh Adds/updates Copilot hook scripts for git/layer enforcement and review invalidation.

Copilot's findings

  • Files reviewed: 31/39 changed files
  • Comments generated: 4

Comment thread schedule.json
"avoidDays": []
},
"medium-clip": {
"medium": {

const ideaStatuses = ['draft', 'ready', 'recorded', 'published'] as const
const clipTypes = ['video', 'short', 'medium-clip'] as const
const clipTypes = ['video', 'short', 'medium'] as const
*
* Queue names follow the convention: {platform}-{clipType}
* e.g. "youtube-shorts", "x-medium-clips", "instagram-shorts"
* e.g. "youtube-shorts", "x-medium", "instagram-shorts"
export interface IdeaPublishRecord {
/** Content type that was published */
clipType: 'video' | 'short' | 'medium-clip'
clipType: 'video' | 'short' | 'medium'
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.

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

3 participants