Filter unversioned canonical refs from $package expansion parameters#1033
Merged
Conversation
|
Formatting check succeeded! |
barhodes
approved these changes
May 13, 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.



Summary
Manifests can carry expansion parameters whose values are unversioned canonical URLs (e.g.
system-version=http://snomed.info/sctorcanonicalVersion=http://example.org/ValueSet/foowith no|versionpin). Most terminology servers reject expansions whensystem-version/canonicalVersionentries lack a pin. The expansion would be non-deterministic so the resulting$packagecall fails for the entire manifest instead of just the offending entries.Add a guard in
PackageVisitor.handleValueSets: after copying the manifest'scqf-expansionParametersinto the working params adapter, drop any entry whose value is a canonical URL without a version pin. Each dropped entry produces alogger.warnwith the param name and value so authors can see which entries need pinning. Non-canonical-valued params (booleans, codes likedisplayLanguage, language tags, etc.) pass through unchanged.The persisted manifest in the repository is untouched - the filter applies only to the in-memory copy used for Tx expansion and the manifest copy included in the response bundle. This keeps
$packageidempotent on stored state.Test plan
http://canonical dropped, unversionedurn:oid:canonical dropped, versioned http canonical kept, versioned urn canonical kept, language code + boolean keptcqf-fhir-crPackageVisitortest suite - no regressions$packagecompletes; warnings appear for unversioned entries; Tx server no longer errors