Skip to content
Alpha: see what works today →
Menu

The Rust Bridge's tests

The newest run on main of the tests of cascade-bridge-rs, read as a tree of package, capability and situation, each with what it is for and each case linked to its source. Failures come first within a capability, and the levels that hold one are open.

All 514 cases pass · commit a0f59bd · · 135.62 s · the run 514 passed 0 skipped

cargo nextest over every crate. For an agent: cascade-bridge-rs.ctrf.json.

The Cascade Bridge for Rust, which converts a health document into a graph of records with an adapter. This page is what its command, cascade-bridge, and its Node host do for whoever runs them.

Glossary
accounting entry (accounting entries)
one line of the source accounting: a source path and its verdict.
adapter (adapters)
here, a folder that teaches the Bridge one source format: its `ro-crate-metadata.json`, the schema of the source, the SPARQL queries that map it, and a test manifest with fixtures.
address (addresses)
here, a finding's selector and its refinement together: the place in the document it is about.
allowlist
the list, `package/imports.txt`, of the functions the WebAssembly module may import from its host.
applicator (applicators)
a JSON Schema keyword that applies other schemas to a value, such as `properties` or `items`.
arrival (arrivals)
here, the node that says how a version reached the pod: its document, its selector and the import.
authority
the part of an IRI between `//` and the next `/`: empty in `file:///C:/dev`, a server's name in `file://server/share`.
blank node (blank nodes)
a node of a graph that has no IRI of its own, written `_:` and a label in Turtle.
body
what a finding says: an IRI naming the rule or gap.
Bridge
the Cascade Bridge: the engine that runs adapters. This repository is the one written in Rust.
budget (budgets)
a limit a caller puts on a conversion's time or memory; a conversion that outgrows it is stopped.
builtin (builtins)
a function SPARQL defines, such as `STR` or `CONCAT`.
calls file (calls files)
a JSON file listing calls to make on the Bridge's library, case by case; the Bridge specification's tooling writes one to test a Bridge.
census
the Bridge's count of every path a record carries, held against the accounting.
checkout (checkouts)
a copy of a git repository's files in a folder.
committed adapter
the tiny adapter as checked in, with no file rewritten by the test.
compiled (compiles, compile, compiler)
said of a query the Bridge turned into a plan of its own instead of evaluating it generally.
concept map
a file of the adapter listing the source's values and the concept each maps to.
crate (crates)
here, the adapter's `ro-crate-metadata.json` (an RO-Crate), which names every file of the adapter. Not a Rust crate.
declines (declined)
of the compiler: does not compile a query, which the general evaluator then runs.
detect query
the query an adapter names as `bridge:detectQuery`, which answers whether a document is one the adapter claims.
document (documents)
one file in a source format, such as an XML or JSON export, that an adapter converts.
EARL
the W3C's Evaluation and Report Language, a vocabulary for writing test results as a graph. https://www.w3.org/TR/EARL10-Schema/
ECMA 262
ECMAScript, the standard that defines the regular expressions JavaScript and JSON Schema use.
engine
here, the Bridge's library, the part that converts; a host calls it.
entry (entries)
one test of an adapter's test manifest: an input, what is expected of it, and the type of test that says how to judge it.
envelope (envelopes)
a way an adapter declares of reading a document into records (for one item, for a list of them); an adapter may declare several, each named by an IRI in its `ro-crate-metadata.json`.
executor (executors)
which way the Bridge runs an adapter's queries: `compiled` (its own plans), `spareval` (the general evaluator) or `both`.
facts
here, what a caller knows about a document that the document does not say, such as where it was pulled from, given beside it as a Turtle file with `--facts`.
finding (findings)
here, one thing a conversion noticed about a document and did not put in the graph: a part of the source the mapping could not carry over, or something the vocabulary's shapes refuse.
findings query
a query of an adapter that constructs findings.
gap (gaps)
a path the vocabulary has no term for yet, as the adapter's gap scheme declares it, with a kind and a severity.
gap scheme
the adapter's file of the gaps it declares.
general evaluator
the stock SPARQL evaluator the Bridge falls back to for a query it cannot compile; correct, and slower.
gives up (given up, give-ups)
of a plan: stops on data it cannot answer rightly, and the general evaluator answers instead.
graph (graphs)
a set of statements in RDF; a conversion's output is one.
host (hosts)
here, a program that reads folders and files and hands their bytes to the Bridge's engine, which touches no filesystem itself: the native command and the Node script are the two.
identity entry (identity entries)
a test entry that says whether two records are one.
index
here, the lookup structure a compiled query builds over a document before it runs; the general evaluator builds none.
IRI (IRIs)
an identifier in the form of a web address, such as `file:///C:/dev/adapter/`.
join (joins)
the combining of two sets of answers by the values they share.
JSON Pointer
the IETF syntax (RFC 6901) that names a value of a JSON document by its path, such as `/items/1`.
label (labels, labelled)
here, the name a blank node carries in the text of a graph, such as `_:b0`.
library
what the Bridge offers a program that loads it: five operations (describe, load, ask, convert, test), bytes in and bytes out. `load` takes an adapter's files, and a vocabulary's, and holds them for the calls after it, so a `convert` made before any `load` has nothing to work with. `cascade-bridge library` is the command that makes calls on it from a file.
lift (lifts, lifted)
the generic graph the Bridge makes of a record's XML or JSON, which the mappings query.
literal (literals)
a plain value in a graph or a query, such as a string or a number, as against a name that is an IRI.
lookup (lookups)
here, an accounting entry's naming of a concept map that its path's values are looked up in.
map (maps)
here, the files of a folder as the engine is given them: each file's bytes under its path inside the folder.
mapping (mappings)
a SPARQL query of an adapter that turns part of a source document into statements of the graph.
measure
one number a benchmark run writes, under a name, with a kind: `clock` (a time), `cost` (a count of work done) or `output` (a count of what came out).
mebibyte (mebibytes)
a megabyte counted in powers of two: 1,048,576 bytes.
MINUS
the SPARQL pattern that removes the answers that match another pattern.
miss (misses)
a value a record holds that the concept map lacks.
motivation
why a finding was written, as Web Annotation names it (`oa:classifying`).
N-Triples
a W3C text format that writes a graph one statement to a line, every IRI in full. https://www.w3.org/TR/n-triples/
outcome (outcomes)
how an entry ended, in EARL's words: `passed`, `failed`, `cantTell` (the Bridge cannot judge this type of test), `untested` (not run) or `inapplicable`.
Oxigraph
the SPARQL engine the Bridge is built on; its evaluator is the general evaluator.
percent-encoded
written as `%` and two hexadecimal digits for each byte, as a space is written `%20` in an IRI.
plan (plans)
here, the steps the Bridge compiled a SPARQL query into, which it runs in place of evaluating the query generally.
prefix (prefixes)
a short name declared for the start of an IRI, so `sh:Violation` stands for `http://www.w3.org/ns/shacl#Violation`.
profile
here, how the package was built (`release` or a faster-to-build variant), which a benchmark result records. Not `--profile`, the flag, which is code.
prologue
the start of a SPARQL query, which declares its prefixes and base IRI.
record
here, one unit of a source document that an adapter converts on its own, such as one item of a catalog or one entry of a clinical document.
refinement (refines, refined)
the second part of a finding's address: the step from the record down to the node.
report
here, the result of `test` written as EARL: one outcome for each entry of the adapter's test manifest.
results directory
the folder `library` writes into: for the call at position n of a case, `<case>/<n>.json` and, where the call returned them, `<n>.graph`, `<n>.findings` or `<n>.report`.
row (rows)
one answer of a SPARQL query: the values it gives its variables.
selector (selectors)
where a record or a node stands in its document, as an XPath (XML) or a JSON Pointer (JSON).
SERVICE pattern
the clause of SPARQL that sends part of a query to another server; the Bridge fetches nothing, so it refuses a query holding one.
severity
how much a finding matters, as SHACL names it: `sh:Info`, `sh:Warning`, `sh:Violation`.
shapes
the vocabulary's requirements on what a record, a judgment or a file of a pod must state, written in SHACL, the W3C language for checking data. https://www.w3.org/TR/shacl/
skeleton
the lift of the document around its records: the attributes and childless children of the elements above them.
source accounting (accounting)
an adapter's list of every path of the source format and what the adapter does with it.
SPARQL
the W3C language for querying a graph.
specification
the Cascade Bridge Specification, which says what every Bridge must do; its vectors are inputs with the output every Bridge must give.
stage (stages)
one step of loading an adapter or converting a document that the Bridge times apart: reading the queries, lifting the document, mapping, serialising.
step (steps)
here, one `name[index]` part of an XPath.
sub-delimiters
the characters ``!$&'()*+,;=``, which an IRI may hold unencoded.
surrogate (surrogates)
half of a pair of UTF-16 code units that together write one character; alone, it is no character.
table (tables)
here, a small graph that every record of a document shares, which a query of the adapter constructs once from the document.
tally
the last line `test` prints: how many entries ended with each outcome.
test manifest (test manifests)
the file of an adapter that lists its tests.
tilde
the character `~`, which a JSON Pointer writes `~0`.
tiny adapter
the small adapter in `crates/bridge/tests/tiny-adapter` that these tests convert with (and `tiny-json-adapter`).
trap (traps)
a fault that stops a WebAssembly module at once, as a panic stops a native program.
tree
the compiled executor's index of one record's lift.
triple (triples)
one statement of a graph, made of three parts: what it is about, what it says of it and the value it gives.
Turtle
a W3C text format for writing a graph; the command writes its graph and its findings in it unless `--format ntriples` asks otherwise. https://www.w3.org/TR/turtle/
unbound
of a SPARQL variable: given no value by the pattern.
usage
the lines a command prints to say which commands and flags it takes.
userinfo
the part of a URL before its host: `user:password@`.
vector (vectors)
an input and the exact output the specification fixes for it.
verdict (verdicts)
here, what an accounting entry says the adapter does with its path.
version (versions)
what a record says at one time.
vocabulary (vocabularies)
cascade-vocabulary, the project that defines the words health data is written in, the requirements every pod meets, and a set of ready-made questions. https://ns.cascadeprotocol.org/cascade#
WebAssembly (wasm)
a portable binary format; the Bridge's engine built as WebAssembly runs under Node and in a browser.
well formed
of XML: following the syntax rules, whether or not a schema accepts it.
whitespace
spaces, tabs and line breaks.
the W3C namespace for links between parts of XML documents, such as `xlink:href`.
XML Schema (XSD)
the W3C language that says which documents of a format are valid; its files end in `.xsd`.
XPath
the W3C language that names a node of an XML document by its path, such as `/catalog/item[1]`.
Build and packaging 25 passed