Skip to content

Prepare the 0.1.0 release: runnable examples, metadata and the 0.1 changeset - #92

Merged
NSchatz merged 1 commit into
mainfrom
release-0.1-examples
Sep 25, 2026
Merged

NSchatz merged 1 commit into
mainfrom
release-0.1-examples

Conversation

@NSchatz

@NSchatz NSchatz commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

Prepares @cosyte/astm for its 0.1.0 release. No change under src/.

What changes

  • examples/: four runnable programs, one per job the README presents:

    • read-results.ts: parse a de-framed record stream and read each result's value, units, flag and status, with the two patient IDs kept distinct.
    • build-and-frame.ts: build spec-clean records, frame them with checksums, read them back, and see a corrupted frame refused.
    • receive-over-ltp.ts: drive the receiver state machine (ACK, NAK a damaged frame, accept the retransmission, deliver the records).
    • map-local-codes-to-loinc.ts: map local codes to LOINC with a caller-supplied LIVD catalog (one candidate, two settled by units, one unmapped).

    Each imports @cosyte/astm by name, so it resolves through the package's own exports to the built dist/, prints what it read, and asserts its own output. Inputs are synthetic; the one data file is a copy of test/fixtures/tier1-result.astm.

  • Scripts: pnpm examples (scripts/run-examples.ts, which refuses to pass when it finds nothing to run), typecheck:examples and lint:examples (against the built types, via examples/tsconfig.json and examples/eslint.config.js), and phi-scan:examples (the scanner's default walk does not reach examples/). format and format:check now cover examples/.

  • CI: a new examples job in ci.yml that installs, builds, typechecks, lints, runs and PHI-scans the examples, with actions pinned to the same commits release.yml pins.

  • package.json: keywords for the standards and the lab audience; homepage is now https://docs.cosyte.com/astm. description, repository and bugs were already correct.

  • Changeset first-minor-release.md (minor): what 0.1 covers, what the version promises below 1.0, what is not covered yet. The same statement leads CHANGELOG.md [Unreleased], and documentation/release-readiness.md accounts for the new changeset and records the operator's 2026-09-25 direction to publish 0.1.x.

Quickstart proof

The README quickstart was already self-contained. From the packed tarball:

pnpm build && npm pack                      -> cosyte-astm-0.0.22.tgz
npm init -y && npm install ./cosyte-astm-0.0.22.tgz   (empty dir)  exit 0
node qs-extract.mjs node_modules/@cosyte/astm/README.md  -> code block L59 (ts)
node quickstart.mts                          exit 0

Local gates

pnpm typecheck && pnpm lint && pnpm test && pnpm build && pnpm attw pass (72 files, 1267 tests), as do format:check, phi-scan, check, check:no-emdash, check:no-internal-refs, typecheck:examples, lint:examples, examples and phi-scan:examples.

https://claude.ai/code/session_01U24bnHKNxQWMxmfN7ny7w9

…angeset

The 0.1.0 release needs examples a new user can run, CI that keeps them
honest, package metadata that points at the docs site, and a changelog
entry that says what 0.1 means for someone depending on the package.

- examples/: four programs covering the jobs the README presents (read
  results, build and frame, drive the transfer protocol receiver, map
  local codes to LOINC). Each imports @cosyte/astm by name, so it runs
  against the built package through its own exports, and asserts its
  own output. Synthetic input only, copied from test/fixtures.
- pnpm examples runs them all (scripts/run-examples.ts, refusing to pass
  when it finds nothing to run); typecheck:examples and lint:examples
  check them against the built types, and phi-scan:examples names them
  to the PHI scanner, whose default walk does not reach examples/.
- ci.yml gains an examples job running all four after a build, with
  actions pinned to the same commits release.yml pins.
- format and format:check now cover examples/.
- package.json: keywords for the standards and the lab audience, and
  homepage https://docs.cosyte.com/astm.
- .changeset/first-minor-release.md: the minor that states what 0.1
  covers, what the version promises below 1.0, and what is not covered
  yet. CHANGELOG.md [Unreleased] carries the same statement, and
  documentation/release-readiness.md accounts for the new changeset and
  records the operator's 2026-09-25 direction to publish 0.1.x ("I need
  every single package on v0.1.x and published."), which replaces the
  earlier publication block.

The README quickstart already ran verbatim from a clean install of the
packed tarball, so it is unchanged.

Claude-Session: https://claude.ai/code/session_01U24bnHKNxQWMxmfN7ny7w9
@NSchatz
NSchatz enabled auto-merge (squash) September 25, 2026 20:20
@NSchatz
NSchatz merged commit 8871a11 into main Sep 25, 2026
10 checks passed
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