Skip to content

S0329-parser-first-use-path: hold both first examples to a committed fixture and execute them - #90

Merged
NSchatz merged 3 commits into
mainfrom
sdd/S0329-parser-first-use-path-astm
Sep 24, 2026
Merged

NSchatz merged 3 commits into
mainfrom
sdd/S0329-parser-first-use-path-astm

Conversation

@NSchatz

@NSchatz NSchatz commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Spec: cosyte/cosyte pipeline/active/S0329-parser-first-use-path/spec.md (child: children/astm.md).

  • test/fixtures/tier1-quickstart-result.astm and test/fixtures/tier1-readme-result.astm: the record streams the two first-use examples print, committed byte for byte. They carry no patient name or birthdate, sit in the tree pnpm phi-scan reads, and the Tier-3 golden round-trip now sweeps them too (AC-AS4, AC-AS5b).
  • test/docs-content.test.ts: the first quickstart fence is asserted to be the runnable block the sweep executes, run explicitly against dist/, its stream asserted to be a fixture copy, with changed-claim and changed-input negative controls (AC-AS1, AC-AS3, AC-AS4). Temp modules live in a root-level directory the file removes in afterAll (AC-AS5).
  • test/readme-usage.test.ts: the gate is pinned to the first fenced block under the Usage heading, and the README stream is asserted to be a fixture copy (AC-AS2, AC-AS4). The existing input-mutation control stays.
  • test/install-specifier.test.ts: install commands in README.md and docs-content/installation.md must name package.json name (AC-AS6).

No document text and no parser behaviour changed, so there is no changeset and AC-AS8 has no finding to pin. pnpm test leaves git status --porcelain empty.

…fixture and execute them

The record streams printed in the quickstart's first example and the README
Usage example are committed byte for byte as test/fixtures/tier1-quickstart-result.astm
and test/fixtures/tier1-readme-result.astm, inside the corpus pnpm phi-scan reads
and the Tier-3 round-trip sweeps; the suites assert each example's stream is a
copy. The quickstart's first block is checked to be the runnable block the
sweep executes, run explicitly, with a changed-claim and a changed-input
negative control. The README gate is pinned to the first fenced block under
the Usage heading. Install commands in README.md and installation.md are
compared with package.json name. No document text changed, so no changeset.
Comment thread test/_helpers/first-use.ts Fixed
… a backtracking regex

CodeQL flagged the single pattern with a repeated group (exponential
backtracking on a long run of empty literals). The literals are now read one
at a time with a sticky pattern.
…s new TypeScript project does

The snippet harness and tsx strip types without checking them, so pnpm
test would stay green over a first-use example that does not compile.
Both first examples now compile with the options tsc --init writes for a
new project (strict, noUncheckedIndexedAccess, exactOptionalPropertyTypes,
verbatimModuleSyntax, NodeNext), against src/index.ts, and the suite
fails on any error the example itself carries. Both compile today; each
carries a control that drops the undefined guard on the first result and
must be reported.

The install-specifier reader also reads pnpm i, pnpm install, npm add
and deno add npm:, stops a specifier at a full stop and skips a
protocol specifier, so no printed form passes vacuously.
@NSchatz
NSchatz merged commit c2a24f6 into main Sep 24, 2026
9 checks passed
@NSchatz
NSchatz deleted the sdd/S0329-parser-first-use-path-astm branch October 8, 2026 18:10
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.

2 participants