Skip to content

fix(deps): install the hl7 peer from npm, and unpin a fixed correlation bug - #64

Merged
NSchatz merged 1 commit into
mainfrom
chore/published-hl7-dep
Aug 11, 2026
Merged

fix(deps): install the hl7 peer from npm, and unpin a fixed correlation bug#64
NSchatz merged 1 commit into
mainfrom
chore/published-hl7-dep

Conversation

@NSchatz

@NSchatz NSchatz commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Deletes vendor/cosyte-hl7-0.0.0.tgz and resolves the dev/test @cosyte/hl7 peer from the npm registry at ^0.0.10.

Why this is not a chore

The tarball held @cosyte/hl7 at 0.0.0 and never moved while that package shipped ten releases. One of them made the MSA-2 control-id echo byte-verbatim across the full escape alphabet, and its changelog names this package's correlation as the reason for the fix.

The pinned copy never picked it up, so test/ack-from-hl7/control-id-verbatim.test.ts spent ten releases asserting the defect as a guarantee: an inbound MSH-10 of ID\X echoed back as ID\E\X. A different control id on the wire is an ACK the sender cannot correlate, which is a resend, which is a duplicate clinical message.

What changed

  • The escape case moves out of the "parser cannot preserve this, so it warns" table and is pinned inverted: a round-trip through the parser path that must produce the same bytes as the byte-copy path, and must not warn. If it ever reds, the parser has regressed and the case belongs back in the table.
  • test/phi/diagnostic-phi-leak.test.ts used that same \X id to reach the NOT_VERBATIM branch. It now plants trailing whitespace, which still canonicalizes away. It failed loudly rather than passing vacuously, because runAckGate asserts the code it expects actually appeared.
  • No runtime surface changes. @cosyte/hl7 stays an optional peer used only from the ack-from-hl7 subpath; framing, ACK and warning codes are untouched.

Gates

verify.sh green (typecheck, lint, format, phi-scan, no-emdash, no-internal-refs, coverage, build, attw), plus check:agent-notes run separately since the ladder does not know it.

The check-no-emdash NUL-exclusion shape stays even though the only binary that forced it is gone: the property belongs to tracked binaries as a class, the OK line still reports the count (now 0, was 1), and dropping it would be deleting a trap because the specimen left the room.

…on bug

The vendored `vendor/cosyte-hl7-0.0.0.tgz` held @cosyte/hl7 at 0.0.0 and
never moved while that package shipped ten releases. Deleted; the dev/test
peer now resolves from the registry at ^0.0.10, the range every other
@cosyte/* dependency already uses.

WHAT THE PIN WAS HIDING, which is the reason this is not a chore:

@cosyte/hl7 fixed the MSA-2 echo to be byte-verbatim across the full escape
alphabet, and its changelog names THIS package's correlation as the reason
for the fix. The pinned copy never picked it up, so
test/ack-from-hl7/control-id-verbatim.test.ts spent ten releases asserting
the DEFECT as a guarantee: an inbound MSH-10 of `ID\X` echoed back `ID\E\X`.
That is a different control id on the wire, so an ACK the sender cannot
correlate, so a resend, so a duplicate clinical message. The case moves out
of the "cannot preserve, warns" table and is pinned inverted, as a
round-trip that must match the byte-copy path and must not warn.

test/phi/diagnostic-phi-leak.test.ts used the same `\X` control id to reach
the NOT_VERBATIM branch. It now plants trailing whitespace, which still
canonicalizes away. Worth noting it failed LOUDLY rather than passing
vacuously: runAckGate asserts the code it expects actually appeared, so a
plant that stops reaching its branch reds instead of proving nothing.

No runtime surface changes. hl7 stays an optional peer used only from the
ack-from-hl7 subpath; framing, ACK and warning codes are untouched.

Docs and gates follow the code. The NUL-exclusion shape of check-no-emdash
STAYS even though the only binary that forced it is gone: the property
belongs to tracked binaries as a class, the OK line still reports the count
(now 0, was 1), and dropping it would be deleting a trap because the
specimen left the room.
@NSchatz
NSchatz force-pushed the chore/published-hl7-dep branch from cfbaa5a to 296a69a Compare August 11, 2026 02:56
@NSchatz
NSchatz merged commit fd04f57 into main Aug 11, 2026
8 checks passed
@NSchatz
NSchatz deleted the chore/published-hl7-dep branch August 11, 2026 03:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant