@cosyte/hl7 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +145 -0
- package/README.md +4 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -32,6 +32,28 @@ per the cosyte version ladder (`0.0.x` until first alpha).
|
|
|
32
32
|
because it is what a screen reader on the npm page reads out, so "banner", "logo", or the file
|
|
33
33
|
name would all be a wasted line.
|
|
34
34
|
|
|
35
|
+
**SUPERSEDED on 2026-07-31 by `1aee04b`, which replaced this banner with the shared Cosyte lockup
|
|
36
|
+
in a `<picture>` block.** The two paragraphs above are left exactly as they shipped rather than
|
|
37
|
+
corrected, because they were true of the tree and right on the evidence available when they were
|
|
38
|
+
written, and they record a real state the package passed through. This note says what changed
|
|
39
|
+
under them. It shipped verbatim inside the `@cosyte/hl7@0.0.4` tarball, so it is text a consumer
|
|
40
|
+
already has on disk.
|
|
41
|
+
|
|
42
|
+
**The claim the new evidence overturns is the second one: "whether npm's markdown sanitizer
|
|
43
|
+
preserves a `<picture>` element is unverified".** That is measured now. The first claim, that the
|
|
44
|
+
banner is a markdown image and "not `<img>` and not `<picture>`", was a consequence of the second
|
|
45
|
+
rather than an independent choice, so it went when its premise did; it is no longer true of the
|
|
46
|
+
tree either way, since `README.md` now opens with a `<picture>`. What was measured: **GitHub
|
|
47
|
+
honours the `prefers-color-scheme` switch**, verified on `@cosyte/astm` in dark mode, where the
|
|
48
|
+
rendered image's `currentSrc` resolves to the on-dark tile and its parent element is `PICTURE`.
|
|
49
|
+
**On the npm package page the `<img>` is hoisted out of its `<picture>` by the anchor wrapper**,
|
|
50
|
+
so the inner fallback renders rather than the element being stripped or broken; and **npmjs.com
|
|
51
|
+
has no dark mode** (founder-confirmed), so the light cut is the correct image there regardless.
|
|
52
|
+
The GitHub and npm measurements above were taken on `astm` and reported into this repo rather
|
|
53
|
+
than re-taken here; what was re-checked directly for `hl7` was that both tile URLs return
|
|
54
|
+
`200 image/png`. **PNG only** and **alt text is content, not decoration** are both unchanged and
|
|
55
|
+
still hold; only the element choice and its stated premise moved.
|
|
56
|
+
|
|
35
57
|
- **The published JSDoc is swept, and `src/` doc comments are gated
|
|
36
58
|
(`pnpm check:no-internal-refs` third pass; `PUBLIC-SURFACE-HYGIENE`).** Doc comments compile
|
|
37
59
|
into `dist/index.d.ts` and `dist/index.d.cts`, `dist` is the first entry in `files`, and every
|
|
@@ -414,6 +436,129 @@ kind, value)`** sets one at a field or `field[rep]` dot-path. Component values a
|
|
|
414
436
|
|
|
415
437
|
### Changed
|
|
416
438
|
|
|
439
|
+
- **The PHI gate's own enumeration no longer lets a vanished build transient refuse an entire sweep
|
|
440
|
+
(`PHI-SCAN-ENUMERATE-THEN-READ-CLASS`).** `scripts/phi-scan.ts` all-mode lists its roots and reads
|
|
441
|
+
each file afterwards; a file deleted inside that window threw `ENOENT` and the scanner refused with
|
|
442
|
+
exit 2. `@cosyte/ccda` is where that landed for real (`ccda#80`, `747ac20`): its walk starts at the
|
|
443
|
+
**repo root**, `tsup` writes and then removes `tsup.config.bundled_<hash>.mjs` there, and a
|
|
444
|
+
publish-time sweep refused, failing `prepublishOnly` and blocking a real publish.
|
|
445
|
+
|
|
446
|
+
**No CI or publish run in this repo was reachable through that window, so this is hardening, not
|
|
447
|
+
the repair of a live defect here.** Say so plainly, because the temptation is to claim the bigger
|
|
448
|
+
thing. The walk is rooted at `test/fixtures` and `src`, so the repo-root transient is never
|
|
449
|
+
enumerated. **Verified in both directions rather than assumed, and re-derived three times in three
|
|
450
|
+
separate runs:** a real `tsup` build was polled while it ran and the only transient observed each
|
|
451
|
+
time was a `tsup.config.bundled_<hash>.mjs` **at the repo root**, outside both walk roots, with
|
|
452
|
+
zero files appearing under either root; and the pre-fix scanner, driven against a throwaway repo
|
|
453
|
+
with an untracked decoy placed **inside** `src/`, refused the whole sweep with exit 2 on the first
|
|
454
|
+
read. The hash differs on every build, which is why no specific filename is quoted here. The
|
|
455
|
+
immunity is scope, not design. Nothing gitignores that name (`git check-ignore` exits 1 on it),
|
|
456
|
+
and `test/docs-content.test.ts` really does run a build from inside the suite while this scanner
|
|
457
|
+
sweeps in all mode from another worker, so the two halves already race. **Widening a walk root,
|
|
458
|
+
for any reason, reintroduces it verbatim.**
|
|
459
|
+
|
|
460
|
+
**A narrower case was already live on a developer box rather than in CI, and the review gate found
|
|
461
|
+
it. It is a class, not one filename.** `.gitignore` covers `*.swp` and `*.swo` and **nothing else
|
|
462
|
+
of the kind**, so editor and atomic-save transients create and remove un-ignored files **inside a
|
|
463
|
+
walk root**. Verified un-ignored: `src/index.ts~`, `src/.index.ts.swn`, `src/#index.ts#`,
|
|
464
|
+
`src/index.ts___jb_tmp___`, `src/.goutputstream-abc123`, `src/4913`, and `.tmp` / `.orig` / `.bak`
|
|
465
|
+
beside a source file. Before this change each is a spurious exit 2 on a developer's machine; none
|
|
466
|
+
reaches CI or a publish, which is why the claim above is scoped to those.
|
|
467
|
+
|
|
468
|
+
**The refusal was correct; the enumeration was unsound.** Refusing a scan it could not complete is
|
|
469
|
+
what makes this gate worth having and it is untouched. Exactly one case is now tolerated: a file
|
|
470
|
+
the walk enumerated **itself**, that git does **not track**, failing with **`ENOENT`**. It is
|
|
471
|
+
written to stderr as skipped, never dropped silently, and the clean line on **stdout** is
|
|
472
|
+
qualified to match (`OK: no hits (N untracked file(s) skipped, see stderr)`), so a reader watching
|
|
473
|
+
stdout alone cannot take an unqualified OK from a sweep that did not observe everything it
|
|
474
|
+
enumerated. A clean sweep still prints the bare line, and a test pins it exactly.
|
|
475
|
+
|
|
476
|
+
**Five of the six bounds are pinned by a test, and which five is measured, not asserted.** Each
|
|
477
|
+
was confirmed by a mutant that only its own test kills:
|
|
478
|
+
- a **tracked** file that cannot be read (mutant: tolerate tracked files too);
|
|
479
|
+
- any **non-`ENOENT`** failure, since `EACCES` / `EISDIR` is a scan that failed, not a file that
|
|
480
|
+
went away (mutant: tolerate any errno);
|
|
481
|
+
- a `git` that cannot report the tracked set, which switches the tolerance off rather than
|
|
482
|
+
guessing (mutant: return an empty set instead of `null`);
|
|
483
|
+
- a tracked set that comes back **empty**, the one state in which the tracked-file bound stops
|
|
484
|
+
existing (same mutant). A **removed** `.git/index` makes `git ls-files` exit 0 with no output,
|
|
485
|
+
which is what the `size > 0` guard catches; a **corrupt** one exits non-zero and was already
|
|
486
|
+
caught by the `catch`;
|
|
487
|
+
- an all-mode sweep that **observed no files at all** (mutant: drop the guard), so the tolerance
|
|
488
|
+
can never decay into a clean report of a tree nothing was read from.
|
|
489
|
+
|
|
490
|
+
**The sixth is UNPINNED and named as the gap it is:** a tolerated file that is **back on disk**
|
|
491
|
+
when the sweep ends still refuses, but no test drives it. The scanner calls `git` only before the
|
|
492
|
+
first read, so there is no deterministic post-read hook, and `walk()` enumerates regular files
|
|
493
|
+
only, so a FIFO cannot be used as a blocking one either (both measured). Reaching it needs a timed
|
|
494
|
+
re-create against a deliberately slowed sweep, and a load-sensitive sleep in a suite guarding a
|
|
495
|
+
load-dependent race is the failure that race teaches. Losing that branch would cost the re-check,
|
|
496
|
+
never the tolerance's bounds. **Unpinned is not unverified:** the review gate drove the branch by
|
|
497
|
+
hand against a deliberately slowed sweep and it refused correctly with exit 2, and deleting the
|
|
498
|
+
re-check outright still leaves all 29 tests green, which is what makes "unpinned" the accurate
|
|
499
|
+
word rather than an understatement.
|
|
500
|
+
|
|
501
|
+
**The test technique is the reusable part: no sleep and no real build.** The scanner runs
|
|
502
|
+
`git check-ignore` and `git ls-files` between the walk and the first read, so a `git` shim placed
|
|
503
|
+
first on `PATH` is a deterministic hook into exactly that gap. Every case runs against a throwaway
|
|
504
|
+
git repo, so no decoy is ever written into this one. As a negative control the same tolerance case
|
|
505
|
+
was replayed against all twelve sibling scanners, and every sibling that has not yet taken this
|
|
506
|
+
change refuses it with exit 2, so the new assertion is not one a sibling's code satisfies by
|
|
507
|
+
accident. **No count is quoted, deliberately:** the same command returned a different tally on
|
|
508
|
+
three consecutive runs while sibling repos landed the same change underneath it, so any number
|
|
509
|
+
written here would be wrong by the time it is read.
|
|
510
|
+
|
|
511
|
+
**Residual, stated rather than closed:** the post-sweep re-check is keyed on the enumerated path,
|
|
512
|
+
not on content, so the class is **content that survives at a path the walk did not enumerate**. An
|
|
513
|
+
untracked file **renamed** inside the window is the obvious instance and goes unscanned under a
|
|
514
|
+
clean report; a hard link followed by an unlink is the other. Both legs of the boundedness
|
|
515
|
+
argument were driven by the review gate rather than argued: after `git add` the all-mode sweep
|
|
516
|
+
catches the renamed file, and `--staged` reports the hit from the index **even with the file
|
|
517
|
+
deleted from disk**. Closing it needs a content-addressed sweep, which is a different design
|
|
518
|
+
rather than a wider bound. The `--staged` pre-commit path reads blobs from the git index
|
|
519
|
+
(`git show :path`) and never depended on any of this.
|
|
520
|
+
|
|
521
|
+
**Two PRE-EXISTING scope limits of the walk are now written down** so they are not confused with
|
|
522
|
+
the window above. Both were measured, and an earlier draft of this entry claimed `--staged` covers
|
|
523
|
+
the commit path in both cases; **the review gate refuted that and it is false, so read `--staged`
|
|
524
|
+
as a compensating control for neither.**
|
|
525
|
+
- **Regular files only**, the sharper of the two. A symlink under a walk root pointing at a
|
|
526
|
+
PHI-bearing file is not enumerated, so all-mode never reads it, **and** git stores a symlink as
|
|
527
|
+
its target string (mode `120000`), so `git show :path` hands `--staged` the path text rather
|
|
528
|
+
than the pointed-to bytes. **Both routes report clean, driven and reproduced independently.**
|
|
529
|
+
What lands in the commit is the link, not the capture, but an identifying _filename_ still
|
|
530
|
+
reaches the tree and gets only the shape pass, which has no name detection. A FIFO is skipped
|
|
531
|
+
rather than blocking the sweep.
|
|
532
|
+
- **Working tree only.** A tracked file absent from the worktree is never enumerated in all-mode.
|
|
533
|
+
`--staged` catches such a file when it is **added** (measured, exit 1), so that coverage is at
|
|
534
|
+
add time and past tense: once it is committed and removed from the worktree, both routes report
|
|
535
|
+
clean.
|
|
536
|
+
|
|
537
|
+
Neither limit is changed here, and widening the walk to close either is a separate slice.
|
|
538
|
+
|
|
539
|
+
- **`README.md` now opens with the shared Cosyte lockup in a `<picture>` block, replacing the
|
|
540
|
+
per-package banner (`1aee04b`).** The dark-ground org tile sits behind a
|
|
541
|
+
`prefers-color-scheme: dark` media query with the light-ground tile as the inner `<img>`, so on a
|
|
542
|
+
renderer that honours the switch the mark sits on a ground matching the page it is read on. One
|
|
543
|
+
markdown image line out, four lines in: the `# @cosyte/hl7` H1, the blockquote tagline, the badge
|
|
544
|
+
row and everything below are untouched.
|
|
545
|
+
|
|
546
|
+
**Why the per-package banner goes.** It baked the package name and the one-line tagline into
|
|
547
|
+
pixels, and the two lines directly beneath it repeated both. The shared lockup reads "Cosyte"
|
|
548
|
+
while the H1 reads `@cosyte/hl7`, so the strings differ, the duplication goes away, and the
|
|
549
|
+
heading stays.
|
|
550
|
+
|
|
551
|
+
**The failure mode is safe**: a renderer that strips `<source>` renders the inner `<img>`, so the
|
|
552
|
+
worst case is a light-ground mark on a dark page, never a missing or broken image. The block was
|
|
553
|
+
copied out of `astm/README.md` rather than retyped and the two URLs then diffed byte for byte
|
|
554
|
+
against that file, because a transcription error in one of them is a broken image on a public
|
|
555
|
+
package page. Both were re-verified `200 image/png` (10513 and 10455 bytes) immediately before
|
|
556
|
+
the push: the `live` flag in the `assets` manifest is a declaration made on evidence from another
|
|
557
|
+
repo, not a fact checked here. The alt text describes the mark rather than the package, since it
|
|
558
|
+
is what a screen reader on the npm page reads out and what a reader gets when the image fails.
|
|
559
|
+
This supersedes the `ASSETS-P8` banner entry under **Added** above, which is annotated in place
|
|
560
|
+
rather than rewritten. Documentation only: no runtime, API or packaging change.
|
|
561
|
+
|
|
417
562
|
- **Corrected stale "not yet published to npm / unpublished" language in the docs site
|
|
418
563
|
(README-ORG-SWEEP).** `@cosyte/hl7` is now published on npm at `0.0.1` and public, so the
|
|
419
564
|
`docs-content/installation.md` Status blockquote ("not yet published… the shape it will take at
|
package/README.md
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
<picture>
|
|
2
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://cosyte.com/tile/cosyte-lockup-tile-on-dark-1200x300.png">
|
|
3
|
+
<img alt="Cosyte: a plus mark set in two overlapping rounded squares, one solid and one outlined, beside the Cosyte wordmark" src="https://cosyte.com/tile/cosyte-lockup-tile-on-light-1200x300.png">
|
|
4
|
+
</picture>
|
|
2
5
|
|
|
3
6
|
# @cosyte/hl7
|
|
4
7
|
|
package/dist/index.cjs
CHANGED