Skip to content

fix(fhir): no-issue: stabilise flaky Patient given-name filter test#10100

Open
passcod wants to merge 2 commits into
mainfrom
fix/flaky-fhir-given-filter
Open

fix(fhir): no-issue: stabilise flaky Patient given-name filter test#10100
passcod wants to merge 2 commits into
mainfrom
fix/flaky-fhir-given-filter

Conversation

@passcod

@passcod passcod commented Jun 20, 2026

Copy link
Copy Markdown
Member

Changes

🤖 The materialised FHIR test Patient › filters patients by firstName (given) is flaky.

It creates three patients (two named "John", one "Bob") and asserts given=John returns 2. But the FHIR given search is a case-insensitive prefix match (^John) over name.given, which is materialised as [firstName, middleName]. fake() assigns each patient a random middleName, and roughly 0.4% of the time the "Bob" patient's middleName starts with "John" (e.g. "Johnson", "Johnathan"), so it matches too and the count is 3 — about 1 failure in every ~250 runs.

The fix pins middleName: null on the three patients so only the explicit firstName drives the match.

Auto-Deploy

  • Deploy
Options
  • Artillery load test
  • Seed from closest snapshot
  • Generate fake data
  • More data (20Gi)
  • No facility servers (central-only)
  • No sync (facility tasks scaled to zero)
  • AMD64 architecture (default is arm64)
  • Skip mobile build
  • Always build mobile
  • Stay up for 8 hours
  • Stay up for 24 hours
  • Stay up (no TTL)
  • Build images only (don't deploy)
  • Pause this deploy

Tests

  • Run E2E tests
  • Run DAST scan

Review Hero

  • Run Review Hero
  • Auto-fix review suggestions Wait for Review Hero to finish, resolve any comments you disagree with or want to fix manually, then check this to auto-fix the rest.
  • Auto-fix CI failures Check this to auto-fix lint errors, test failures, and other CI issues.
  • Auto-merge upstream Check this to merge the base branch into this PR, with AI conflict resolution if needed.
  • Save suppressions Check this to capture 👎 reactions on Review Hero comments as suppression rules in .github/review-hero/suppressions.yml. Also runs automatically at the end of any auto-fix run.

Remember to...

  • ...write or update tests
  • ...add UI screenshots and testing notes to the Linear issue
  • ...add any manual upgrade steps to the Linear issue
  • ...update the config reference, settings reference, or any relevant runbook(s)
  • ...call out additions or changes to config files for the deployment team to take note of

@review-hero

review-hero Bot commented Jun 20, 2026

Copy link
Copy Markdown

🦸 Review Hero Summary
3 agents reviewed this PR | 0 critical | 0 suggestions | 0 nitpicks | Filtering: consensus 3 voters

No issues found. Looks good!

@passcod passcod added this pull request to the merge queue Jun 24, 2026
@github-merge-queue github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jun 24, 2026
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.

1 participant