| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Codecov Results 📊✅ 89950 passed | ⏭️ 6240 skipped | Total: 96190 | Pass Rate: 93.51% | Execution Time: 321m 17s 📊 Comparison with Base Branch
All tests are passing successfully. ✅ Patch coverage is 96.43%. Project has 2405 uncovered lines.
@@ Coverage Diff @@
## main #PR +/-##
==========================================
- Coverage 89.93% 89.90% -0.03%
==========================================
Files 192 192 —
Lines 23784 23801 +17
Branches 8210 8214 +4
==========================================
+ Hits 21389 21396 +7
- Misses 2395 2405 +10
- Partials 1342 1345 +3Generated by Codecov Action |
Sorry, something went wrong.
There was a problem hiding this comment.
Summary: Clean fix for ASGI URL duplication when scope["root_path"] is already included in scope["path"]. The approach is sound — thread a path_includes_root_path boolean through the URL construction pipeline.
Solid PR. The core logic is correct and well-structured. The main risk is the Django default assumption — worth double-checking before merging.
Sorry, something went wrong.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a96d284. Configure here.
Sorry, something went wrong.
There was a problem hiding this comment.
url.path attribute always prepends root_path, ignoring path_includes_root_path
In _get_request_attributes() (_asgi_common.py ~line 152), attributes["url.path"] is always set to root_path + path regardless of path_includes_root_path. For frameworks where path_includes_root_path=True (e.g. Starlette >= 0.33), this re-introduces the exact duplication the PR is trying to fix, just for the url.path span attribute.
EvidenceIdentified by Warden code-review
Sorry, something went wrong.
There was a problem hiding this comment.
No tests covering the new root_path_in_path behavior in any of the changed test files
The PR description states tests were added for root_path handling in each ASGI integration, but none of the changed test files (test_asgi.py, test_fastapi.py, test_starlette.py) contain any tests exercising root_path or the EITHER/EXCLUDED enum paths. Have you considered adding at least one test that sets root_path in the ASGI scope and asserts the resulting URL is not duplicated?
EvidenceIdentified by Warden code-review
Sorry, something went wrong.
…try#6579) Add the `root_path_in_path` parameter to functions used for setting the `url.path` and `url.full` attributes. When `root_path_in_path` is `_RootPathInPath.EXCLUDED`, preserve the existing behavior of prepending `scope["root_path"]` when building the URL. The other `_RootPathInPath.EITHER` option is used by the Starlette integration. It preserves Starlette's behavior of accepting ASGI scopes where `scope["path"]` either includes or excludes `scope["root_path"]`. The detection is based on Starlette's route resolution. Closes getsentry#6577
| Back | FazBrowse Home | New Git URL |
Description
Add the root_path_in_path parameter to _get_url() and related functions.
If root_path_in_path is _RootPathInPath.EXCLUDED, the existing behavior that prepends scope["root_path"] when forming the url is preserved.
The other _RootPathInPath.EITHER option is used by the Starlette integration. It preserves Starlette’s behavior of accepting ASGI scopes where scope["path"] either includes scope["root_path"] or is already relative to it, using heuristics that match the libraries logic.
Issues
Closes #6577
Reminders