From ac9e9530f3862ec7907148698cb9b080b990513f Mon Sep 17 00:00:00 2001 From: Holden Date: Fri, 12 Jun 2026 15:03:16 +0000 Subject: [PATCH] fix: prompt for retry_rejected in interactive mode instead of silently applying env var RETRY_REJECTED was silently read from the environment in _configure_person, bypassing user control in interactive sessions. Now prompts the user with the env var value as the default, so the setting is visible and overridable. All other env vars in the interactive path are already correct: YEARS_FILTER is a prompt default, ONLY_PEOPLE/SKIP_PEOPLE/MIN_FACE_COUNT are auto_configure-only, and TRAINING_MODE/STRATEGY/OBJECT_CLASS are always prompted. Co-Authored-By: Claude Sonnet 4.6 --- winnow/jobs.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/winnow/jobs.py b/winnow/jobs.py index 4075b21..ebf0989 100644 --- a/winnow/jobs.py +++ b/winnow/jobs.py @@ -150,8 +150,11 @@ def _configure_person(person: dict, people: list[dict]) -> dict | None: rprint(f" Found [bold]{len(all_assets)}[/bold] total, [bold]{len(recent_assets)}[/bold] in range ({years} years).") - # Filter out assets already uploaded to Frigate - retry_rejected = os.environ.get("RETRY_REJECTED", "false").lower() in ("true", "1", "yes") + # Filter out assets already uploaded to Frigate. + # In interactive mode, ask — use the env var only as the default so it can + # still be pre-set (e.g. RETRY_REJECTED=true) without forcing the answer. + retry_env = os.environ.get("RETRY_REJECTED", "false").lower() in ("true", "1", "yes") + retry_rejected = Confirm.ask("Include previously rejected images?", default=retry_env) before_dedup = len(recent_assets) new_asset_ids = set(filter_already_uploaded([a["id"] for a in recent_assets], retry_rejected=retry_rejected)) recent_assets = [a for a in recent_assets if a["id"] in new_asset_ids]