Feat/shacl first class integration#17
Merged
Merged
Conversation
added 13 commits
June 15, 2026 11:52
Video element links to GitHub Pages hosted mp4. Falls back to download link when offline. Keeps ZIP small — video is external.
…soning integration, and settings UI - Isolate urn:vg:shapes graph from OWL reasoning pipelines (Konclude + N3) - Add runShaclValidation() in worker with rdf-validate-shacl, graceful error handling for unsupported SPARQL constraints - Wire SHACL results into reasoning pipeline (errors/warnings alongside OWL) - Create shaclShapeLoader utility supporting direct .ttl URLs and GitHub folder discovery - Auto-load shapes on startup from settings URL or ?shaclShapes= param - Add ShaclShapesPanel sidebar widget showing shapes grouped by source with standalone Validate button - Add SHACL summary card and SHACL/OWL source badges in ReasoningReportModal - Add SHACL tab in Settings with URL input, reload, and bundled presets - Bundle ontology-quality and skos-quality starter shape files - Expose loadShaclFromUrl MCP tool for agent-driven shape loading
…and README docs - Report dialog error/warning cards now link to affected node (closes dialog, navigates canvas) - Warnings no longer mark data as invalid — only errors affect validity status - Validation provider feeds both errors (red) and warnings (amber) to canvas node badges - SHACL sidebar panel shows constraint messages and severity icons per shape - Remove standalone Validate button from sidebar (validation runs via reasoning pipeline) - Add reasoning-demo.shacl.ttl: purpose-built shapes producing 2 errors + 12 warnings - Add SHACL validation section to README with demo link, URL params, and preset docs
Validation badges were missing on TBox class nodes because revalidateEntities() only ran after reasoning, not after view switches. Now badges refresh whenever the user switches views.
…king SHACL sidebar now shows validation findings grouped under each shape with click-to-navigate. Clicking SHACL messages in the reasoning dialog closes it and opens the sidebar with the message highlighted. Added zustand store for cross-component SHACL state coordination. Carried sourceShape through from worker violations for shape-grouped display.
…cator Resolve property shape blank nodes to parent NodeShape in worker so findings group under the correct shape. Add message-text fallback for matching. Remove "Other Findings" section. Make findings clickable buttons instead of links. Offset reasoning dialog right to avoid sidebar overlap. Top bar shows: green checkmark + "Consistent · N warnings", red for errors or inconsistency.
…count Badge now shows the actual number of warnings/errors per node instead of always showing 1. Tooltip displays all messages combined. Reactodia uses validation.items.length for count and maps items for tooltip text.
…nvas container Dialog is now an absolute-positioned overlay inside the canvas shifting container, so it moves naturally with sidebar expansion. Uses pure Tailwind classes instead of Radix Dialog/Portal. Closes on Escape key or clicking backdrop. No more viewport-centered positioning that overlaps the sidebar.
Blank node IRIs (urn:vg:bnode:*) are not returned by dataProvider lookupAll, so they're missing from iriViewMap. When navigating to an unknown IRI that isn't on the current canvas, try the other view as fallback instead of silently failing.
Clicking a sidebar message now sets it as active (un-highlighting the previous). Removed auto-clear timer that caused race conditions. Highlight persists until another message is clicked.
…apes Add sh:nodeKind sh:IRI to ClassLabel and ClassComment shapes so they declaratively exclude anonymous OWL classes (restrictions, unions). Implement SHACL-aware pre-filtering in runShaclValidation: shapes with sh:nodeKind sh:IRI or sh:filterShape referencing sh:IRI have their sh:targetClass blank-node instances removed from the data dataset before validation, preventing noise from documentation shapes on blank nodes.
Replace rdf-validate-shacl (SHACL Core only) with shacl-engine which supports SPARQL targets. This enables spec-compliant blank-node exclusion via sh:SPARQLTarget with FILTER(isIRI(?this)) in shapes, removing the custom sh:nodeKind pre-filter hack from the worker. - Swap deps: rdf-validate-shacl → shacl-engine + @rdfjs/data-model + @rdfjs/dataset - Update runShaclValidation() for shacl-engine API (path array, shape.ptr, message array, targetResolvers) - Replace sh:targetClass + sh:nodeKind sh:IRI with sh:SPARQLTarget on class shapes in ontology-quality.shacl.ttl - Remove ~40-line blank-node pre-filter from worker - Add smoke tests verifying SPARQL targets work (including skolemized bnodes) - Add 8 integration tests covering conforming data, violations, blank-node exclusion, severity mapping, and result field population - Fix MCP SHACL tests: add runShaclValidation mock, use vi.hoisted() for proper mock sharing with tool module
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
rdf-validate-shacl(Core only) toshacl-enginewith SPARQL target support — shapes usesh:SPARQLTargetwithFILTER(isIRI(?this))instead of a customsh:nodeKindpre-filter hackTest plan
shacl-engineSPARQL targets work (named class, blank node exclusion, skolemized blank node)Key technical decisions
shacl-engineoverrdf-validate-shacl— enables SPARQL targets for declarative blank-node filtering per SHACL-AF spec@rdfjs/data-model+@rdfjs/datasetas factory/dataset — avoids coupling to N3 internalsr.pathis array (extract viapath[0].predicates[0]),r.shapeis Shape object (access viashape.ptr.term),r.messageis Term array (not string)