Skip to content

fix: make request URI building idempotent#798

Merged
overcat merged 1 commit into
masterfrom
fix/request-builder-build-uri-idempotent
Jun 5, 2026
Merged

fix: make request URI building idempotent#798
overcat merged 1 commit into
masterfrom
fix/request-builder-build-uri-idempotent

Conversation

@overcat
Copy link
Copy Markdown
Member

@overcat overcat commented Jun 4, 2026

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates Horizon request builder URL construction to be idempotent, preventing path segments from being duplicated when buildUri() (and therefore execute()) is called multiple times on the same builder instance.

Changes:

  • Update RequestBuilder#buildUri() to avoid duplicating path segments across repeated invocations.
  • Add a regression test ensuring repeated buildUri() calls produce the same URI.
  • Document the fix in CHANGELOG.md.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/test/java/org/stellar/sdk/requests/AccountsRequestBuilderTest.java Adds a regression test asserting repeated buildUri() calls don’t change the generated URL.
src/main/java/org/stellar/sdk/requests/RequestBuilder.java Changes URI construction logic to rebuild from the server base each time, aiming for idempotency.
CHANGELOG.md Notes the idempotent URL generation fix under “Pending”.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/main/java/org/stellar/sdk/requests/RequestBuilder.java Outdated
@overcat overcat force-pushed the fix/request-builder-build-uri-idempotent branch 2 times, most recently from f80baf7 to 54446e2 Compare June 4, 2026 10:57
@overcat overcat requested a review from Copilot June 4, 2026 10:57
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.65%. Comparing base (0f97df3) to head (76e6f08).

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #798      +/-   ##
============================================
+ Coverage     82.63%   82.65%   +0.01%     
- Complexity     1615     1617       +2     
============================================
  Files           232      232              
  Lines          5938     5937       -1     
  Branches        657      657              
============================================
  Hits           4907     4907              
  Misses          659      659              
+ Partials        372      371       -1     
Files with missing lines Coverage Δ
.../java/org/stellar/sdk/requests/RequestBuilder.java 79.68% <100.00%> (+1.56%) ⬆️
.../main/java/org/stellar/sdk/requests/SSEStream.java 81.37% <100.00%> (-2.13%) ⬇️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@overcat overcat force-pushed the fix/request-builder-build-uri-idempotent branch from 54446e2 to 76e6f08 Compare June 5, 2026 07:53
@overcat overcat requested a review from Copilot June 5, 2026 07:59
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

@overcat overcat enabled auto-merge (squash) June 5, 2026 08:04
@overcat overcat merged commit 1b736f4 into master Jun 5, 2026
12 checks passed
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.

2 participants