feat(shacl): support SHACL 1.2 node-expression forms #7348
All Vouch review confidence checks passed
Residual risk 0.25 = Change Risk (0.57) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.57 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.289
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #7348"
general
weight: 0.35
jeswr
<!-- claude-projects-attribution: {"github_login":"jeswr"} -->
_Requested by Jesse · project thread_
Summary
Prepared by an automated contributor.
Addresses #7326.
Change and design
The pinned node-expression evaluation suite now passes 272 entries in both
feature states, with four decimal lexical comparisons retained as failures.
Every evaluation entry is attempted. The pass floor is 272 and failure ceiling
is 4; no conformance floor is lowered.
Node expressions moved out of the optional SHACL-AF rule engine into one shared,
always-compiled evaluator. The existing rule-module reexports stay compatible.
Standalone evaluation and SPARQL custom-function callbacks now share SPARQL
function forms, SELECT/SPARQL expressions, named/list-parameter bodies, argument
access, conformance checks and constant triple terms. The fallible API preserves
the distinction between an empty result and an evaluation failure.
Named arguments remain lazy expressions evaluated in an empty variable scope;
list arguments evaluate in the caller's scope and enforce scalar cardinality.
Failures take precedence over empty list arguments. Optional conditional
branches evaluate only the selected branch. Ordering and extrema reuse the
shared SPARQL total-order algorithm with exact numeric and temporal observations.
Validation retains its scoped registry/dataset caches and no per-query graph
forks. Custom callback models and parsed bodies are cached, with the lazy model
held out of line behind Arc.
The main merge preserves the SHACL 1.2 rules12 executor, declared entailments,
Core/SPARQL changes and generalized algebra visitor. Both the bound-CONSTRUCT
helper and the named
?resultfunction-output helper are retained. The strictrules12 operand subset, including absent focus for global rules, stays intact;
custom functions reached through rule queries use the shared evaluator. An
integration test covers that route through a named-result SPARQL function.
README, usage skills and the conformance record describe these distinctions.
Pinned suite results
Suite revision:
04ecbb4a5b930f4fa9df6c399ac5c98ccec672c9.| SHACL 1.2 section | Passed | Failed |
| --- | ---: | ---: |
| Core | 162 | 0 |
| SPARQL | 98 | 0 |
| Node expression constraints (
shacl-af) | 8 | 0 || Node expression custom functions | 22 | 0 |
| Node expression
shnex| 142 | 0 || Node expression
shnex-sparql| 108 | 4 || Inference rules (
shacl-af) | 47 | 0 || EARL total | 587 | 4 |
SHACL 1.0 EARL has 120 passes and zero failures. Evaluation alone is 272 / 4 / 8
in both feature states; its eight non-evaluation entries belong to the separate
constraint runner and are omitted from evaluation EARL assertions. Inference
rules retain the 47-pass floor and zero failures/skips with
shacl-af; withoutit all 47 entries skip. SPARQL-RL remains unsupported: its standalone census is
0 passed / 342 failed / 0 skipped in both states, and is excluded from the SHACL
1.2 EARL report. Unsupported negative tests receive no conformance credit.
Retained test/spec differences
The main decimal changes do not change these four
xsd:decimalcomparisons:| Entry | Suite spelling | Engine spelling |
| --- | --- | --- |
|
ceil-example|4.0|4||
floor-example|3.0|3||
round-example|4.0|4||
seconds-example|00|0|The pinned SPARQL function evaluation text
requires “following the SPARQL semantics of the corresponding SPARQL function”.
These results have the required datatype and value; the functions do not require
these particular lexical spellings. The runner retains term-sensitive comparison
and leaves all four failing. No expected or actual literal is normalized and no
suite file is changed.
Validation
NODE_PATHunset: 436 passed by default and 541 withshacl-af, with two ignored reference tests in each state.tests/w3c*.rsrunner meets its floor in both feature states.sparq-py,all targets,
-D warnings.sparq-shacl-wasmchecks forwasm32-unknown-unknown, both feature states.RUSTDOCFLAGS=-D warnings.behavior tests, including the new cross-evaluator integration case. Existing
validation-scoped registry/dataset counter tests remain green.
first function result column and removing CONSTRUCT focus pre-binding. The
unchanged expression implementation also retains the earlier twenty killed
guard mutations; those mutation runs preceded the merge.
and feature tier guards. Adversarial review verified that resolved
sparql.rsequals main plus the branch's function-output helper, preserving both sides.
Reference-engine fuzzing, line coverage, dependency audits and SBOM generation
require tools absent from this sandbox. The maintainer report includes exact
external commands and makes no claim that those checks ran.
The validation-path benchmark completed with identical reports. Its method and
results are in the separate maintainer report.
---
_Generated by Claude Code_