Repository navigation
pip cross-check: stop once errors pass 5% of the plan; publish only after a successful scan - #90
Conversation
…fter a successful scan check_pip counts errors as answers come in and starts no more pip runs once they pass 5% of every planned cell, when the result can only fail, so an unreachable PyPI ends in about a minute instead of the step timeout. publish now requires the scan to be success or skipped, so a cancelled scan doesn't republish main. Closes wheelgap#51 Signed-off-by: sarankumar1325 <[email protected]>
|
Thanks @sarankumar1325, nice work on this one. Stopping against the planned total is a neat way to make the early stop exact (it can never stop a run that would have passed), and the It looks good overall. Since it changes (Review assisted by Claude.) |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Merged, thanks @sarankumar1325! Stopping against the planned total is a neat touch: the early stop is exact, so it can never cut short a run that would have passed. And a cancelled scan can no longer publish a half-finished site. That's four tracker PRs from you today. If you'd like another, #92 brings the whole-tree install results ("will (Reply assisted by Claude.) |
Closes #51
scripts/check_pip.pyagreement()counts the planned cells: every looked-up package × target that isn'tunknown. pip runs through a small wrapper that counts errors as answers come in, under a lock. Once errors are over 5% of the planned total, it sets a stop flag. No new pip run starts after that, the remaining queued packages return at once, andTooManyErrorsis raised:pip couldn't answer N of M checks, over 5% of the P planned, so it stopped early (examples).main()then exits 1 without writing, as today..github/workflows/scan.ymlpublishnow needscontains(fromJSON('["success","skipped"]'), needs.scan.result)in place ofneeds.scan.result != 'failure', so a scan that timed out or was displaced (cancelled) doesn't republish main.!cancelled()and thecommitcondition are unchanged. The YAML parses, andjobs.publish.ifreads back as written.Tests (
tests/test_check_pip.py)test_stops_starting_pip_once_errors_pass_five_percent_of_the_plan: every call fails, 60 planned, 2 workers. It raises the early-stop error after at most 5 pip calls, where main makes 60.test_errors_that_stay_under_five_percent_of_the_plan_do_not_stop_it: 3 of 60 (exactly 5%) still runs all 60 calls and reports 3 errors.test_too_many_errors_writes_nothingnow expects the early-stop message.uvx --python 3.14 [email protected]run gives 341 passed, 1 skipped.Written with an AI coding assistant; I reviewed the diff and ran the checks above.