Repository navigation
Add runnable examples, a working quickstart, metadata and the 0.1.0 changeset - #67
Merged
Merged
Conversation
…hangeset The README quickstart read two variables it never defined, so the published block failed with "ReferenceError: name is not defined" from a clean install. It now declares synthetic inputs inline, prints what the pass returned, and shows that output beside it. Verified from a packed tarball in an empty directory with node quickstart.mts: exit 0. Four examples cover the jobs the README presents, each importing @cosyte/deid by name (resolved through the package's own exports to dist/) and checking its own output: the core engine on a locus model, the HL7 v2 adapter on the repository's synthetic ORU^R01, the fail-closed cases (free text blocked, a throwing or empty redactor still blocked, no key refused, a mislabelled policy refused), and the Expert Determination support report, whose determination is always null. The examples README says plainly what the library does not do: no certification, no determination. Inputs are the ZZ-placeholder shapes of test/fixtures. pnpm examples (scripts/run-examples.ts) runs them all and refuses when there is no build or no example. A new examples job in ci.yml installs, builds and runs it on Node 22 and 24, actions pinned by SHA, not yet a required context. examples/tsconfig.json maps the package name to src/ for tsc and typescript-eslint only, so pnpm typecheck, pnpm lint and format cover examples/ before any build; at run time nothing maps it. package.json: the description names the formats and the fail-closed posture, keywords widen, homepage moves to docs.cosyte.com/deid. The status lines in the README and two docs pages say 0.1 rather than pre-alpha 0.0.x, and .changeset/README.md states the 0.1.x ladder. The new changeset tells a user what 0.1 covers, what the version promises, what it is not, and what is not covered yet. Claude-Session: https://claude.ai/code/session_01U24bnHKNxQWMxmfN7ny7w9
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.
Prepares
@cosyte/deidfor its 0.1.0 release. No change undersrc/.What changes
## Installreadnameanddobwithout defining them, so the published quickstart failed from a clean install withReferenceError: name is not defined. It now declares synthetic inputs inline (ZZFAMILY^ZZGIVEN,19900215), prints the transformed values and the manifest's decisions, and shows that output in atextblock beside it.examples/: four runnable programs, each importing@cosyte/deidby name (resolved through the package's ownexportstodist/) and checking its own output withnode:assert:deidentify-a-model.ts: the core engine on a locus model; the manifest carries no input value.deidentify-an-hl7-message.ts: the@cosyte/deid/hl7adapter on the repository's synthetic ORU^R01 (test/fixtures/hl7/oru-r01.hl7); no input identifier survives in the output or the manifest.fail-closed.ts: free text blocked with no redactor, with a throwing redactor and with an empty one; a consumer redaction recorded asDEID_FREETEXT_CONSUMER_REDACTED; a keyed transform with no key refused (DEID_NO_KEY); asafe-harbor-labelled date-shift policy refused (DEID_POLICY_INVALID).expert-determination-support.ts: the support report;determinationisnulland the disclaimer leads the Markdown.examples/README.mdhas the table and says what the library does not do: no certification, no determination.pnpm examples(scripts/run-examples.ts, modelled on hl7's runner): runs every top-level example with tsx, fails on any non-zero exit, refuses (exit 2) with nodist/or no example.examplesjob inci.yml(Node 22 and 24): install, build,pnpm examples. Actions pinned by SHA, as insmoke.yml. Not in theci-required-checksruleset.examples/tsconfig.jsonmaps the package name tosrc/fortscand typescript-eslint only;pnpm typecheckaddstsc --noEmit -p examples;lintandformataddexamples/.homepagehttps://docs.cosyte.com/deid.repositoryandbugswere already correct.docs-content/intro.mdanddocs-content/installation.mdsay0.1instead of pre-alpha0.0.x;.changeset/README.mdstates the0.1.xladder (the text mllp already carries).what-0-1-means.md(minor, so the release is 0.1.0 rather than 0.0.10): what 0.1 covers, what the version promises below 1.0, what it is not (no certification, no compliance claim), what is not covered yet. Checked against the shared release-notes renderer with every pending changeset: no refusal, no violation.Checks run locally (pnpm 10.0.0, Node 24)
typecheck,lint,test(58 files, 1231 tests),build,attw,smoke,format:check,phi-scan(all-mode and--staged),check(test-selection and agent-notes),check:no-emdash,check:no-internal-refs,examples(4 of 4): all exit 0. A planted PID segment underexamples/is a hit for the all-mode PHI scan CI runs.README quickstart, from a packed tarball
Output:
[ null, '1990', '5.4 mmol/L' ]and[ 'PID-5 NAMES removed', 'PID-7 DATES transformed' ]. The same check against the published 0.0.9 exits 1 with theReferenceError.https://claude.ai/code/session_01U24bnHKNxQWMxmfN7ny7w9