Skip to content

fix(env): register DEGRADED_TRANSCRIPT_THRESHOLD so .env value is picked up#807

Merged
mvanhorn merged 1 commit into
mvanhorn:mainfrom
23241a6749:feat/degraded-transcript-threshold-register
Jul 15, 2026
Merged

fix(env): register DEGRADED_TRANSCRIPT_THRESHOLD so .env value is picked up#807
mvanhorn merged 1 commit into
mvanhorn:mainfrom
23241a6749:feat/degraded-transcript-threshold-register

Conversation

@23241a6749

Copy link
Copy Markdown
Contributor

Problem

DEGRADED_TRANSCRIPT_THRESHOLD is used via config.get("DEGRADED_TRANSCRIPT_THRESHOLD") in quality_nudge.py:205 but is never registered in env.py's keys tuple. Users who set this in their .env file find it silently ignored — config.get(...) always returns None, falling through to the hardcoded DEFAULT_DEGRADED_TRANSCRIPT_THRESHOLD (0.5) regardless of what the user configured.

This is the same pattern as the previously fixed FUN_LEVEL (PR #708) and LAST30DAYS_REPORT_CACHE_TTL_SECONDS (PR #732) — a user-facing env var referenced by config.get() but absent from the keys list.

Change

env.py: Added ('DEGRADED_TRANSCRIPT_THRESHOLD', None) to the get_config() keys tuple next to the other YouTube/transcript-related keys.

No KEYCHAIN_KEYS or setup-script change needed — it is not a credential.

Verification

  • 40 env/keychain/pass/doc-contract tests pass
  • 53 quality_nudge tests pass
  • Env doc contract test confirms all documented keys remain registered

…ked up

DEGRADED_TRANSCRIPT_THRESHOLD was missing from env.py's keys tuple,
so config.get('DEGRADED_TRANSCRIPT_THRESHOLD') in quality_nudge.py:205
always returned None, silently falling through to the hardcoded
DEFAULT_DEGRADED_TRANSCRIPT_THRESHOLD (0.5) regardless of the user's
.env setting.

Closes mvanhorn#806
@greptile-apps

greptile-apps Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR makes the degraded transcript threshold configurable through the existing environment loader. The main change is:

  • Registers DEGRADED_TRANSCRIPT_THRESHOLD in skills/last30days/scripts/lib/env.py.
  • Preserves the existing unset default path by using None as the registered default.

Confidence Score: 5/5

This looks safe to merge.

  • No blocking issues found in the changed code.

Important Files Changed

Filename Overview
skills/last30days/scripts/lib/env.py Adds DEGRADED_TRANSCRIPT_THRESHOLD to the config key list so .env and process environment values can reach the existing quality nudge threshold lookup.

Reviews (1): Last reviewed commit: "fix(env): register DEGRADED_TRANSCRIPT_T..." | Re-trigger Greptile

@mvanhorn mvanhorn merged commit 1d927db into mvanhorn:main Jul 15, 2026
9 checks passed
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