fix(rest): execute search-style GET bundle entries as searches - #635
Merged
Conversation
Cherry-picked from the #501..#504 stack (PR #481, commit 32b3766) onto main, so #478's fix ships without waiting for the issue-code refinement chain (#516/#518) to clear review. The conflict resolution, recorded because it is more than textual: - Search entries partition out of indexed_entries *before* #459's conditional-reference resolution, which runs on the write entries only — a GET entry's query string is a search, not a conditional reference. - entry_failure lands as a single seam in main's current style: the status/details pair from client_response rendered through create_error_result. #516 upgrades exactly this function to the full OperationOutcome issue-code mapping when it lands; its scope is untouched. - The rollback fan-out keeps main's message-based result and gains this commit's .chain(&search_entries) — every entry of a failed bundle owes the audit trail a record, searches included. - execute_search_bundle keeps main's ignored-params outcome (#460-era lenient-handling reporting) and returns the bundle JSON; the HTTP wrapper formats. Verified live: batch and transaction bundles with GET Patient?family=X entries return 200 searchset entries, and a transaction's search sees the bundle's own committed writes. Full helios-rest suite green (34 binaries; batch_conformance 59 including this commit's five). Closes #478 Co-authored-by: Angela Valdez <angela@heliossoftware.com>
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
…hape codecov: the read-or-search parser and the embedding result rode only through the integration happy paths. Unit tests now pin the split (instance reads and deeper paths are never searches, bare type is an unfiltered search, leading slash tolerated) and the 200-no-baggage entry shape. The failure-path issue codes stay #518's scope.
smunini
approved these changes
Aug 21, 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.
Closes #478.
Unstacks Angela's #481 from the #501..#504 chain so the user-facing fix — GET bundle entries carrying a search URL (
Patient?name=x, barePatient) executed as searches instead of failing as malformed instance reads — ships to main without waiting for the issue-code refinement PRs (#516/#518) to clear review. Those keep their scope; see below.Conflict resolution (more than textual)
entry_failurelands as a single seam in main's current style (status/details fromclient_responsethroughcreate_error_result). fix(rest): render batch entry failures through the single-resource error mapping #516 upgrades exactly this function to the full OperationOutcome issue-code mapping — its diff shrinks to the seam it was always about..chain(&search_entries): every entry of a failed bundle owes the audit trail a record.execute_search_bundlekeeps main's ignored-params lenient-handling outcome and returns the bundle JSON; the HTTP wrapper formats.Verification
GET Patient?family=Xentries return200searchset entries, and a transaction's search sees the bundle's own committed writes.helios-restsuite green: 34 test binaries,batch_conformanceat 59 including this commit's five happy-path tests.Heads-up for the stacked PRs
@aacruzgon — this will make your
fix/504-batch-entry-issue-codes/fix/478-search-entry-issue-codesbranches need a rebase onto main once merged; the content overlap is deliberate and small (entry_failureis the seam #516 replaces, and #518's failure-path tests apply on top unchanged in spirit). Happy to help with the rebase if useful.