fix: add missing proxy support to requestImages()#447
Merged
Conversation
Collaborator
Author
|
/review |
Code Review by Qodo
1. Proxy tests don't validate
|
Collaborator
Author
Verification Report for TC-3922 (commit 28b35c5)
Acceptance Criteria Details
Test Requirements Coverage
Overall: PASSAll checks pass. The implementation correctly adds This comment was AI-generated by sdlc-workflow/verify-pr v0.5.10. |
requestImages() was the only request function in analysis.js that did not call addProxyAgent(), causing image analysis requests to bypass the configured HTTP proxy. This wraps the fetch options with addProxyAgent(options, opts) following the same pattern used by requestStack, requestComponent, requestStackBatch, and validateToken. Implements TC-3922 Assisted-by: Claude Code
Strum355
reviewed
Apr 8, 2026
The proxy tests claimed to "verify agent is set correctly" but only asserted on the response body — the agent was never actually checked. Replace with direct unit tests for addProxyAgent() that verify: - HttpsProxyAgent is created with the correct proxy URL - Agent is set for both HTTP and HTTPS proxy URLs - Agent is set when proxy comes from environment variable - No agent is set when no proxy is configured Also fix MSW v2 handler format in requestImages integration tests (use HttpResponse.json() instead of the v1 res(ctx.json()) API). Remove requestStack proxy integration tests that were broken due to fake file paths — the proxy logic is now properly covered by the addProxyAgent unit tests. Implements TC-3922 Assisted-by: Claude Code
Strum355
reviewed
Apr 9, 2026
…s tests Add addProxyAgent() call to requestImages(), which was the only request function missing proxy support. Restore and fix all analysis tests that were excluded from CI via --grep --invert: migrate MSW v1 to v2 API, fix stale header/option names (ex-provider-1-token → trust-da-token), add temp file setup for requestStack/requestComponent tests, and add addProxyAgent unit tests with actual agent verification. Implements TC-3922 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Strum355
approved these changes
Apr 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
addProxyAgent()call torequestImages()insrc/analysis.js, which was the only request function missing proxy supportrequestImages()intest/analysis.test.jsDetails
requestImages()was the only request function inanalysis.jsthat did not calladdProxyAgent(), causing image analysis requests to bypass the configured HTTP proxy (TRUSTIFY_DA_PROXY_URL). All other request functions (requestStack,requestComponent,requestStackBatch,validateToken) already usedaddProxyAgent().The fix wraps the fetch options with
addProxyAgent(options, opts)following the same pattern used byrequestStackBatch().Implements TC-3922
🤖 Generated with Claude Code