Skip to content

feat(playlist): orchestrate per-video extraction for playlists - #45

Merged
cmglezpdev merged 1 commit into
feat/playlist-support-03b-playlist-promptfrom
feat/playlist-support-04-orchestrator
Aug 20, 2026
Merged

cmglezpdev merged 1 commit into
feat/playlist-support-03b-playlist-promptfrom
feat/playlist-support-04-orchestrator

Conversation

@cmglezpdev

Copy link
Copy Markdown
Owner

What this changes

Adds runPlaylistExtraction: identifies the playlist, lists members, loops the unchanged runExtraction per member (nested notes folder, per-video resume/--force), records unavailable members without extracting, aggregates per-member failures, saves the playlist record, and writes the orchestrator prompt.md.

Why

The loop layer that turns the previous slices into an end-to-end pipeline. Infrastructure errors (YTDLP_NOT_FOUND, BOT_CHECK, RATE_LIMITED, PATH_ESCAPE, ROOT_OVERLAP, non-VetaError) abort the run; per-video errors mark that member failed and continue. It returns failedCount instead of throwing so the CLI (next PR) can print the prompt path to stdout before exiting non-zero.

How to verify

pnpm typecheck
pnpm vitest run src/pipeline --exclude '**/.claude/**'

Checklist

  • pnpm typecheck and pnpm test pass
  • Commits follow Conventional Commits

Scope

  • Includes: orchestrator + 7 integration tests (real fake yt-dlp), 4 playlist progress events, PLAYLIST_EMPTY/PLAYLIST_PARTIAL_FAILURE codes (+ mechanical exit-code map entries forced by exhaustiveness).
  • Excludes: CLI wiring/stdout contract (next PR), curation flags.

Chain Context

Field Value
Chain playlist-support
Tracker PR #40
Position 5 of 6
Base feat/playlist-support-03b-playlist-prompt
Depends on PR 4 (#44)
Follow-up PR 6 (CLI)
Review budget 569 / 400

Chain Overview

main
 └── #40 tracker: feat/playlist-support
      └── #41 listing → #42 store → #43 packageName → #44 prompt → 04 orchestrator → 05 CLI
          (this PR: 📍 5)

Add runPlaylistExtraction, which loops the unchanged single-video
pipeline over playlist members, nests each notes folder under the
playlist slug with an NN- position prefix, resumes per video, records
unavailable members without extracting them, and aggregates per-member
failures instead of aborting. Infrastructure errors still abort the
run. Adds playlist progress events and the PLAYLIST_EMPTY and
PLAYLIST_PARTIAL_FAILURE error codes.
@cmglezpdev
cmglezpdev force-pushed the feat/playlist-support-04-orchestrator branch from fc33016 to 97307e2 Compare August 20, 2026 00:23
@cmglezpdev
cmglezpdev merged commit 6f7ba69 into main Aug 20, 2026
3 checks passed
@cmglezpdev
cmglezpdev deleted the feat/playlist-support-04-orchestrator branch August 25, 2026 17:14
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