Skip to content

[bounty #68] Add YouTube core live integration#616

Open
jianmosier wants to merge 1 commit into
Spectral-Finance:mainfrom
jianmosier:codex/youtube-core-live-68
Open

[bounty #68] Add YouTube core live integration#616
jianmosier wants to merge 1 commit into
Spectral-Finance:mainfrom
jianmosier:codex/youtube-core-live-68

Conversation

@jianmosier
Copy link
Copy Markdown

@jianmosier jianmosier commented May 17, 2026

Addresses #68.

Summary

  • Add a YouTube integration module and client for Data API, upload, and OAuth token endpoints.
  • Add OAuth exchange/refresh prisms, resumable upload startup, channel lookup, live broadcast/stream/chat lenses, stream health inspection, and live broadcast transition/bind/chat prisms.
  • Add a Livebook guide plus focused unit coverage for the new YouTube modules.

Validation

  • mix format --check-formatted on the touched Elixir files
  • MIX_ENV=prod mix compile
  • mix test --no-deps-check test/unit/lux/integrations/youtube/client_test.exs test/unit/lux/lenses/youtube/channels/list_channels_test.exs test/unit/lux/lenses/youtube/live/list_broadcasts_test.exs test/unit/lux/lenses/youtube/live/list_chat_messages_test.exs test/unit/lux/lenses/youtube/live/stream_health_test.exs test/unit/lux/prisms/youtube/live/live_prisms_test.exs test/unit/lux/prisms/youtube/oauth/oauth_prisms_test.exs test/unit/lux/prisms/youtube/videos/start_resumable_upload_test.exs --include unit -> 18 tests, 0 failures
  • git diff --check

Note: full plain mix test is blocked on this local machine by the locked credo 1.7.11 dev/test dependency failing to compile under locally installed Elixir 1.19/OTP 28. The project pins Elixir 1.18/OTP 27 in .tool-versions; the targeted YouTube tests above were run after compiling the required runtime/test dependencies without Credo.

Disclosure

This PR was prepared with AI assistance and manually reviewed/validated before submission.

/claim #68

@jianmosier jianmosier marked this pull request as ready for review May 17, 2026 16:45
@jianmosier jianmosier force-pushed the codex/youtube-core-live-68 branch from 1c09d3c to 2b1ccfd Compare May 17, 2026 16:48
@MyTH-zyxeon
Copy link
Copy Markdown

I noticed one integration blocker that is worth tightening before this is treated as a complete #68 workflow.

The OAuth prisms return an access_token, but the downstream YouTube action prisms look for params[:token] while their input schemas do not declare either token or access_token. In a schema-driven Lux invocation, ExchangeCode / RefreshToken cannot be composed directly into CreateBroadcast, CreateStream, SendChatMessage, StartResumableUpload, etc.; those actions will fall back to Lux.Config.youtube_access_token() instead of the freshly authorized channel token.

That makes the per-channel OAuth flow and multi-channel live/chat operations fragile: a user can successfully exchange a code, but the follow-up live broadcast/chat calls may run against a static configured token or fail if no global token is present.

Suggested fix:

  • Add an optional access_token input to the YouTube action prism schemas.
  • Thread params[:access_token] || params[:token] into the client request.
  • Let Client accept both :access_token and :token for consistency with the OAuth prism output.
  • Add one test that chains ExchangeCode output into a live/chat action and asserts the request uses the exchanged token in the Authorization header.

That would make the OAuth acceptance path much stronger for the bounty because the token exchange and the live-streaming operations become an actual composable workflow instead of separate pieces.

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.

2 participants