Skip to content

Stop running the update check twice for diffly setup - #16

Merged
VIVAAN-DHAWAN merged 1 commit into
fix/raw-fd-keystroke-readingfrom
fix/setup-double-update-check
Aug 23, 2026
Merged

VIVAAN-DHAWAN merged 1 commit into
fix/raw-fd-keystroke-readingfrom
fix/setup-double-update-check

Conversation

@VIVAAN-DHAWAN

Copy link
Copy Markdown
Owner

Why

diffly setup performs the PyPI update check twice. main() runs _check_and_prompt_update() for every command except update/version/help/doctor — and setup is not excluded, even though the walkthrough ends by launching the wizard (run_setup → run_wizard), which runs its own check at cli.py:762. With a release pending, the user gets the same "Download and install?" prompt two times back-to-back (declining the first does not suppress the second).

What users will see / Surface area

  • One-line change in src/diffly_cli/cli.py::main: setup joins the exclusion list; the wizard remains the single owner of the update check for that flow.
  • Every other command keeps exactly one check (pr, local, bare wizard).

Validation

  • New regression test test_setup_delegates_the_update_check_to_the_wizard: asserts zero checks fire for diffly setup (the wizard owns it) while diffly pr … still fires exactly one.
  • Full suite: pytest -q → 54 passed.
  • Duplicate check: no open PR/issue mentions update prompts or double checks.

@github-actions

Copy link
Copy Markdown

Diffly verdict: QUARANTINE

#16 · 2 files · 21 lines changed · checks: PENDING

Risk flags: NO_TEST_COVERAGE (low), CHECKS_PENDING (medium)

Risk flags and reasoning
  • NO_TEST_COVERAGE (low): Changed production files have no obvious neighboring or repository test coverage; this is a review hint, not a verdict gate. — src/diffly_cli/cli.py
  • CHECKS_PENDING (medium): Required status checks are still pending. — combined commit status; diffly; test (3.10); test (3.11); test (3.12); test (3.13)
  • QUARANTINE because required checks are still running.
Blast-radius summary
File Change Symbols Direct callers Tests
src/diffly_cli/cli.py +3/-1 <top-level changes> — —
tests/test_regressions.py +17/-0 <top-level changes> — —

Deterministic triage is authoritative; any optional LLM explanation cannot change the verdict.

@VIVAAN-DHAWAN
VIVAAN-DHAWAN force-pushed the fix/setup-double-update-check branch from e91851c to 57d54ee Compare August 23, 2026 05:20
main() ran _check_and_prompt_update for the setup command, and the
setup walkthrough then launches the wizard, which performs its own
check — so users with a pending release faced the same prompt two
times in a row. Exclude setup like update/version/help/doctor and let
the wizard own the check.
@VIVAAN-DHAWAN
VIVAAN-DHAWAN force-pushed the fix/setup-double-update-check branch from 57d54ee to 92d9df4 Compare August 23, 2026 05:57
@VIVAAN-DHAWAN
VIVAAN-DHAWAN changed the base branch from main to fix/raw-fd-keystroke-reading August 23, 2026 05:57
@VIVAAN-DHAWAN
VIVAAN-DHAWAN merged commit b699419 into fix/raw-fd-keystroke-reading Aug 23, 2026
9 checks passed
VIVAAN-DHAWAN added a commit that referenced this pull request Aug 23, 2026
Land #16 (setup double update-check) and #17 (diff content-line counting) on main
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.

1 participant