Add a snapshot case for a slice group that ends the snapshot - #292
Open
AltangerelG wants to merge 1 commit into
Open
AltangerelG wants to merge 1 commit into
AltangerelG wants to merge 1 commit into
Conversation
grahamegrieve
left a comment
Collaborator
There was a problem hiding this comment.
please update so that not every line of the manifest is changed
The slice sum check opens a counter on a sliced element and flushes it when a later element of shallower-or-equal depth appears. Counters still open when the elements run out were abandoned. Patient.link is the last top-level element of Patient, so nothing of shallower-or-equal depth follows its subtree. The base profile sets up the slicing and the derived profile adds two named slices of min 1 without repeating the slicing entry, which makes the generated slicing entry an auto-added one, so the effect is visible in the snapshot rather than only in a message. Expected Patient.link min is 2; org.hl7.fhir.core master leaves it at 0 in r5 and in r6. Passes with hapifhir/org.hl7.fhir.core#2661. For hapifhir/org.hl7.fhir.core#2587. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
AltangerelG
force-pushed
the
test-cases/trailing-slice-group
branch
from
September 28, 2026 17:38
4772e81 to
8f1a3cf
Compare
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.
Split out of #288, one case per fix as @grahamegrieve asked.
Covers hapifhir/org.hl7.fhir.core#2587,
fixed by PR #2661.
Patient.linkis the last top-level element ofPatient, so nothing of shallower-or-equaldepth follows its subtree and the counter is never flushed.
Getting the effect into the snapshot took a little care: of the three things the sum check
does, only raising an auto-added slicing entry's
minchanges the output — the other twoemit
INFORMATIONmessages, which the harness does not surface. So the base profile sets upthe slicing and the derived profile adds the named slices without repeating the slicing
entry, which is what makes the generated entry auto-added.
Expected
Patient.linkmin is 2. Core master leaves it at 0, in r5 and r6.