Skip to content

Python pytest case study: retry for the slow public demo site - #24

Merged
niranjankagri merged 6 commits into
mainfrom
python-pytest-retry
Nov 20, 2026
Merged

niranjankagri merged 6 commits into
mainfrom
python-pytest-retry

Conversation

@niranjankagri

Copy link
Copy Markdown
Owner

Updates the Python pytest + Playwright case study for python-pytest-framework#9, which retries page loads and API calls that time out on the public demo site.

  • Engineering decisions: new item: only timeouts are retried, only calls that are safe to repeat, a timed-out registration starts over with a new user, and assertions are never retried.
  • Architecture: adds framework/retry and open_page; config now lists attempts.
  • Known limitations: says what is handled (timeouts, tried three times) and what isn't (a longer outage).

Generated with python tools/build_site.py. The other 34 pages differ only in the asset hash: the committed pages had a stale one (85a26e32adcc, while the current style.css/theme.js/projects.js give 5d43b48f8946), and the build fixes it. tools/validate_site.py passes, and so does ruff check tools --select=E4,E7,E9,F.

🤖 Generated with Claude Code

niranjankagri and others added 6 commits November 19, 2026 20:19
Adds the retry design decision (timeouts only, safe-to-repeat calls only, new user for a
timed-out registration, assertions never retried), framework/retry in the architecture, and a
sharper known-limitation line. Regenerates the pages; the committed pages also carried a stale
asset hash (85a26e32adcc instead of 5d43b48f8946), refreshed by the same build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- CI text: at most four sessions against the shared demo site (2 API workers,
  2 UI workers, one browser job at a time)
- Limitation: page loads and server round trips get 30 s, timeouts tried three times
- Rebuilt pages: evidence-age labels and sitemap dates from today's build

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The build appends " · older evidence; recheck the linked source" once evidence
is more than 30 days old (20 Oct -> 20 Nov 2026), so the exact-match check on
"Recorded CI replay" failed. Check the start of the label instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Seven featured or listed projects had evidence from 20 Oct and became "older
evidence" today; enterprise would follow tomorrow. Each now points at its latest
green run on main, with the counts checked in that run's log:
- playwright-typescript #73: 23 API + 24 UI per browser (22 passed, 2 skipped), 95 executions
- playwright-java #47: 57/57 on Chromium, Firefox and WebKit
- appium #31: 40/40 on the Android 15 emulator
- k6 #70: all jobs green, stress checkout p95 552 ms (< 650 ms claim)
- cypress-typescript #67: 31 API, 33 UI, 17 component, 15 Node tests
- ai-assisted #39 and llm-feature #34: hand-written sample answers, still no live model result
- enterprise nightly #103: Chrome 246/246; Firefox, Edge, Grid 182/182 each (792)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Expected, actual and difference images from CI run 44652629883 reviewed:
featured-projects (desktop/mobile, light/dark) and comparison-mobile
(light/dark) changed only in text (evidence dates, run labels, enterprise
counts). Accepted with compare_visual_baselines.py --accept-reviewed-baselines;
review record appended to baseline-review.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@niranjankagri
niranjankagri merged commit 489b52a into main Nov 20, 2026
3 checks passed
@niranjankagri
niranjankagri deleted the python-pytest-retry branch November 20, 2026 01:34
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