Skip to content

Release 0.78.3 - #3881

Closed
odlbot wants to merge 5 commits into
releasefrom
release-candidate
Closed

odlbot wants to merge 5 commits into
releasefrom
release-candidate

Conversation

@odlbot

@odlbot odlbot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Tobias Macey

Shankar Ambady

renovate[bot]

renovate Bot and others added 5 commits September 1, 2026 13:28
* Update dependency youtube-transcript-api to >=1.2.4,<1.3

* Migrate to youtube-transcript-api instance API

v1.2.0 removed the static list_transcripts/get_transcript methods that were
deprecated in v1.0.0; the instance method list() is the replacement.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018S52vCvVmYyY7Q3ji519Nn

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Tobias Macey <tmacey@mit.edu>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
* hedge requests

* tests

* switch default hedging delay to 0

* change default delay

* change default delay

* Isolate and bound hedged embedding request capacity

Address review feedback that abandoned losing requests could occupy the
shared pool and make later primary requests queue behind them.

- split the primary and speculative requests into separate thread pools
- bound each pool with a semaphore so submissions are rejected rather than
  queued: a full primary pool runs the request inline, a full hedge pool
  skips the backups
- give every hedged provider call an explicit timeout so losers release
  their worker
- cover pool saturation, inline fallback, and concurrent saturation in tests

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* fix ssl_cert_reqs

* Address PR feedback on embedding request hedging

- fail loudly with RuntimeError instead of returning None when every
  hedged request is abandoned
- drop the duplicated hedge_count/hedge_delay defaults, embed_query
  always passes them explicitly
- log when backups are fired and whether the primary or a backup won,
  so the hedge delay can be tuned from prod
- cover EMBEDDING_HEDGE_COUNT=1 (short circuits to unhedged) and =3

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
page-components/TiptapEditor embeds both VideoResourcePlayer and
PodcastEmbedPlayer, but both lived in app-pages, which the
import/no-restricted-paths zone in frontends/.eslintrc.js forbids
page-components from importing. eslint-plugin-import 2.29 missed it;
2.31 (in #3851) reports all four.

Moving only the two player entry points would have relocated the
violation rather than fixed it, since each pulls in siblings, so each
cluster moved with the modules it needs:

  page-components/VideoPlayer/        VideoResourcePlayer, VideoJsPlayer,
                                      YouTubeIframePlayer, videoSources
  page-components/PodcastEmbedPlayer/ PodcastEmbedPlayer, useAudioPlayer,
                                      usePlaybackRecovery, AudioPlayer.styled

Only what the players need moved. The old shared.styled.ts keeps its
seven page-chrome exports and gives up NoVideoMessage and
ScreenReaderOnly; PodcastPlayer stays on the podcast page and now imports
the hooks from page-components, which is an allowed direction.

getEpisodeAudioUrl went to common/podcasts.ts instead of either player
folder: the listing page and the embed player both need it, and common/
is already where this kind of pure helper lives. helpers.ts re-exports it
so its existing importers and tests are untouched.


Claude-Session: https://claude.ai/code/session_01FyJ72HRTyQf6jVYmw3GZSt

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
@odlbot
odlbot requested a review from a team as a code owner September 1, 2026 18:30
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

OpenAPI Changes

No changes detected

View full changelog

Unexpected changes? Ensure your branch is up-to-date with main (consider rebasing).

Comment on lines 336 to 342

"""
try:
transcript_list = YouTubeTranscriptApi.list_transcripts(
video_resource.readable_id
)
transcript_list = YouTubeTranscriptApi().list(video_resource.readable_id)
transcript = transcript_list.find_manually_created_transcript(["en"])
if not transcript:
transcript = transcript_list.find_generated_transcript(["en"])

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The fallback logic to fetch auto-generated YouTube captions is unreachable because an exception is caught prematurely, preventing the fallback from running.
Severity: HIGH

Suggested Fix

Restructure the exception handling. Use a nested try...except NoTranscriptFound block around the call to find_manually_created_transcript. In the except block, call find_generated_transcript. This ensures that if a manual transcript is not found, the code correctly falls back to searching for a generated one instead of exiting the function.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: learning_resources/etl/youtube.py#L336-L342

Potential issue: In the `get_captions_for_video` function, the code incorrectly assumes
that `find_manually_created_transcript()` will return `None` if no transcript is found.
Instead, the `youtube-transcript-api` library raises a `NoTranscriptFound` exception.
This exception is caught by an outer `except` block, causing the function to exit
prematurely and return `None`. Consequently, the fallback logic to search for an
auto-generated transcript using `find_generated_transcript()` is never executed. This
results in a data loss issue where available auto-generated captions are silently
ignored for videos that do not have manually created ones.

Did we get this right? 👍 / 👎 to inform future reviews.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants