Skip to content

Add deterministic HTTP stress tests - #3126

Closed
Kludex wants to merge 2 commits into
mainfrom
add-stress-tests
Closed

Kludex wants to merge 2 commits into
mainfrom
add-stress-tests

Conversation

@Kludex

@Kludex Kludex commented Sep 11, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • exercise HTTP implementations through real TCP connections under concurrent keep-alive, pipelining, fragmented body, connection churn, and incomplete request workloads
  • use deterministic seeds so failures can be reproduced locally
  • run a bounded smoke test on pull requests and shard 100 seeds across four nightly jobs

Test plan

  • scripts/test
  • uv run pytest tests/test_stress.py -m stress -n 0
  • zizmor .github/workflows/stress.yml

AI Disclaimer

This PR was developed with the assistance of either Claude or Codex. I've reviewed and verified the changes.

Review in cubic

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 11, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-11T10:46:49.067856Z 4b80439 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@coderabbitai

coderabbitai Bot commented Sep 11, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 3c41d188-a36a-4910-a398-c34cad16db69

📥 Commits

Reviewing files that changed from the base of the PR and between 4b80439 and 4a9a921.

📒 Files selected for processing (1)
  • .github/workflows/stress.yml

Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.


📝 Walkthrough

Walkthrough

The change adds concurrent HTTP stress tests for uvicorn, excludes them from default pytest and coverage runs, and adds smoke and nightly GitHub Actions jobs with fixed and sharded parameters.

Changes

Stress testing

Layer / File(s) Summary
Stress test configuration
pyproject.toml
Pytest registers the stress marker and excludes marked tests by default. Coverage omits tests/test_stress.py.
Concurrent HTTP stress implementation
tests/test_stress.py
The test runs persistent, connection-churn, pipelined, and incomplete HTTP requests against an ASGI echo app, then validates response bodies and server health.
Smoke and nightly stress workflows
.github/workflows/stress.yml
GitHub Actions runs smoke tests on main changes and executes a four-shard seed sweep on a daily schedule or manual dispatch.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~25 minutes

Change: Other

Sequence Diagram(s)

sequenceDiagram
  participant StressTest
  participant UvicornServer
  participant EchoApp
  StressTest->>UvicornServer: start selected HTTP protocol
  StressTest->>UvicornServer: send concurrent HTTP request patterns
  UvicornServer->>EchoApp: deliver request messages
  EchoApp-->>UvicornServer: return echoed response
  UvicornServer-->>StressTest: return and validate HTTP responses
Loading

Merge Risk: ⚪ Minimal · up to 4a9a9

The stress tests are correctly selected and configured in both CI jobs, with no identified merge-blocking risk.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 9 functions across 1 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding deterministic HTTP stress tests.
Description check ✅ Passed The description directly explains the deterministic stress tests, covered workloads, execution limits, and validation steps.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 9 functions across 1 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch add-stress-tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

📖 Docs preview: https://193addbd-uvicorn.marcelotryle.workers.dev

@codspeed

codspeed Bot commented Sep 11, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 34 untouched benchmarks


Comparing add-stress-tests (4a9a921) with main (fa324a4)

Open in CodSpeed

@Kludex

Kludex commented Sep 11, 2026

Copy link
Copy Markdown
Owner Author

No code changes are needed from these reviews. The only warning is generic docstring coverage for private test helpers; adding boilerplate docstrings would conflict with the project style, which relies on descriptive names and type annotations for these functions.

@cubic-dev-ai cubic-dev-ai Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 3 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread .github/workflows/stress.yml Outdated
Comment thread .github/workflows/stress.yml

This branch was successfully deployed

1 active deployment
cloudflare — 4a9a9212 Deployed Sep 11, 2026 by Kludex via docs-preview #1092
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