Skip to content

tmp probe - #1

Closed
Neutron-0 wants to merge 1 commit into
mainfrom
fix/conflict-label-retry-dropped-connection
Closed

Neutron-0 wants to merge 1 commit into
mainfrom
fix/conflict-label-retry-dropped-connection

Conversation

@Neutron-0

Copy link
Copy Markdown
Owner

probe

…main

`tools/pr_conflict_label.py`'s only HTTP call had no retry, and a connection dropped at
`h.getresponse()` is not an `HTTPError` - urllib wraps only the request half in `URLError` - so it
escaped as `http.client.RemoteDisconnected` with a traceback and the `label` job exited 1:
`main` 023043b and 640b0d0, two of the last nine pushes.

Retry a failure in transit (dropped connection, timeout, truncated body, 502/503/504) three times,
waiting 1 s then 2 s. A 4xx, or a 5xx that is not a gateway, stays `ApiError` and is not retried.

`tests/test_pr_conflict_label.py`: five cases over a fake opener - the four failures above are
asked again, an answer from GitHub is not, and the last attempt raises. The control: with main's
copy of the tool, 4 of the 5 fail (one call, no sleep); with this one, 18 pass (13 before).

Needs no game files and no GPU. Measured on Windows 11, Python 3.13.5:
  python -m pytest tests/test_pr_conflict_label.py -q   ->  18 passed
  python -I tests/test_pr_conflict_label.py             ->  Ran 18 tests, OK
  python -m compileall -q tools tests                   ->  exit 0
  python -I scripts/check_no_game_data.py <both files>  ->  exit 0

AI-assisted: yes - DeepSeek v4.1 (flash).
@Neutron-0 Neutron-0 closed this Dec 1, 2026
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