S0035-hl7-vendor-refresh: adopt @cosyte/hl7 0.0.10 from the registry, with the regression evidence - #39
Merged
Merged
Conversation
… dependency moves Freezes the comparison basis for the @cosyte/hl7 refresh, captured at 76984bb with @cosyte/hl7 0.0.1 installed from vendor/cosyte-hl7-0.0.0.tgz. - test/_support/hl7-baseline-corpus.json: 124 distinct HL7 v2 fixtures, COLLECTED from the repository's own fixture suites by test/_support/hl7-corpus-probe.ts rather than transcribed, so completeness is measured. Frozen here on purpose: some members are messages the reverse path serialized, so re-deriving after a bump would move the input as well as the output. - test/_support/hl7-malformed-classes.ts: one authored synthetic input per malformed class (malformed, truncated, empty, wrong-version), carrying no person data at all, so each class has a measured pre-refresh behaviour. - scripts/hl7-refresh-capture.ts: the compared surface capture (FHIR bundle plus the diagnostics emitted alongside it, in emission order), with the two normalizations it applies stated in its header. - documentation/hl7-refresh/surface-pre-refresh.json: that capture over all 128 corpus members on the stale dependency. Gates at this commit: build, typecheck, lint, test (29 files, 504 tests), phi-scan, check:no-emdash, check:no-internal-refs, check:agent-notes and format:check all exit zero. phi-scan-overrides.md is untouched.
The parser was nine published versions behind and pinned to a pnpm pack
archive committed into this repository, so the version the tests actually
exercised was watched by no dependency route. It is now a plain registry
devDependency resolved through pnpm-lock.yaml, and no copy of the library
source remains anywhere in the checkout.
Measured, not assumed: the compared surface (the FHIR output plus every
diagnostic in emission order) over all 128 baseline corpus members is
BYTE-IDENTICAL before and after. No emitted FHIR value moved, no diagnostic
moved, no call site needed adapting, and src/ is untouched by this change.
Both captures are committed so the comparison reruns rather than being
believed: documentation/hl7-refresh/surface-{pre,post}-refresh.json.
- package.json + pnpm-lock.yaml: @cosyte/hl7 file:vendor/... -> ^0.0.10,
resolving to exactly one version whose integrity hash matches the registry
query recorded in the record. No overrides or resolutions entry was written.
- vendor/cosyte-hl7-0.0.0.tgz deleted; scripts/vendor-refresh.sh no longer
re-creates it; the stale RECONCILE_EXEMPT entry in scripts/phi-scan.ts and
the prose in .gitattributes, scripts/check-no-emdash.mjs, CLAUDE.md,
documentation/agent-notes.md and docs-content/installation.md follow the
code. @cosyte/fhir is unaffected and stays vendored: the registry lacks it.
- test/messages/malformed-classes.test.ts: the three fail-safe properties for
each of the four malformed classes, plus a corpus-wide sweep asserting every
diagnostic carries a registry-static message at a positional locator.
- test/upstream-capabilities.test.ts: buildAdt and encodeComposite both exist
now, recorded as calls that compile and run. NEITHER IS ADOPTED HERE: the
visit-carrying Patient plus Encounter output stays deferred and routes to a
follow-on item, and the reverse path keeps building its RawFields by hand.
- documentation/hl7-refresh/record.md: registry evidence, the end-state checks,
the capability inventory and regression plan, the normalizations, the
fail-safe measurements class by class, the PHI scan, and the three answers.
phi-scan-overrides.md is untouched and no --allow-fixture bypass was used.
Gates: build, typecheck, lint, phi-scan, check:no-emdash,
check:no-internal-refs, check:agent-notes and format:check all exit zero.
pnpm run test is 523 passed, 1 failed, and the one failure is NOT behavioural:
test/scripts/no-emdash-gate.test.ts pins the number of vendored archives
declared binary in .gitattributes at 2, and removing the hl7 tarball makes it
1. Changing that constant is an expectation edit the governing spec permits
only to track an adopted diagnostic difference, and there is none, so it is
left for a human ruling rather than made here. See the blocked report.
…ate moved Deleting vendor/cosyte-hl7-0.0.0.tgz took this tree from two paths declared binary in .gitattributes to one, and test/scripts/no-emdash-gate.test.ts pins that count as a literal, so the assertion had to be corrected or it would keep claiming something about the tree that stopped being true. ONE literal, 2 -> 1, in that ONE file, on the operator decision of 2026-08-21 (operator-decision-ac3-does-not-freeze-a-removed-subject.md): AC3's freeze protects expectations from being bent to make failing behaviour pass, and does not reach an assertion whose SUBJECT this chore legitimately removed. Every other expectation in the suite stays frozen. The pin stays a pin. It is not converted to a shape, a range or a count derived from .gitattributes, because the comment beside it records why the number is pinned: a refuter showed a shape-only assertion here leaves a widened skip condition completely green, and that reasoning survives at one path exactly as it did at two. The comment is corrected to say one rather than two. documentation/hl7-refresh/record.md gains section 5b: the before and after form, the cause named as what it is (the required end state removed the subject, NOT an upstream difference), and the ruling that authorized it. The adopted difference enumeration is still empty and this edit deliberately does not join it, since dressing a tree fact up as an AC6b difference would be false. Gates on the refreshed checkout, all exit zero: build, typecheck, lint, phi-scan, check:no-emdash, check:no-internal-refs, check:agent-notes, format:check, and pnpm run test at 31 files, 524 tests, 524 passed, 0 failed. The compared surface was re-verified, not re-asserted: the committed pre and post captures still differ by one hunk, each file's own label, over all 128 corpus members, and a fresh capture reproduces the committed post-refresh file byte for byte.
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.
Spec:
work/specs/S0035-hl7-vendor-refresh/spec.mdin the umbrella repository.Durable record in this checkout:
documentation/hl7-refresh/record.md.What this is
@cosyte/hl7moves from apnpm packarchive committed into this repository at0.0.1to a plain registry devDependency at0.0.10, resolved throughpnpm-lock.yaml, with no copy of the library source left anywhere in thecheckout.
@cosyte/fhiris untouched and stays vendored: the registry does nothave it.
The deliverable is not the version number. This package sits in a PHI dataflow
and its promise is never a confident wrong FHIR value, so a green suite was not
accepted as evidence on its own.
The measurement
Every HL7 v2 fixture the repository carries was collected mechanically into a
frozen corpus (124), four synthetic inputs were authored for the malformed,
truncated, empty and wrong-version classes, and all 128 were transformed once on
each side of the bump. The compared surface, meaning the FHIR output plus every
diagnostic in emission order, is BYTE-IDENTICAL across all 128 members. Both
captures are committed so a reviewer reruns the comparison rather than believing
it:
One hunk, each file's own
label. No emitted FHIR value moved, no diagnosticmoved, and
src/is untouched by this change.Scope notes a reviewer should check first
buildAdtandencodeCompositeboth exist at0.0.10and NEITHER is adoptedhere. The visit-carrying
PatientplusEncounteroutput stays deferred androutes to a follow-on item; the reverse path keeps building its fields by hand.
edited: the count of paths declared
binaryin.gitattributes, which thisrefresh's own end state moved from two to one by deleting the tarball. It
stayed a pinned literal, it tracks no upstream difference, and section 5b of
the record carries its before and after form with the ruling that authorized
it.
phi-scan-overrides.mdis untouched and no--allow-fixturebypass was used.Gates
build,typecheck,lint,phi-scan,check:no-emdash,check:no-internal-refs,check:agent-notesandformat:checkall exit zero.pnpm run testis 31 files, 524 tests, 524 passed, 0 failed.