Skip to content

knowledge: build-yt-dlp-args tests omit env, so real cookie env vars inject argv and break assertions #3447

Description

@kyle-sexton

Context

Found by the repo-wide /code-tidying:batch-simplify sweep (62 groups / 986 files, branch claude/repo-code-tidying-batch-twhddw). The sweep's doctrine files latent defects instead of fixing them mid-sweep, because the fix changes observable behavior; this issue is that filing.

plugins/knowledge/skills/video-digest/extraction/acquisition/build-yt-dlp-args.test.js (six cases: 21-26,51-55,63-67,72-76,86-90,98-102) omit env, so resolveYtDlpAuthArgs falls through to the real process.env; a runner with VIDEO_DIGEST_YT_DLP_COOKIES_FILE (or legacy YOUTUBE_ spellings) set injects extra argv, breaking the positional assertions at 46-47/117-118 and weakening the not.toContain negatives at 58-59. adapter-argv-conformance.test.js:25-27 documents exactly this hazard and passes env={}.

Proposed work

  • Pass env: {} in the six cases, matching the conformance suite.

Acceptance criteria

  • The suite passes with VIDEO_DIGEST_YT_DLP_COOKIES_FILE exported.

References

  • plugins/knowledge/skills/video-digest/extraction/acquisition/build-yt-dlp-args.test.js:21-26

Filed by the /code-tidying:batch-simplify closeout (Phase 8).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions