Repository navigation
fix(fhirpath): pass new upstream fhir-test-cases from 2026-10-23 - #2230
Merged
Merged
Conversation
FHIR/fhir-test-cases merged oldrobot's PRs #316-#320 on 2026-10-23 and the "Test FHIRPath" gate (which runs the upstream corpus) went red on every PR with 10 undeclared failures. Fix the engine rather than declare them: - Delimited identifiers: `none_of("`")` consumed the backslash before the escape parser ran, so Patient.`name` never resolved. - unescape('json'): decode \uXXXX (pairing UTF-16 surrogates) and \/. - Indexer: a negative index is out of range, so the result is empty instead of an error. - skip({}) / take({}): an empty count returns empty. - DateTime + / - calendar duration: accept hour- and minute-precision values with a timezone (@2015-02-04T10Z, @2015-02-04T10:00Z) and keep the input precision in the result, so `= @2015-02-04T11:00Z` compares. Vendor the new cases into the local r4/r5 corpora. testLessThan28 then exposed that extension(url) on a FHIR primitive only worked through a hard-coded fabricated birthTime extension; read the primitive's own extensions instead and drop the fabrication. The parse-all test now requires invalid="syntax" expressions to be rejected.
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
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.
Why
On 2026-10-23, FHIR/fhir-test-cases merged oldrobot's PRs #316–#320. Since then the Test FHIRPath job, which runs the upstream corpus at HEAD, fails on every PR with 10
COVERAGE-LOSTtests. Example: https://github.com/HeliosSoftware/hfs/actions/runs/40008205266/job/120650867951 (#2226). PRs #2226, #2227 and #2228 are red because of this, and so is anything else that reruns CI.Fixes (engine, not known-failure entries)
testEscapedIdentifierUnicodenone_of("`")in the delimited-identifier parser consumed the\, so escapes inside backticks never rannone_of("\\`")(both parsers)testUnescapeJson3unescape('json')ignored\uXXXX\uXXXX(surrogate pairs joined) and\/testIndexer3InvalidIndextestSkip7/8,testTake8/9skip({})/take({})raised an errortestPlusDate23/24,testMinus9The new cases are vendored into the local
tests-fhir-r4.xml/tests-fhir-r5.xml, with inputs pointing atpatient-example.json. That surfacedtestLessThan28, which fails only in the in-process Rust suite:extension(url)on a FHIR primitive worked only through a hard-coded, fabricatedpatient-birthTimeextension (with the value as a plain string). It now reads the primitive's own extensions, and the fabrication is gone.testExtension1-3still pass.parser_tests::test_multiple_expressions_from_filenow requiresinvalid="syntax"expressions to be rejected, instead of expecting them to parse. This covers the newtestLiteralUnicodeInvalid('\u+041').Verification
cargo test -p helios-fhirpath --features R4and--features R5: all pass (r4 suite 749/749, r5 1144/1144, 0 undeclared).cargo clippy -p helios-fhirpath --features R4,R5 --all-targetswith the CI flag set: clean.fhirpath-cli: all 10 upstream expressions give the expected results. Existing results such as@1973-12-25T00:00:00.000+10:00 + 7 daysare unchanged.