Repository navigation
test(httpclient): pin that the shared httpcalls client keeps no cookie jar - #973
Conversation
…e jar The shared client was moved off WebClientSession in #862 but nothing proved that a Set-Cookie is not replayed across calls. Adds a loopback regression test, documents the behaviour and fixes a stale test comment.
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 🧰 Additional context used📚 Code guidelines (4)No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (4)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe PR adds a loopback regression test for cookie handling by the shared HTTP client. It also documents that cookies are not retained between calls and updates a test comment and changelog entry. ChangesHTTP client cookie behavior
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Other Suggested reviewers: Merge Risk: ⚪ Minimal · up to The new test and documentation clarify the existing cookie behavior. No actionable merge risk remains after normal checks. Security Architecture ReviewSecurity architecture risk: ⚪ Minimal · up to The change protects an existing security boundary through documentation and regression coverage. It does not introduce cookie persistence, new production entrypoints, or additional credential sharing. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 2 files. (2 skipped: 2 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
|
Disposition of the un-threaded feedback on this PR (there are no review threads and no reviews yet):
CI: every check is green except Integration Tests, still running; the skipped jobs are explained by Detect Changes (no UI or shell changes). |
The problem
The Vert.x client behind every agent's httpcalls was once wrapped in an application-scoped
WebClientSession, which keeps a cookie store. ASet-Cookiefrom one call would then be replayed on later calls to the same host from any agent, conversation, user or tenant.#862 already replaced it with a plain
WebClient, somainis not vulnerable. But nothing pinned that behaviour: reintroducing a session (an easy "improvement") would pass every existing test.What this PR does
No production code changes.
HttpClientModuleCookieTestruns the realprovideHttpClientproducer against a loopbackcom.sun.net.httpserverserver that answers every request withSet-Cookie, and asserts the second request carries noCookieheader.docs/httpcalls.md: new "Cookies are not kept between calls" section, since an API that relied on a session cookie now needs an explicit header.ApiCallExecutorBranchCoverageTestthat still described a cookie-aware session.What this breaks
Nothing new. Stored configs, REST paths, MCP tools and property names are untouched. Behaviour is as already shipped by #862: no cookie persistence between httpcalls.
What a reviewer should look at hardest
The test reaches
module.vertx(package-private) and calls the producer directly instead of booting Quarkus; confirm that is an acceptable seam.Verification
HttpClientModuleCookieTest,HttpClientModuleTest,ApiCallExecutorBranchCoverageTestplus the repo-wide guards (ImportStyleTest,BuildQualityGatesTest,ChangelogRotationTest,ChangelogFragmentTest,DocumentationLinksTest,DocumentationAccuracyTest,DocumentedRestPathsTest): 122 tests, 0 failures, every class confirmed to have a report.WebClientSession.create(webClient)back into the producer makes the new test fail withSet-Cookie from the first call was replayed on the second: JSESSIONID=TENANT-A-SECRET; restored afterwards../mvnw testsuite and integration tests (CI). Locally the test needs a shortTEMPpath on Windows.Summary by CodeRabbit