PR status update
Build checks (CI lint commands run locally on changed files only):
| Check | Result |
|---|---|
black --check app_tester/rube_learning/flex_llm.py app_tester/rube_learning/tests/test_flex_llm_5xx_retry.py | ✅ 2 files would be left unchanged |
isort --check (same files) | ✅ no errors |
flake8 --config tox.ini (same files) | ✅ no errors |
mypy --check-untyped-defs --config-file tox.ini (same files) | ✅ no errors in the touched code (only transitive complaints from unrelated files like pii_mask.py, clickhouse_service.py, usecase_ingestion_service.py) |
pytest on the new test file | ✅ 14 passed in 6.77s |
Tests: 14 parametrized cases cover the originally-handled codes (500/502/503/504) and the newly-covered Cloudflare codes (520/521/522/523/524/525/526/527/530), plus a 401 negative regression to confirm non-5xx is still NOT retried.
E2E/runtime check: Not applicable — flex_llm.flex_chat_completions_parse is OpenAI client-side retry logic. Reproducing a real Cloudflare 520 would require controlling the OpenAI edge. The unit tests with a mocked APIStatusError(status_code=520) are the highest-fidelity test possible without an actual outage.
CI status:
- ✅
Test - Learning Pipeline— passes - ❌
Lint - Integrator— pre-existing failure on master, NOT introduced by this PR. Verified by comparing this PR's lint log against master's last successful-build attempt at51ef296(run 24939883584): the same 4 sub-tasks (isort-check,black-check,flake8,mypy) fail in the same files on both runs. None of the failing files (workflow_analysis/runner.py,pii_mask.py, , , , , ) are touched by this PR. Per repo CI conventions, pre-existing master failures are noted and not blocking.