Skip to content

Commit d3078a6

Browse files
author
records-bot
committed
sync: monorepo @ validator 0.1.3 / validation-types 0.1.1
Snapshot of medvertical/records monorepo state, exported via oss:export-validator. Tracks the npm publication of: @records-fhir/validator@0.1.3 @records-fhir/validation-types@0.1.1 Run npm i @records-fhir/validator@0.1.3 for the matching distribution. The conformance evidence in conformance-results/ matches the published tarball.
1 parent 25113f7 commit d3078a6

24 files changed

Lines changed: 2568 additions & 56 deletions
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Changelog
2+
3+
All notable changes to `@records-fhir/validation-types` are documented
4+
in this file. Format follows [Keep a
5+
Changelog](https://keepachangelog.com/en/1.1.0/); versions follow
6+
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
This package ships in lockstep with `@records-fhir/validator`; cross-
9+
package changes are noted in that package's CHANGELOG. This file
10+
captures changes that affect type-package consumers directly.
11+
12+
## [Unreleased]
13+
14+
## [0.1.1] — 2026-05-04
15+
16+
Released alongside `@records-fhir/validator` 0.1.2. Not yet published
17+
to npm pending the license decision.
18+
19+
### Deprecations
20+
21+
- The legacy `validation-settings.ts` facade is now annotated
22+
`@deprecated`. IDEs and TypeScript will surface the deprecation
23+
on import. The canonical entry points are
24+
`@records-fhir/validation-types` (root) and the explicit subpaths
25+
(`/validation-settings`, `/fix-suggestions`, `/validation/aspect-enums`,
26+
etc.). The facade re-exports the same types and will be removed in
27+
a future major version.
28+
29+
### Surface
30+
31+
- All exports remain stable. Subpath exports are listed in
32+
`package.json#exports`; deep imports outside that allow-list are
33+
considered internal and may move without notice.
34+
35+
## [0.1.0] — Initial public release
36+
37+
First public release. Pure-types boundary for the
38+
`@records-fhir/validator` runtime — no runtime code, no DB coupling.
39+
Ships:
40+
41+
- `ValidationIssue`, `ValidationResult`, `ValidationSettings`
42+
- Aspect / severity / strictness enums
43+
- `AdvisorRule`, `AdvisorRuleMatch`, `AdvisorRuleTransform`
44+
- `FixSuggestion`, `FixPatch` and the catalog
45+
- DTOs for run/baseline/delta/release/dataset evidence reports
46+
- `MII_2026_PACKAGE_SET` and the MII terminology-mode enum

packages/validation-types/package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
{
22
"name": "@records-fhir/validation-types",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"description": "Validation-domain TypeScript types for the Records FHIR validator: ValidationIssue, ValidationSettings, ValidationResult, advisor rules, fix suggestions. No runtime code, no DB coupling.",
55
"type": "module",
66
"license": "Apache-2.0",
7+
"publishConfig": {
8+
"access": "public",
9+
"registry": "https://registry.npmjs.org"
10+
},
711
"repository": {
812
"type": "git",
913
"url": "https://github.com/medvertical/records-fhir-validator.git",
@@ -37,6 +41,7 @@
3741
"files": [
3842
"dist/",
3943
"README.md",
44+
"CHANGELOG.md",
4045
"LICENSE"
4146
],
4247
"engines": {

packages/validation-types/src/validation-settings.ts

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,24 @@
11
/**
2-
* Simplified Validation Settings Schema
3-
*
4-
* This module defines a simplified, minimal schema for validation settings
5-
* focusing only on essential functionality: 6 validation aspects, performance settings,
6-
* and resource type filtering. No presets, audit trails, or complex features.
7-
*
8-
* REFACTORED: This file now re-exports from the split modules in shared/validation/
9-
* to maintain backward compatibility while reducing file size.
2+
* @deprecated Back-compat facade for the 0.1.x line. Will be removed in
3+
* `@records-fhir/validation-types@0.2.0`. Migrate imports to the root:
4+
*
5+
* ```ts
6+
* // Before
7+
* import type { ValidationSettings } from '@records-fhir/validation-types/validation-settings';
8+
*
9+
* // After
10+
* import type { ValidationSettings } from '@records-fhir/validation-types';
11+
* ```
12+
*
13+
* Symbols missing from the root barrel (TerminologyAuthConfig,
14+
* AdvancedTerminologyConfig, COMMON_FHIR_RESOURCE_TYPES, etc.) will be
15+
* added to the root before the facade is removed; see the 0.2.0
16+
* migration guide for the canonical paths.
17+
*
18+
* This file used to be the single source of truth for validation
19+
* settings types. It now re-exports the split modules in `./validation/`
20+
* so the same symbols stay reachable through both paths during the
21+
* deprecation window.
1022
*/
1123

1224
// ============================================================================

packages/validator/CHANGELOG.md

Lines changed: 125 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,76 @@ ship together; package-only changes are noted under each release.
1010

1111
## [Unreleased]
1212

13+
## [0.1.3] — 2026-05-05
14+
15+
Patch release fixing a public-export gap that shipped in 0.1.2. No
16+
behaviour or API changes beyond the missing re-exports being
17+
restored.
18+
19+
### Fixes
20+
21+
- Re-export `applyFixPatch` + `FixApplyResult`, `checkFhirpathSandbox`
22+
+ `SandboxLimits` + `SandboxResult`, and the fix-suggestions
23+
catalog (`FixSuggestions`, `getFixSuggestion`, `formatFixSuggestion`,
24+
`createValidationIssue`, `CreateIssueParams`) from the package
25+
root. In 0.1.2 they existed in subpath barrels only; the
26+
CHANGELOG and concept docs advertised them as top-level exports
27+
but a fresh `npm install` of 0.1.2 threw
28+
`SyntaxError: does not provide an export named 'applyFixPatch'`
29+
when consumers followed the docs. Caught by an out-of-tree
30+
smoke test against the packed tarballs after publication.
31+
32+
Verified against the published tarball: the named exports
33+
`applyFixPatch`, `checkFhirpathSandbox`, and `getFixSuggestion`
34+
are present at the package root in 0.1.3.
35+
36+
### Migration from 0.1.2
37+
38+
If you worked around the missing exports with subpath imports:
39+
40+
```ts
41+
import { applyFixPatch } from '@records-fhir/validator/issues';
42+
import { checkFhirpathSandbox } from '@records-fhir/validator/validators/fhirpath-sandbox';
43+
```
44+
45+
…you can switch to the documented top-level form:
46+
47+
```ts
48+
import { applyFixPatch, checkFhirpathSandbox } from '@records-fhir/validator';
49+
```
50+
51+
Both forms continue to work; the subpath imports stay supported.
52+
53+
## [0.1.2] — 2026-05-04
54+
55+
Coordinated release with `@records-fhir/validation-types` 0.1.1.
56+
Bundles the entire 2026-05-03 sprint plus the OSS boundary cleanup,
57+
business-rules subpath exports, and the validator engine extractions
58+
that landed before the bump. Not yet published to npm pending the
59+
license decision (see the `oss-launch-checklist.md` in the source
60+
repo).
61+
1362
### Engine
1463

15-
- `compliesWithProfile` now checks `required`/`extensible`
16-
binding ValueSet compatibility for `cw-binding-*` fixtures. Simple
64+
- `compliesWithProfile` now checks `required`/`extensible` binding
65+
ValueSet compatibility for `cw-binding-*` fixtures. Simple
1766
inline/contained ValueSet concept lists are compared directly, so
1867
`cw-binding-superset` fails correctly while legitimate
19-
`cw-binding-subset` refinements pass. If expansion is not local and
20-
simple, the validator falls back to conservative URL inequality.
21-
Launch-discovery executed comparisons are now 100.0% pass rate
68+
`cw-binding-subset` refinements pass. Falls back to conservative
69+
URL inequality when expansion is not local and simple.
70+
Launch-discovery executed comparisons reach 100.0% pass rate
2271
(547/547) with 0 skips.
2372

2473
### Public API
2574

2675
- `recordsValidator.validate()` and the new `PublicFhirVersion` type
27-
now accept `'R4B'` alongside `'R4' | 'R5' | 'R6'`. R4B routes
28-
through the R4 internal path (same StructureDefinitions, same
29-
FHIRPath context) — this matches R4B's status as a maintenance
30-
release of R4. R4B-specific package bundling
31-
(`hl7.fhir.r4b.core`) is tracked under K-2.
76+
accept `'R4B'` alongside `'R4' | 'R5' | 'R6'`. R4B routes through
77+
the R4 internal path (same StructureDefinitions, same FHIRPath
78+
context) — this matches R4B's status as a maintenance release of
79+
R4. R4B-specific package bundling (`hl7.fhir.r4b.core`) is tracked
80+
under K-2.
81+
- `toInternalFhirVersion(v: PublicFhirVersion)` exported for
82+
embedders that need to route their own internal calls.
3283

3384
### Terminology
3485

@@ -38,41 +89,84 @@ ship together; package-only changes are noted under each release.
3889
are cached; `'unknown'` (server error / malformed response) is
3990
intentionally not cached so a retry within the TTL can succeed.
4091
New `clearSubsumesCache()` and `getSubsumesCacheSize()` exports.
41-
- New `TerminologyApiClient.isSubsumedBy(system, child, parent)`
92+
- `TerminologyApiClient.isSubsumedBy(system, child, parent)`
4293
convenience helper. Returns `true` only when the parent strictly
43-
subsumes the child or is equivalent — the FHIR `$subsumes`
44-
argument order (codeA subsumes codeB) is easy to reverse and the
45-
named helper makes the intent at the call site obvious.
94+
subsumes the child or is equivalent — the FHIR `$subsumes` argument
95+
order (codeA subsumes codeB) is easy to reverse and the named
96+
helper makes the intent at the call site obvious.
4697

4798
### Security
4899

49-
- New `checkFhirpathSandbox(expression, limits?)` static safety
100+
- `checkFhirpathSandbox(expression, limits?)` static safety
50101
pre-flight for user-defined Custom Rules. fhirpath.js is
51102
synchronous and cannot be hard-timed out from the calling thread,
52103
so the only reliable defence against a pathological customer
53-
expression is to reject it before it runs. The sandbox enforces
54-
three bounds (default values shown):
104+
expression is to reject it before it runs. Three bounds:
55105
- `expressionLength`: 4096 characters
56106
- `functionCallCount`: 64
57107
- `nestingDepth`: 16
58108
String-literal aware: identifiers inside quoted spans don't count
59-
as function calls, so `matches('where(...)')` doesn't inflate
60-
metrics. Wired into `CustomRuleExecutor` in both the public
61-
package and the server-side mirror — rejected rules emit a
62-
`custom-rule-rejected-by-sandbox` warning issue with the measured
63-
metrics in `details.sandboxMetrics` so customers can tune.
109+
as function calls. Wired into `CustomRuleExecutor`; rejected rules
110+
emit a `custom-rule-rejected-by-sandbox` warning with the measured
111+
metrics in `details.sandboxMetrics`.
64112

65113
### Fixes
66114

67-
- New `applyFixPatch(resource, patch)` helper for executing
68-
resolved `FixPatch` objects from the fix-suggestions catalog.
69-
Supports `add` / `replace` / `remove` actions on dotted paths with
70-
`[index]` array syntax, deep-clones the input (no mutation),
71-
rejects unresolved `{{templates}}`, coerces JSON-shaped string
72-
values into objects/arrays/numbers/booleans/null. Exported from
73-
the package root as `applyFixPatch`. Foundation for D-1 Auto-Fix
74-
Application — the catalog had 290 patches but no executor; this
75-
adds the executor.
115+
- `applyFixPatch(resource, patch)` executor for resolved `FixPatch`
116+
objects from the fix-suggestions catalog. Supports
117+
`add` / `replace` / `remove` on dotted paths with `[index]` array
118+
syntax, deep-clones the input, rejects unresolved `{{templates}}`,
119+
coerces JSON-shaped string values into objects/arrays/numbers/
120+
booleans/null.
121+
- Fixed: fhirpath.js compiled-function `traceFn` was being passed in
122+
the wrong arg position (envVars instead of additionalOptions),
123+
causing `TRACE:[unmatched] []` lines to appear in CI output for
124+
any constraint that called `.trace()`. Moved to the third arg.
125+
126+
### Subpath exports (OSS extraction)
127+
128+
- `@records-fhir/validator/business-rules` — built-in business rule
129+
registry + element-path resolver, extracted from the server.
130+
- `@records-fhir/validator/business-rules/rule-registry` — direct
131+
access to the rule registry for callers that wire their own
132+
catalogs.
133+
- StructureDefinition → FHIRSchema converter prototype moved into
134+
the OSS validator surface.
135+
136+
### Boundary
137+
138+
- Dropped `node-fetch` runtime dep; uses platform `fetch`.
139+
- New `FHIR_BUNDLED_PROFILES_PATH` env var so embedders can point at
140+
any local `~/.fhir/packages`-shaped directory tree.
141+
142+
### Distribution / day-1 OSS material
143+
144+
- `examples/` directory ships in the tarball (`standalone-validate.mjs`,
145+
`bulk-folder-validate.mjs`, `github-workflow.yml`, `README.md`).
146+
- `CHANGELOG.md` and `CONTRIBUTING.md` ship in the tarball.
147+
- `log-level` input on the composite GitHub Action with `warn`
148+
default — CI output for a typical run drops from ~47 to ~9 lines
149+
per file (100% signal).
150+
151+
### Internal — Records platform
152+
153+
- MII KDS 2026 advisor-rule starter set (`mii-kds.yaml` + TS mirror)
154+
plus a generic `AdvisorRuleSet` YAML loader.
155+
- `getActiveAdvisorRules()` merges built-ins (canonical-URL sanity,
156+
MII KDS) with DB-managed customer rules deterministically.
157+
- `mii-2026.records-lock.json` now contains transitive canonical
158+
pinning (was package-list only) when MII packages are resolvable
159+
on disk.
160+
- `POST /api/validation/validateResource` MII-validator-compatible
161+
shim.
162+
- Dataset Quality Reports gain per-resource-type issue rates
163+
(`resourceTypeIssueRates` field).
164+
- HAPI Hybrid Bridge deployment guide (`docs/operations/`).
165+
166+
## [0.1.1] — Skipped
167+
168+
Bumped in `package.json` for the boundary cleanup landed in #104 but
169+
never published to npm. Superseded by 0.1.2.
76170

77171
## [0.1.0] — Initial public release
78172

0 commit comments

Comments
 (0)