env: register DEGRADED_TRANSCRIPT_THRESHOLD so .env value is picked up#737
Open
23241a6749 wants to merge 2 commits into
Open
env: register DEGRADED_TRANSCRIPT_THRESHOLD so .env value is picked up#73723241a6749 wants to merge 2 commits into
23241a6749 wants to merge 2 commits into
Conversation
Contributor
| ('EXCLUDE_SOURCES', ''), | ||
| ('LAST30DAYS_DEFAULT_SEARCH', ''), | ||
| ('LAST30DAYS_YOUTUBE_SSH_HOST', None), | ||
| ('DEGRADED_TRANSCRIPT_THRESHOLD', None), |
Contributor
There was a problem hiding this comment.
AGENTS.md says CONFIGURATION.md must be kept in sync with user-facing knobs. DEGRADED_TRANSCRIPT_THRESHOLD is explicitly called out in quality_nudge.py as operator-tunable ("Tunable via DEGRADED_TRANSCRIPT_THRESHOLD env var if operators need to adjust without code changes"), so it qualifies. Now that the key is actually loaded from .env, users who discover it in quality_nudge.py comments won't find any documentation in CONFIGURATION.md describing the expected range, units (ratio 0–1), or effect.
Context Used: AGENTS.md (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Users who set DEGRADED_TRANSCRIPT_THRESHOLD in .env found it silently ignored — the key was missing from the env.py keys tuple, so config.get() always returned None even when the .env file had a value. This caused _is_youtube_degraded() to always use the default 0.5 threshold regardless of the user's .env setting.
23241a6749
force-pushed
the
fix/degraded-transcript-threshold-env-registration
branch
from
July 3, 2026 13:27
73d097f to
4e16ee7
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.
Problem
DEGRADED_TRANSCRIPT_THRESHOLDwas missing from the env.py keys tuple. Users who set this value in their.envfile found it silently ignored:_is_youtube_degraded()inquality_nudge.py:199reads viaconfig.get('DEGRADED_TRANSCRIPT_THRESHOLD')config.get()always returnedNonebecause the key was never loaded from.envinto the config dict.envsettingThis is the same bug pattern as FUN_LEVEL (#707), GITHUB_TOKEN (#724), and LAST30DAYS_REPORT_CACHE_TTL_SECONDS (#732).
Fix
Register
('DEGRADED_TRANSCRIPT_THRESHOLD', None)in the env.py keys tuple (one line). Same pattern as every other env var in the list.Impact
Users who explicitly configure
DEGRADED_TRANSCRIPT_THRESHOLDin.envwill now have it picked up correctly. No behavior change for users relying on the default.