Skip to content

S0329-parser-first-use-path: execute both first examples and name any unexecuted runnable tag - #137

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

NSchatz merged 4 commits into
mainfrom
sdd/S0329-parser-first-use-path-ccda

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/ccda.md).

  • test/fixtures/first-use/quickstart-ccd.xml: the quickstart's first CCD, committed byte for byte; pnpm phi-scan reads it as a C-CDA document (AC-CC5, AC-CC6).
  • test/docs-content.test.ts: for the quickstart's first block and the first block under the README Usage heading, asserts each is one the two existing sweeps execute, runs it against dist/, and shows a changed claim turns it red; the quickstart's document literal must be a fixture copy and a changed input leaves the corpus and fails (AC-CC1, AC-CC2, AC-CC4, AC-CC5).
  • Same file: every fence tagged runnable in README.md or docs-content/ must be one the harness extracts, else the suite names file and line, with a planted-block control (AC-CC3).
  • test/install-specifier.test.ts: install commands in README.md and docs-content/installation.md must name package.json name (AC-CC7).

The README block was already executed at this pin (doc/code agreement (README) in test/docs-content.test.ts), so the ccda baseline is 2, recorded in the item notes. The README example builds its document with buildCcda, so it prints no document literal; the fixture-copy rule is applied to every document literal a first-use block prints, and that block prints none. No document text and no parser behaviour changed, so no changeset.

… unexecuted runnable tag

The quickstart's first CCD is committed byte for byte as
test/__fixtures__/first-use/quickstart-ccd.xml, which pnpm phi-scan reads as a
document, and the suite asserts the copy. Both first-use blocks (the
quickstart's first and the first under the README Usage heading) are checked
to be ones the two sweeps execute, run explicitly, and shown to go red on a
changed claim; the quickstart's also on a changed input. Every fence tagged
runnable in README.md or docs-content/ must be one the harness extracts, or
the suite names it by file and line. Install commands are compared with
package.json name. No document text changed, so no changeset.
…e, not a tracked .xml

CI refused the committed test/__fixtures__/first-use/quickstart-ccd.xml:
artifact-provenance asserts no XML document is ever tracked, because this
repository keeps its C-CDA fixtures as XML embedded in test/__fixtures__/*.ts
(which pnpm phi-scan reads). The quickstart CCD now lives there, as
QUICKSTART_CCD in test/__fixtures__/first-use.ts, and the suite checks each
first-use document literal against the embedded fixtures by value.
…s new TypeScript project does

The snippet harness strips 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 breaks its types 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 831da24 into main Sep 24, 2026
10 checks passed
@NSchatz
NSchatz deleted the sdd/S0329-parser-first-use-path-ccda branch September 24, 2026 05:42
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