youtube videos list: add opt-in --parts all without changing defaults#871
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 27, 2026, 1:07 PM ET / 17:07 UTC. Summary Reproducibility: not applicable. this is a feature/default-change PR rather than a bug report. Source inspection confirms current main uses the three-part request and the PR changes omitted-flag behavior. Review metrics: 2 noteworthy metrics.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Preserve the existing three-part default unless maintainers intentionally approve broad-by-default; land a documented opt-in selector with redacted live YouTube proof. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a feature/default-change PR rather than a bug report. Source inspection confirms current main uses the three-part request and the PR changes omitted-flag behavior. Is this the best way to solve the issue? No: the implementation is focused, but broad-by-default changes existing output and quota behavior without maintainer approval. The safer path is preserving the old default or getting an explicit maintainer decision plus docs and live proof. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 213ddb60d7d1. Label changesLabel justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
Extend 'yt videos list' so it fetches every videos.list part readable for arbitrary (non-owned) videos — snippet, contentDetails, statistics, status, topicDetails, recordingDetails, liveStreamingDetails, player, localizations — instead of only the previous 3 (snippet,contentDetails,statistics). A new --parts flag narrows the set when desired; the default is the full non-owner list. Owner-only parts (fileDetails/processingDetails/suggestions) are deliberately excluded — the API returns them only for the account's own uploads. The Google SDK omits parts with no data for a given video (e.g. liveStreamingDetails on a non-live video), so the broad request tolerates per-video partial responses without erroring. Tests assert the full part set is requested by default, --parts overrides it, non-core part fields (status.privacyStatus, topicDetails, all thumbnail sizes, liveStreamingDetails) survive in --json output, and a video missing optional parts still serializes cleanly.
d55f184 to
ee1a3e9
Compare
|
Land-ready proof for exact head
Residual risk: low-to-medium. This adds a read-only opt-in response expansion; |
What
gog youtube videos listnow supports explicit control over the YouTubevideos.listparts:--partspreserves the historicalsnippet,contentDetails,statisticsrequest and output shape;--parts allrequests every part documented as readable for arbitraryvideos;
owner-only parts for authenticated requests against the caller's own uploads;
allcannot be mixed with explicit part names.Why
Metadata archiving and analysis sometimes need the full provider response, but
changing the default would broaden existing script output. The opt-in selector
adds the capability without a compatibility break.
The
allset follows the currentofficial
videos.listcontract:contentDetails,id,liveStreamingDetails,localizations,paidProductPlacementDetails,player,recordingDetails,snippet,statistics,status,topicDetails.It excludes the owner-only
fileDetails,processingDetails, andsuggestionsparts. The API documents a fixed one-unit quota cost for the method.
Proof
Exact candidate:
ee1a3e92400167f17fab748c3670b2c9824e61cb.go test ./internal/cmd -run 'TestYouTubeVideosList' -count=1make cinon-owned video: default,
all, and explicitstatusrequests all exited 0;allreturned the eleven expected metadata groups; a repeat returned the samekey set; mixed
all,statusexited 2 before provider lookup.and invalid-video anti-cheat probes.
autoreview --mode branch --base origin/main: no accepted/actionable findings.Contributor credit
Original implementation by @coeur-de-loup; maintainer repair preserves the
contributor commit and adds the compatibility-safe default, current API part
set, docs, generated command reference, and changelog thanks.