Plan, apply and roll back changes to a production ontology, with a blast radius report and a proof an auditor can re-check.
dcat-us-binding
A national metadata standard that claims conformance to W3C DCAT, whose 115 published examples expand to 76 triples, one predicate and zero DCAT. The engine was used to cross-check the repair, and the same run exposed two defects in the engine itself.
Code and full evidence live in a standalone repository: fabio-rovai/dcat-us-binding. This page records what the case study contributes here.
The situation
DCAT-US 3.0 is the metadata profile every US federal agency publishes against, maintained by GSA for data.gov. Its README states it is "an implementation of the World Wide Web Consortium's (W3C) DCAT standard". DCAT v3 section 4 defines conformance in RDF terms.
The project inherited a website, a JSON Schema and a SHACL definition that were out of sync, with nobody left who knew which was authoritative, and collapsed to the JSON Schema as the single source of truth. The SHACL file was deleted in PR #120. The live repository publishes no JSON-LD context, so the JSON it ships has no defined RDF interpretation.
A context for the profile does exist, at
DOI-DO/dcat-us, 48,311 bytes alongside Turtle
serialisations of every example. That repository is marked deprecated in its own README,
which points to https://resources.data.gov/resources/dcat-us3/, and GSA/dcat-us
re-checked at main on 4 September 2026 still publishes no context, JSON-LD, SHACL or
Turtle artefact outside its DEPRECATED/ tree. The measurement below is against the live
repository. The deprecated context is worth reading as the control case rather than a
counterexample: it is hand-maintained and it has drifted, declaring a namespace host that
does not resolve and minting the W3C Organization Ontology under w3c.org instead of
w3.org. A context generated from the schema cannot acquire either defect.
The result
| Expansion of the same 115 unedited example files | Triples | Predicates | DCAT triples | Empty files |
|---|---|---|---|---|
| As published | 76 | 1 | 0 | 38 |
| With the generated binding | 1,510 | 123 | 228 | 10 |
The binding was not written. 26 of 26 classes and 231 of 270 properties already record
the RDF term they stand for, in _oldDocs blocks retained when SHACL was retired. The
context and the shapes are generated from those records, which is the point: two
projections of one source cannot contradict each other, so the objection that killed
SHACL upstream ("two validations that do not agree") stops applying.
What validation reach means here
| Run | conforms |
Target classes matched | Focus nodes | Results |
|---|---|---|---|---|
| Deleted shapes, corpus as published | True |
0 / 34 | 0 | 0 |
| Deleted shapes, corpus with the binding | False |
23 / 34 | 228 | 287 |
| Generated shapes, corpus with the binding | False |
24 / 24 | 191 | 316 |
The first row is the failure mode this repository exists to name. A SHACL run reports
conforms whether or not any shape matched anything, so a green result is ambiguous by
construction. Zero focus nodes and zero violations is not a pass, it is a miss, and
onto_shacl reports focus_nodes alongside the verdict for exactly this reason. The
shapes GSA deleted were not stale. They were pointed at a graph that did not exist.
What it forced in this engine
Both cross-checks were run through open-ontologies batch (load then shacl) against
pySHACL on identical inputs, on 20 August 2026. The two agree exactly on reach, 191 focus
nodes each, and disagreed on findings as follows. The engine defects in the right-hand
column were fixed on 24 August 2026 and the table has not been re-measured since, so read
it as the state on the date of the run:
| Measure | pySHACL | this engine, 20 Aug 2026 |
|---|---|---|
sh:class results |
165 | 0 |
sh:nodeKind results |
122 | 0 |
sh:maxCount results |
27 | 27 |
sh:datatype results |
2 | 8 |
Two defects, both ours, both fixed on 24 August 2026:
sh:classandsh:nodeKindundersh:propertywere not evaluated. 287 of pySHACL's 316 findings were invisible to the engine on this run. Both are evaluated now, insrc/shacl.rs, pinned bytests/shacl_class_constraint_test.rs. Two limits remain and both apply to these shapes. Written on the node shape itself rather than undersh:property, neither constraint is evaluated; it is recorded inskipped_constraintsand the verdict is null. Written as members of ansh:orlist, which is the form 153 of the 154sh:classoccurrences and 153 of the 274sh:nodeKindoccurrences in the recovered shapes take, the whole disjunction is recorded inskipped_constraintsand the verdict is null. So the fix turns most of this corpus from a false clean into an explicit undetermined rather than into 287 findings.sh:datatyperejected a correctly typed literal for derived numeric types."1024"^^xsd:nonNegativeIntegerfailedsh:datatype xsd:nonNegativeInteger, whilexsd:integer,xsd:decimalandxsd:stringall passed. Eight-line repro in the standalone repository'stests/test_engine_findings.py. The store does not preserve these datatype IRIs, so the constraint is now recorded inskipped_constraintsand the verdict is null instead of a false violation. The underlying store defect and the workaround are written up indocs/UPSTREAM_ISSUES.md.
A third defect belongs to rdflib 7.6.0, which raises UnboundLocalError from
plugins/parsers/jsonld.py:242 on a scalar JSON-LD document rather than producing the
empty graph the specification calls for.
Reproducing
git clone https://github.com/fabio-rovai/dcat-us-binding
cd dcat-us-binding && pip install -e '.[dev]' && make build && make test
Then the engine leg:
printf 'load build/corpus.expanded.ttl\nshacl build/dcat-us-3.0-shapes.ttl\n' \
| open-ontologies batch -