refactor(youtube): adopt kit/console/cli + conventions parity#6
Merged
Conversation
wire kit/bus + NetworkAdapter (source foo-youtube); peers env
FOO_YOUTUBE_BUS_PEERS, auth FOO_BUS_TOKEN/BUS_TOKEN; connect best-effort,
never fatal. publish capture.metadata.fetched + capture.transcript.fetched
after successful extraction, payload {url}. failed fetch publishes nothing.
ext-info contract + exit codes unchanged.
1c715da to
9384711
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrates the
foo-youtubesidecar from Go's stdlibflagtokit/console/cli, resolving the red-verdict findings from the CLI review.Changes
flagwith a cobra root viacli.New(Use: "foo-youtube [flags] <url>"). Fixes the stdlib usage-leak and weak-h; brings kit-styled help,--version,--help-all.<url>documented — positional now appears in--helpwith accepted URL forms.yt-dlp→ 5, fetch failures → 1, routed through kit's error model.--no-metadata/--no-transcriptfor the boolean defaults.foo-youtube.capture.transcript.fetched/foo-youtube.capture.metadata.fetchedafter successful extraction (respecting the metadata/transcript flags); failed fetches publish nothing.Contract preserved
--ext-infoemits the four-field discovery JSON, now including the previously-missingcapabilities: ["discover"], exit 0.Verification
go build ./...+go vet ./cmd/foo-youtube/...clean.--help(<url>shown), and exit codes (no-args → 2, missing-dep → 5) probed.