Skip to content

fix(rest): execute search-style GET bundle entries as searches - #635

Merged
smunini merged 2 commits into
mainfrom
fix/478-search-entries-to-main
Aug 21, 2026
Merged

fix(rest): execute search-style GET bundle entries as searches#635
smunini merged 2 commits into
mainfrom
fix/478-search-entries-to-main

Conversation

@angela-helios

Copy link
Copy Markdown
Contributor

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, bare Patient) 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)

Verification

  • Live repro from the issue, both arms: 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 test binaries, batch_conformance at 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-codes branches need a rebase onto main once merged; the content overlap is deliberate and small (entry_failure is the seam #516 replaces, and #518's failure-path tests apply on top unchanged in spirit). Happy to help with the rebase if useful.

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

codecov Bot commented Aug 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.71429% with 27 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/rest/src/handlers/batch.rs 81.14% 23 Missing ⚠️
crates/rest/src/handlers/search.rs 77.77% 4 Missing ⚠️

📢 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
smunini merged commit 7dd21d0 into main Aug 21, 2026
19 checks passed
@smunini
smunini deleted the fix/478-search-entries-to-main branch August 21, 2026 21:32
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.

batch/transaction: search-style GET entries are mis-parsed as instance reads

2 participants