Skip to content

Manifest-name check, CI on npm test, two JSG fixes, and a gated @types/shexj check - #92

Merged
ericprud merged 10 commits into
mainfrom
check-manifest-names
Oct 10, 2026
Merged

ericprud merged 10 commits into
mainfrom
check-manifest-names

Conversation

@ericprud

@ericprud ericprud commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Five commits that each stand alone (plus c6dfca8, the manifest-name fix that was only on local main), then a merge of main after #91 landed, and three commits adapting to it.

  1. + bin/checkManifestNames.js — every test's <#id> must equal its mf:name, in both manifest.ttl and manifest.jsonld, in all five manifest directories; also entries ↔ definitions, no duplicates, and both serializations listing the same tests in the same order. Prompted by c6dfca8. Verified against the pre-fix commit (flags exactly that mismatch) and nine deliberately broken manifests.
  2. + .claude/skills — six skills recording what each check is for, what red means and what to do about it, how the manifests and the grammar renderings relate, how @types/shexj is managed, and how to do history archaeology on this repo.
  3. - test-ts — it has been in npm test since 630f48b (2022) and could never pass: bin/makeTsTests.sh was never committed (no .sh/.ts file ever has been, on any branch; the npm tarball has none either). CI had been running the other checks one by one to avoid it. CI now calls npm test, so the two cannot diverge again; the regeneration diff and the informational missing.js stay as their own steps.
  4. ~ doc/ShExJ.jsg — abstract removed from Shape (it is ShapeDecl's); IriStemRange.exclusions made required, as for the other two ranges. Both already matched ShExR.shex, ShExV.jsg, vocab.csv and @types/shexj; no schema used either.
  5. + bin/checkShExJTypes.js — what test-ts was meant to do: each schemas/*.json wrapped as const schema: Schema = {…} and type-checked against the installed @types/shexj (491 of 491 pass against 2.1.7), plus three documents the types must reject. The AHEAD table gates schemas that are ahead of the published types: expected to fail while the listed version or older is installed, required to pass once a newer one is — which first happens in Dependabot's bump PR, so that PR merges itself if the DefinitelyTyped change is right and goes red if it is not. Replayed against 2022's 2.1.2 → 2.1.3 (Shape.extends).

After #91 (manifest-ld) merged:

  1. Merge of main — conflicts in package.json and ci.yml: manifest-ld-check and manifest-ld-legacy-check stay in test and are listed in the comment above the single npm test step; their separate workflow steps go, as the other checks' did.
  2. ~ validation/manifest-ld — regenerated after c6dfca8: the YAML had carried the one id/name mismatch as an "@id" with a note; manifest-ld-legacy-check passes again.
  3. ~ skills — renamed to the shextest- prefix YAML-LD manifests in place of the authoritative Turtle #91's skills use, and updated for manifest-ld (a test is now named in the YAML too; the regeneration order; the two new checks in the red-CI table).
  4. ~ checkManifestNames — also checks manifest-ld.yaml: no entry carries an "@id" (that is the id/name mismatch carried over), each is named once, and it lists the tests manifest.ttl lists, in its order.

Rehearsed in a fresh clone (Node 26, macOS): regeneration diff, npm test (all five manifest-ld directories: 6 checks pass) and missing.js all pass.

Side findings, not changed here: test-shexv-val matches no files (validation/*.val were removed in 2023); package.json has "file" where npm expects "files", so npm publish ships nearly the whole tree, now including .claude/skills/.

🤖 Generated with Claude Code

Eric Prud'hommeaux and others added 10 commits October 6, 2026 11:04
- extends-open-or-each-each_fail-cross-each ->
  extends-open-or-each-each_pass-cross-each
A test is identified twice -- by its IRI (<#1dot_pass>, "@id": "#1dot_pass")
and by its mf:name -- and harnesses select and report by either. c6dfca8 fixed
one that had drifted (extends-open-or-each-each_pass-cross-each, named
..._fail-...); this keeps them from drifting again.

For every */manifest.{ttl,jsonld}: each test has exactly one name, equal to the
fragment of its id; no id or name is used twice; mf:entries and the defined
tests are the same set; and the two serializations list the same ids, in the
same order, with the same names. That last part also covers negativeStructure
and validation-contrib, which CI's regeneration check leaves out.

Wired in as `npm run test-manifest-names`, into `npm test`, and as a CI step.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…o red

Six skills for AI assistants working in this repo, written down from one
session (2026-10-06) so that the next one can say why something is red
without rediscovering it:

  ci-red                why a check, a CI run or a Dependabot PR is red, the
                        fix, and where a green run proves less than it seems
  manifests             ttl is the source, jsonld is generated, and a test's
                        id, name and entries-list item are one string
  changing-the-grammar  the places the language is written down, which are
                        derived, and what keeps each honest (or doesn't)
  shexj-types           @types/shexj in DefinitelyTyped: how it is managed,
                        what type-checking the schemas can prove, and why a
                        version-gated expected failure beats waiting on a
                        release; with the history of test-ts/makeTsTests.sh
  adding-a-check        where a check goes, and how to show that it bites
  repo-history          answering "when did this show up" from git, npm
                        tarballs and DefinitelyTyped

Written against a tree that also has test-ts removed, CI calling `npm test`
and ShExJ.jsg tightened; those land separately. The type check that
shexj-types calls "designed, not yet built" comes next.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
test-ts has been in `npm test` since the day it was written (630f48b,
2022-08-28) and has never passed anywhere else: it calls bin/makeTsTests.sh,
which was never committed, and a bare `tsc` with no typescript dependency.
CI (0f45c51) worked around it by running the other steps one by one, and three
later commits appended checks to `test` without noticing it could not pass.

Remove it, and have the workflow call `npm test`, so the two cannot diverge
again. The regeneration diff and the informational missing.js stay as their own
steps, since neither belongs in `npm test`. The per-check comments become one
list above the step; each check's rationale is in its script header.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… exclusions

Found by reading the JSG next to @types/shexj, which already said both.

- `Shape { abstract:BOOL ? }` duplicated ShapeDecl's. ShExR.shex, vocab.csv
  and the types all put abstract on ShapeDecl only.
- IriStemRange's exclusions were optional, unlike LiteralStemRange's and
  LanguageStemRange's. A range with nothing excluded is an IriStem, not an
  IriStemRange with an empty list; ShExR.shex, ShExV.jsg and the types all
  require it.

No schema in the corpus used either, so `npm test` is unchanged -- which is
also why both went unnoticed: nothing here tests that a grammar rejects
anything.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…, gated

What test-ts was meant to do, rebuilt: every schemas/*.json is wrapped as
`const schema: Schema = {…}` and handed to tsc, so the types published from
DefinitelyTyped are checked against the whole corpus, which nothing there can
do (its tests are static .ts files). 491 of 491 pass against 2.1.7. Three
documents the types must reject are checked too, among them the two the JSG
just stopped accepting.

The gate: when ShExJ gains something, the schemas using it are rejected by the
published types until a DefinitelyTyped PR merges and publishes, a day or two
later, and nothing can notify this repo when it does. Rather than leave CI red,
the AHEAD table lists those schemas with the newest @types/shexj known not to
accept them. They are expected to fail while that version or an older one is
installed, and required to pass once a newer one is -- which first happens in
Dependabot's bump PR, so that PR merges itself if the new types are right and
goes red if they are not.

Replayed against 2022: with 2.1.2 installed (no Shape.extends) 22 schemas
fail; gated at 2.1.2 they are expected to; with 2.1.3 they must pass, and do.

Wired in as `npm run test-shexj-types`, in `npm test`; typescript added as a
devDependency. The shexj-types and ci-red skills now describe the built check
rather than the design.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Conflicts in package.json and .github/workflows/ci.yml: main had appended
manifest-ld-check and manifest-ld-legacy-check to `test` (before test-ts) and
added them as workflow steps; this branch had removed test-ts and made the
workflow call `npm test`. Resolved by keeping both checks in `test` and
listing them in the comment above the single `npm test` step; their separate
steps go, as the other checks' did, since `npm test` runs them.
The YAML had carried the one id/name disagreement as an "@id" with a note;
with manifest.ttl fixed, bin/manifest-ld-from-legacy.js writes a plain
`name`, and manifest-ld.{jsonld,ttl} follow. manifest-ld-legacy-check
passes again for validation.
Renamed to match the two skills #91 added (shextest-manifest-ld,
shextest-vocabularies): the maintainer's skills from sibling repos are
collected in one place, where bare names would collide.

  ci-red -> shextest-ci-red          manifests -> shextest-manifests
  changing-the-grammar -> shextest-grammar
  shexj-types -> shextest-shexj-types
  adding-a-check -> shextest-checks  repo-history -> shextest-history

And brought up to date with manifest-ld: a test is now named in
manifest-ld.yaml too, and an "@id" there is the id/name mismatch carried
over; editing manifest.ttl means regenerating the jsonld, the YAML and its
two renderings, in that order; manifest-ld-check and manifest-ld-legacy-check
have rows in the red-CI table; the three vocab CSVs are told apart.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
bin/manifest-ld-from-legacy.js carries an id/name disagreement into the YAML
as a `name` plus an "@id" with a note -- which is how validation's one
mismatch looked there until c6dfca8. So an "@id" on an entry is the same
defect in the file meant to become the source. Check that none has one, that
each entry is named once, and that the YAML lists the tests manifest.ttl
lists, in its order.

Verified on the pre-fix YAML (reports the "@id" and the resulting name
difference) and on copies with a duplicated name and two entries swapped.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@ericprud
ericprud merged commit 7a29139 into main Oct 10, 2026
2 checks passed
@ericprud
ericprud deleted the check-manifest-names branch October 10, 2026 22:49
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