Skip to content

PatternFacet spelling; align ToldBNode/LexicalBNode traits with their definitions - #74

Open
ericprud wants to merge 2 commits into
mainfrom
trait-fixes
Open

PatternFacet spelling; align ToldBNode/LexicalBNode traits with their definitions#74
ericprud wants to merge 2 commits into
mainfrom
trait-fixes

Conversation

@ericprud

@ericprud ericprud commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Two manifest-metadata fixes, found while running the shexTest validation suite differentially (in-memory vs SPARQL endpoint) in shex.js.

1. sht:PaternFacetsht:PatternFacet

Fixes the misspelling on all 49 tests that carry it. Downstream harnesses that name this trait need the same one-word change — known references:

  • apache/jena (fhircat fork): jena-shex/.../runner/ShexT.java declares tPaternFacet (plus its vendored copy of this suite)
  • rudof: only a vendored data file (bindings/emacs/tests/shextest_ranked_manifest.json); harness code treats traits as opaque strings
  • PyShEx, shex.js: no code references

2. Nine trait alignments

Semantics audited: ToldBNode = the focus node is a blank node; LexicalBNode = the schema tests the lexical form of some blank node in the data. Checked all 1189 tests two ways: an instrumented validator recording every string facet evaluated against a blank node label, and label-perturbation runs asking whether the reported status changes when blank node labels do.

Add ToldBNode (foci are _: nodes; Length/MinLength siblings already tagged):

  • 1focusMaxLength-dot_pass-bnode-short, …_pass-bnode-equal, …_fail-bnode-long

Add LexicalBNode:

  • 1focusMinLength-dot_pass-bnode-long — status flips from conformant when labels shrink
  • 1iriRefLength1_fail-bnode-equal, 1literalPattern_fail-bnode-match, 1iriPattern_fail-bnode-match — each measures a facet against a blank node label (the nodeKind mismatch keeps the status stable, but the lexical probe is the test's point, and their siblings carry the trait)

Remove LexicalBNode (no blank node appears anywhere in the test; the measured label is an IRI's):

  • 1focusBNODE_dot_fail-iriFocusLabel-equal, 1focusBNODELength_dot_fail-iriFocusLabel-equal

After these fixes the traits are exact: shex.js's SPARQL suite now skips purely by ToldBNode/LexicalBNode (no content sniffing) and runs green — 1137 passing, 30 skipped-by-trait, over an endpoint that scrambles bnode labels per response. PyShEx's manifest_tester.py already skips by these traits and picks up the three newly-tagged ToldBNode tests for free.

validation/manifest.jsonld regenerated with bin/genJSON.js.

🤖 Generated with Claude Code

Eric Prud'hommeaux and others added 2 commits August 9, 2026 09:12
Fixes the long-standing misspelling in the validation manifest (49 tests).
Downstream harnesses that name this trait need the same one-word change,
e.g. jena's ShexT.java tPaternFacet.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ToldBNode: the focus node is a blank node.
LexicalBNode: the schema tests the lexical form of some blank node in
the data.

Verified with an instrumented validator (recording every string facet
evaluated against a blank node label) plus label-perturbation runs
(does the status change when blank node labels do?):

+ ToldBNode on 1focusMaxLength-dot_{pass-bnode-short,pass-bnode-equal,
  fail-bnode-long}: their foci are _: nodes; their Length/MinLength
  siblings already carry the trait.
+ LexicalBNode on 1focusMinLength-dot_pass-bnode-long: status flips
  from conformant when labels shrink.
+ LexicalBNode on 1iriRefLength1_fail-bnode-equal,
  1literalPattern_fail-bnode-match, 1iriPattern_fail-bnode-match:
  each measures a facet against a blank node label (status is saved by
  the nodeKind mismatch, but the lexical probe is the test's point, and
  their siblings carry the trait).
- LexicalBNode off 1focusBNODE_dot_fail-iriFocusLabel-equal and
  1focusBNODELength_dot_fail-iriFocusLabel-equal: no blank node appears
  anywhere in these tests; the label under measure is an IRI's.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ericprud pushed a commit to shexjs/shex.js that referenced this pull request Aug 10, 2026
Runs the whole shexTest validation manifest twice - once through
neighborhood-rdfjs over an in-memory store (the oracle), once through
neighborhood-sparql over a SPARQL endpoint - and requires agreement
modulo blank node labels. TEST_sparql=true gates it (npm run
test-sparql); SPARQL_ENDPOINT=<url> targets an external store.

The bundled endpoint (comunica in a worker thread, reached through an
Atomics-parked synchronous HTTP bridge) is as hostile as the spec
allows: blank node labels are drawn from a small rotating pool per
response, and any query mentioning a label is rejected outright. The
DECEPTICON - hand-written decoy topologies plus a mirror of every
shexTest graph into its own namespace - is loaded beside every test's
data; it is unreachable from any focus, so it must change nothing, but
an unanchored description collects it and fails its denotation check.

Skips are trait-driven (ToldBNode, LexicalBNode). The suite is green
against current shexTest main (1180 passing, 30 skipped) and stays
green once shexSpec/shexTest#74 tightens the tags (the three mistagged
told-bnode-focus tests move from label-skips to focus-skips, and three
lexical probes whose status the nodeKind gate saves become skips).
External stores additionally skip, with the reason named, any test
whose literals they refuse (QLever 400s ill-typed booleans) or rewrite
(xsd:byte comes back xsd:int) - Endpoint#rejected and
Endpoint#literalsMissing. Full sweep against native QLever with
ad-freiburg/qlever#3190 applied: 713 passing, 0 failing, 454 skips with
stated reasons.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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