Skip to content

Dependency follow-ups from the Nov 2026 Dependabot batch (#84, #85) #93

Open

Description

@rabesss

Non-blocking P3 notes from the council reviews of #84 and #85. The setup-uv checksum note from #83 is tracked separately in #92.

Activity

  1. pullfrog commented on Nov 8, 2026

    @pullfrog

    Verdict: actionable — 2 of the 4 items warrant a small PR; 2 are confirmed no-action, one of them with a corrected rationale. No duplicates found. Details per checkbox, then the execution plan.

    Findings per item

    1. ruff lower bound — actionable (1 line). pyproject.toml:30 has ruff>=0.16.8,<0.18; the lockfile pins ruff==0.17.2 and the pre-commit rev is v0.17.2 (their sync is enforced by tests/test_repo_policies.py::test_pre_commit_ruff_matches_the_locked_ruff). Tightening the floor to >=0.17,<0.18 is already consistent with both — a uv pip compile regeneration of requirements-dev.txt would yield the identical pin, so there is no lockfile churn. Keep the <0.18 ceiling (the pyproject comment pins 0.x tools at the next minor).

    2. pycparser 3.12 — no action, but the expectation needs correcting. Verified against PyPI metadata: pycparser 3.12 requires Python >=3.11 (3.11 is the last release accepting 3.10). This project declares requires-python = ">=3.10" (pyproject.toml:10) and CI runs a 3.10 leg installing the same lockfile (.github/workflows/ci.yml matrix 3.10/3.13; the file notes the lockfile is compiled for 3.10). So 3.11 is already the newest resolvable pin under the declared floor — the next Dependabot run cannot pick up 3.12, and a manual bump would break the 3.10 CI leg. pycparser is also transitive (via cffi ← cryptography), so pyproject.toml can't pin it regardless. This checkbox should close as "already at the maximum resolvable," revisited only if the project ever drops 3.10.

    3. Flaky wall-clock assertion — actionable, and slightly wider than stated. Three tests (not one) assert a 10-second wall-clock window 190 <= seconds_left <= 200:

    • tests/test_quiz_learner_session.py:788 (test_a_timed_start_keeps_its_limit_and_every_page_reports_the_time_left)
    • :828 (test_once_time_is_up_nothing_is_sent_and_verify_waits_for_brightspace) — the one the issue names
    • :953 (test_the_countdown_runs_on_the_servers_clock)

    Mechanism: the timed() helper builds LearnerTimer(240, time.time() + seconds_left, …) (:755) on the test process's clock, while _clock() in lighthouse_cli/quiz_learner_session.py:191 computes seconds_left = max(0, floor(ends_at - (time.time() + clock_offset))) on the session module's clock. Real elapsed time between the two eats the 10 s slack, so a slow runner fails the floor. The file already has a clock-injection convention — patch(f"{SESSION}.time", Mock(time=lambda: clock[0])) at :900/:922/:940 — so the fix is: capture now = time.time(), freeze SESSION.time to now across the start, build the timer as LearnerTimer(240, now + 200, True), and tighten each assertion to exactly == 200. For :953 the test's actual point (offset math: deadline now + 600 + 200 with clock_offset=600 → exactly 200 left) is preserved deterministically, including the round(deadline, 3) ends_at checks.

    4. certifi 2026.10.23 — confirmed no action. Both hosts' chains (Amazon Root CA 1, DigiCert Global Root G2) are unaffected by the emSign root removal. Revisit trigger: adding a new HTTPS host → re-verify its chain against certifi's shipped roots.

    Execution plan (one PR)

    1. Branch pullfrog/93-dependency-follow-ups off main.
    2. pyproject.toml: ruff>=0.16.8,<0.18 → ruff>=0.17,<0.18 (dev extra only).
    3. Freeze the session clock in the three tests above (a small frozen-start helper or inline patch(f"{SESSION}.time", Mock(time=lambda: now)), matching :900); tighten the three window assertions to == 200.
    4. Validate: python3 -m pytest tests/test_repo_policies.py tests/test_quiz_learner_session.py -q, then the full suite (python3 -m pytest -q -n auto), treating the runner's known environmental failures (the test_quiz_media.py mojibake trio and test_session_renewal.py::test_modules_import_without_fcntl) as pre-existing per the learnings.
    5. Open the PR to main with the body mapping each of the four checkboxes to its resolution; on merge, tick boxes 1 and 3 in Dependency follow-ups from the Nov 2026 Dependabot batch (#84, #85) #93 and record the pycparser >=3.11 rationale so the "next Dependabot run picks it up" expectation is corrected.

    Scope/risk: no runtime code changes — one dev-extra dependency floor and three test-only edits; secrets policy and the --json contract are untouched.

    Task list (5/5 completed)
    • Gather context: issue comments, duplicate check, learnings (deps/tests)
    • Inspect ruff bound in pyproject.toml vs lockfile and pre-commit rev
    • Inspect flaky wall-clock assertion at tests/test_quiz_learner_session.py:828
    • Verify remaining items (pycparser, certifi) are genuinely no-action
    • Post actionable plan via report_progress

    Pullfrog  | Implement plan ➔ | View workflow run | via Pullfrog | Using glm-5.3 | 𝕏

  2. added
    dependencies
    priority: low
    type: chore
    on Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependenciespriority: lowtype: chore

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions