Skip to content

feat: requests/httpx e2e tests + refactor#19

Merged
sohankshirsagar merged 7 commits intomainfrom
sohan/requests-httpx-e2e-tests
Jan 9, 2026
Merged

feat: requests/httpx e2e tests + refactor#19
sohankshirsagar merged 7 commits intomainfrom
sohan/requests-httpx-e2e-tests

Conversation

@sohankshirsagar
Copy link
Contributor

No description provided.

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

2 issues found across 20 files

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="drift/instrumentation/httpx/instrumentation.py">

<violation number="1" location="drift/instrumentation/httpx/instrumentation.py:171">
P1: REPLAY fallback to a real request bypasses drop transforms. If a transform rule is supposed to block an outbound call, a REPLAY miss will now still hit the network. Apply `should_drop_outbound_request(...)` (and raise `RequestDroppedByTransform`) before calling `original_request` in the REPLAY no-mock fallback path.</violation>

<violation number="2" location="drift/instrumentation/httpx/instrumentation.py:246">
P1: Async REPLAY fallback to a real request bypasses drop transforms (same regression as sync). Apply the drop check before `await original_request(...)` to avoid unexpected outbound calls in REPLAY mode.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 2 files (changes from recent commits).

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them.


<file name="drift/instrumentation/httpx/instrumentation.py">

<violation number="1" location="drift/instrumentation/httpx/instrumentation.py:115">
P2: Hardcoded "GET" method in default response doesn't match the actual request method. If a background request uses POST/PUT/DELETE, the response's request object will incorrectly show "GET". Consider accepting the method parameter to ensure consistency.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@sohankshirsagar sohankshirsagar merged commit 63fa4cd into main Jan 9, 2026
5 checks passed
@sohankshirsagar sohankshirsagar deleted the sohan/requests-httpx-e2e-tests branch January 9, 2026 00:25
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