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.
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.
- 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.
- xlink
- 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]`.
No entry matches.
Describing an adapter before loading it describe(), Description 4 passed
A host asks what an adapter is, and which of its files `load` will read, from the adapter's metadata file alone. A host that reads files over a network then fetches only those.
Source crates/bridge/tests/library.rs
`describe(adapter_iri, metadata)` 4 passed
- passed returns the adapter's identifier, version, source media type and envelopes66 ms
- passed lists in `load_files` every query and no fixture, each a file the adapter holds71 ms
- passed lists in `crate_files` the test manifest75 ms
- passed lists in `vocabulary_files` the vocabulary's files the adapter names140 ms
Loading an adapter from maps of files load(), Named, Files, Loaded 22 passed
A host hands the Bridge an adapter, and the vocabulary it writes in, as maps of files held in memory; the Bridge reads no disk. `load` refuses, by the file's name, an adapter it could not convert with.
Source crates/bridge/src/resolver/boundary.rs, crates/bridge/src/run/adapter_files.rs, crates/bridge/src/run/output_validation.rs, crates/bridge/src/syntax.rs, crates/bridge/tests/library.rs
`load(adapter, vocabulary)` 2 passed
given a file the adapter names and its map lacks 5 passed
- passed names the map and the path of a file inside it that it lacks10 ms
- passed refuses by its name a mapping the adapter's metadata names and the adapter lacks75 ms
- passed names once a file the metadata or its accounting names and the adapter lacks236 ms
- passed fails with `Missing`, naming the adapter's map and the mapping's path, and loads once the mapping is added268 ms
- passed fails with `Missing`, naming the vocabulary's map and the file's path, and loads once the file is added367 ms
given a path that leaves the adapter 4 passed
given a vocabulary 4 passed
given a file of the adapter that does not parse 3 passed
- passed refuses by its name a schema that is not well formed78 ms
- passed refuses by its name a manifest that is not Turtle74 ms
- passed refuses by its name a table that is not Turtle73 ms
given the adapter's source media type 4 passed
Keeping a query from fetching load() 16 passed
A mapping is a SPARQL query, and SPARQL can ask another server (`SERVICE`) or name a dataset to fetch (`FROM`). `load` refuses an adapter holding such a query, so converting a person's records never reaches the network.
Source crates/bridge/src/run/fetching.rs
given a query holding a `SERVICE` pattern 11 passed
- passed refuses a mapping holding a service pattern75 ms
- passed refuses a findings query holding a service pattern inside filter exists140 ms
- passed refuses a mapping holding a service pattern inside a subquery74 ms
- passed refuses a mapping holding a service pattern inside optional76 ms
- passed refuses a mapping holding a service pattern inside union97 ms
- passed refuses a mapping holding a service pattern inside minus109 ms
- passed refuses a mapping holding a service pattern inside graph67 ms
- passed refuses a mapping holding a service pattern inside a bind of exists145 ms
- passed refuses a mapping holding a service pattern inside having74 ms
- passed refuses a mapping holding a service pattern inside order by105 ms
- passed refuses a detect query holding a service pattern77 ms
given a query holding a `FROM` clause 3 passed
- passed refuses a mapping holding a from clause75 ms
- passed refuses a mapping holding a from named clause103 ms
- passed refuses a detect query holding a from clause139 ms
given a query that only mentions them 2 passed
Converting a document Loaded::accepts(), Loaded::convert(), Conversion 12 passed
One loaded adapter converts any number of documents, each to a graph of records and a graph of findings about the document. The document is named by the IRI the host gives, so nothing written names a file on the host's disk.
Source crates/bridge/src/annotation.rs, crates/bridge/src/rdf/serialising.rs, crates/bridge/src/run/address.rs, crates/bridge/tests/library.rs
given records that write the same triple or label a blank node alike 5 passed
- passed keeps two executions that labelled a blank node alike apart9 ms
- passed keeps one execution's blank node one node10 ms
- passed writes a triple every record constructs once95 ms
- passed keeps two records blank nodes apart161 ms
- passed keeps two records apart when they were handed one label180 ms
`convert(document)` 6 passed
- passed produces the one-rooted document's graph and no address report for a document with two roots182 ms
- passed returns no findings unless asked, and the same graph whatever is asked144 ms
- passed returns the census only where asked, and every other finding only where the findings are246 ms
- passed converts each of two documents to the graph a fresh load gives419 ms
- passed converts the next document as a fresh load does, after a document that failed306 ms
- passed names no `file:` IRI in the graph or the findings, and the document by the IRI the host gave246 ms
`accepts(document)` 1 passed
Reading an XML document as records Loaded::convert() 19 passed
The Bridge lifts XML into a generic graph that the mappings query, one tree for each record: each element the adapter's envelope names. A record carries a selector, an XPath that finds its element again in the document.
Source crates/bridge/src/lift/attachment.rs, crates/bridge/src/lift/xml/encoding.rs, crates/bridge/src/lift/xml/selector.rs, crates/bridge/src/lift/xml/vectors.rs
given a base64 attachment 2 passed
given a document's encoding 2 passed
given a record's selector 7 passed
- passed writes a step for every element down to a record below the document element12 ms
- passed numbers a record among its own parent's children of that name10 ms
- passed counts a sibling of another name towards neither10 ms
- passed names an element in a namespace where no prefix can be bound11 ms
- passed names an element in no namespace under one in a namespace by its name10 ms
- passed writes a record that is the document element as one step with no index9 ms
- passed returns the document's own selector, else the envelope's root element, else any element8 ms
given the specification's lift vectors 3 passed
given a document split into records 5 passed
- passed lifts each record with the record as root, and keeps only its attributes and childless children in the skeleton12 ms
- passed refuses a document ending with an element still open before its skeleton is read9 ms
- passed treats a document whose document element is the record as one record12 ms
- passed normalises an attribute value as xml does whatever the checkout11 ms
- passed writes a record out with the comments and instructions it held9 ms
Reading a JSON document as records Loaded::convert(), Document::envelope 25 passed
A JSON document is lifted the same way. An envelope's record path says which objects are records, and a record's selector is a JSON Pointer.
Source crates/bridge/src/json/addressing.rs, crates/bridge/src/json/tests.rs, crates/bridge/src/lift/json/tests.rs, crates/bridge/src/lift/json/vectors.rs, crates/bridge/src/run/json_source.rs
given a JSON Pointer 6 passed
- passed spells a pointer as this bridge writes it and reports one that selects no node10 ms
- passed writes a pointer in its fragment representation and reads it back9 ms
- passed selects through a repeated name each node, a null, and an array's item by its index, as RFC 6901 writes it9 ms
- passed reads a percent escape only as two hex digits8 ms
- passed writes an arrival's selector in a json document as a fragment selector conforming to json pointer138 ms
- passed writes an arrival's selector value with a key's tilde slash space and non ascii character escaped76 ms
given JSON text 7 passed
- passed keeps every member of a repeated name in document order8 ms
- passed keeps a number as the document writes it8 ms
- passed refuses a lone surrogate and what rfc 8259 does not allow8 ms
- passed refuses a byte order mark8 ms
- passed gives a value the span of its text in the document8 ms
- passed refuses a document whose value is neither an object nor an array8 ms
- passed refuses a json document that is not json108 ms
given an envelope's record path 5 passed
- passed reads a record path in the subset and refuses one outside it8 ms
- passed selects as records only the objects a path reaches10 ms
- passed counts an array's items at its path and addresses the first9 ms
- passed gives each json record its pointer and the table every record of its document constructs80 ms
- passed gives a json document's own value the empty pointer111 ms
given more than one envelope 5 passed
- passed reads a document in an envelope naming its member's value before one naming none9 ms
- passed reads a document in the envelope named whether or not it admits it9 ms
- passed splits nothing where no envelope admits the document8 ms
- passed reads a json document in the envelope naming its member's value before one naming none84 ms
- passed reads a json document in the envelope named whether or not another admits it73 ms
given the specification's JSON lift vectors 2 passed
Naming records and their versions Facts, Document::facts 25 passed
A record's name is computed from what the source says, so one record met in two documents gets one name; a version is what the record says at one time. Facts are what the host knows of an import that the document does not say, such as the server it came from.
Source crates/bridge/src/harness.rs, crates/bridge/src/records.rs, crates/bridge/src/records/vectors.rs, crates/bridge/src/records/written.rs
given the facts a host supplies 5 passed
- passed leaves out of a conversion only the agent of the association that has a plan13 ms
- passed loads the facts the document's server and name and the record's selector into each record's dataset96 ms
- passed loads the table every record of the document constructs beside each record99 ms
- passed keeps the roles a mapping writes on an association of the document's generating act beside the supplied facts97 ms
- passed refuses facts that supply a base url with userinfo10 ms
given a version a mapping writes 7 passed
- passed refuses a version whose iri carries a fragment9 ms
- passed refuses a version of two records9 ms
- passed reads one version where a mapping writes the same specialization of a record twice13 ms
- passed refuses a version holding a blank node10 ms
- passed refuses a version naming another version10 ms
- passed names each version a mapping constructs from its literals as written102 ms
- passed leaves a graph without a version as the mapping wrote it9 ms
given a version written twice in one document 5 passed
- passed says about each version it drops which version was kept and where the dropped one arrived from11 ms
- passed finds a dropped arrival's selector when the selector node is named10 ms
- passed removes a dropped version, its arrival and the references to it, and keeps the kept version's facts and the label of a node that referred to the dropped one10 ms
- passed keeps a blank node only itself refers to where no version is dropped10 ms
- passed warns about each version it drops naming the kept one where the dropped one arrived from99 ms
given the specification's naming and versioning vectors 4 passed
- passed computes every naming vector that names a query with that query run by oxigraph357 ms
- passed normalises every base url vector79 ms
- passed refuses a base url with a facts sentence that never echoes the url or its secret parts67 ms
- passed reduces every versioning vector to its expected graph and to its expected version names and content28 ms
given a version's arrival 4 passed
- passed folds each version's arrival into one node naming its selector its document and the import98 ms
- passed keeps the selector a mapping wrote on an arrival and adds none97 ms
- passed keeps an arrival's last update in the source's own text101 ms
- passed leaves a version's last update as its name was hashed over97 ms
Findings about a document Conversion::findings() 21 passed
A finding is a Web Annotation that says something about a place in the source document. Its target names the document, the record and the node within it, so a reader can show the place.
Source crates/bridge/src/run/finding_bodies.rs, crates/bridge/src/run/findings.rs, crates/bridge/src/run/selector.rs
given a findings query 10 passed
- passed passes a findings query's body motivation and value through unchanged87 ms
- passed names the document the record was read from where the query named this record293 ms
- passed moves the query's selector under the record's own position336 ms
- passed gives every annotation a record selector of its own329 ms
- passed gives each note of a record a finding at that note's own address215 ms
- passed selects the record itself for a query that writes no selector204 ms
- passed gives each annotation targeting the record itself its own target and selector and names the document as source422 ms
- passed keeps the description of a node in a target the query names from outside it194 ms
- passed gives two annotations the query pointed at one target a record selector each261 ms
- passed writes a namespaced document and its record by local name and namespace in a finding's selector143 ms
given any finding the Bridge writes 1 passed
- passed gives every finding it writes a body that is an iri441 ms
given a findings query whose annotation cannot be targeted 4 passed
given a finding's severity 6 passed
- passed takes the concept's severity where the query's template wrote none326 ms
- passed takes sh info where neither the query's template nor the concept says269 ms
- passed takes sh info for a body the gap scheme does not declare263 ms
- passed takes sh info for an annotation the query gave no body279 ms
- passed keeps the severity the query's template wrote over the concept s260 ms
- passed takes the concept's severity whichever way round a template wrote two bodies435 ms
Checking where a finding points Conversion::findings() 18 passed
A finding's address is an XPath or a JSON Pointer within its record. The Bridge follows every address it is given, and reports one that does not select exactly one node while still producing the graph.
Source crates/bridge/src/json/addressing.rs, crates/bridge/src/run/address.rs, crates/bridge/src/run/json_source.rs, crates/bridge/src/xpath.rs
given an address in a JSON record 2 passed
given an address in an XML record 7 passed
- passed reports an address that selects no node and produces the graph all the same181 ms
- passed reports an address that selects more than one node94 ms
- passed reports an address that is no xpath at all95 ms
- passed reports an address two findings of one record share once for each record98 ms
- passed follows an address through what the graph leaves out266 ms
- passed reports an address that leaves the record339 ms
- passed reports nothing for any input the adapter committed2.49 s
given how an address is spelled 4 passed
- passed spells a record as the lift wrote its selector22 ms
- passed spells the node an address reaches however it was written20 ms
- passed selects no node for an address that leaves the record and spells one inside it alike taken or alone20 ms
- passed spells an attribute of a record by the element that carries it20 ms
given character data around markup 5 passed
- passed reads character data either side of a reference as one text node21 ms
- passed reads character data either side of a section as one text node20 ms
- passed reads character data either side of a comment as two text nodes20 ms
- passed reads character data either side of an instruction as two text nodes22 ms
- passed counts a text node made only of space as a node21 ms
Validating a document against the adapter's XML Schema Loaded::convert() 30 passed
An adapter may carry the source format's schema. A record that fails it is still converted, and the failure is a finding at the record's position that names the W3C rule broken.
Source crates/bridge/src/run/finding_bodies.rs, crates/bridge/src/run/validation.rs, crates/bridge/src/validate/xsd.rs, crates/bridge/src/validate/cda.rs
given a schema failure's finding 6 passed
- passed names w3c's rule and the child the parent's content model refuses154 ms
- passed indexes an offending element among its own siblings of that name108 ms
- passed names the specification's concept for a failure w3c names no rule for114 ms
- passed names a rule of part two for a value its simple type refuses160 ms
- passed selects the offending element under the document element85 ms
- passed writes a namespaced offending element as a step no prefix is needed for143 ms
given a record and its schema 4 passed
- passed converts a record that fails its schema and reports it at that record's position192 ms
- passed reports nothing about a document both its schemas accept102 ms
- passed reports a value matching a branch of its pattern at only one end101 ms
- passed reports nothing about a record carrying a comment and an instruction273 ms
given a schema that includes or imports another 12 passed
- passed refuses a schema that includes a file outside the adapter87 ms
- passed applies an included schema under a root that is not a file187 ms
- passed reports nothing about a record whose schema imports the xml namespace with no schema location130 ms
- passed reports nothing about a record whose schema imports the xml namespace from w3c112 ms
- passed reports nothing about a record whose schema imports xlink from a remote address126 ms
- passed reports nothing about a record whose schema imports the xml namespace from a file the adapter lacks111 ms
- passed reports nothing about a record whose schema imports xlink from a file the adapter lacks170 ms
- passed reports nothing about a record whose schema imports the xml namespace from the adapter137 ms
- passed applies the adapter's own schema of the xml namespace over the bridge s106 ms
- passed refuses a schema that imports another namespace from a remote address139 ms
- passed applies two included schemas whose paths differ only before a colon segment172 ms
- passed refuses an xml schema named with a fragment93 ms
given a C-CDA document 3 passed
given how a schema file is named 5 passed
- passed names a file iri the same whatever its slashes and dots and keeps a urn as is17 ms
- passed names an iri of any scheme the same after xsd schema resolved it as a path18 ms
- passed names two iris apart that differ only before a colon segment of their path18 ms
- passed gives a document a utf 8 declaration in place of another or where it had none17 ms
- passed keeps a leading instruction whose target only begins with xml20 ms
Validating a JSON document against its schema Loaded::convert() 14 passed
A JSON adapter's schema is JSON Schema draft-06, which FHIR publishes. Each failing keyword is a finding at the node it fails at.
Source crates/bridge/src/run/json_source.rs, crates/bridge/src/validate/json_schema/tests.rs
given an envelope's schema 4 passed
- passed validates a json document against its envelope's schema at the document's value72 ms
- passed validates a record against the subschema its envelope's schema fragment names resolving refs in the whole document105 ms
- passed validates a record read in an envelope naming no schema against the adapter s100 ms
- passed refuses a source schema whose fragment names no subschema107 ms
given a JSON Schema keyword 7 passed
- passed reports each failing keyword by its draft 06 section at the node it fails at13 ms
- passed reports an applicator whose subschema is false at the place of the applicator itself9 ms
- passed reports one of any of not and contains as themselves18 ms
- passed compares numbers by value and counts one point zero an integer9 ms
- passed asserts no format9 ms
- passed reads a pattern as ecma 262 does9 ms
- passed compiles the pattern keyword alone and no pattern member of a value9 ms
given a `$ref` 2 passed
given a schema in another draft 1 passed
- passed refuses a schema written in another draft24 ms
Accounting for every path of a source record Conversion::findings() 16 passed
An adapter's source accounting lists each path of the source format and what the adapter does with it. A path a record carries and the accounting omits is reported, so nothing in a person's export is dropped in silence.
Source crates/bridge/src/run/source_accounting.rs
given a path the accounting omits 5 passed
- passed reports a path the accounting omits as an info classifying annotation at its first occurrence with no count131 ms
- passed reports a path a record carries five times once addressed at the first148 ms
- passed counts only its own record's nodes where two records carry the path126 ms
- passed reports a path two records carry once in each140 ms
- passed names the census body the specification fixed and no other181 ms
given where the finding points 4 passed
- passed ends an attribute's path in its own name and refines onto the element it stands on165 ms
- passed refines onto every step below the record down to the one the path ends at99 ms
- passed gives an element the one position in a schema finding and in a census finding98 ms
- passed writes a namespaced path as the lift writes a step of a record's own address264 ms
given a path the accounting lists 2 passed
given an adapter with no accounting, or one that cannot be read 5 passed
- passed leaves a crate that names no accounting the findings it has today1.05 s
- passed refuses an accounting that does not parse where an absent one is read in silence385 ms
- passed refuses an accounting the crate names and nothing answers to334 ms
- passed reports every path of a record for an empty accounting where an absent one reports none354 ms
- passed refuses a source path that is no literal where dropping it would report the path89 ms
Reporting the gaps an adapter declares Conversion::findings() 34 passed
An accounting entry may say its path has no home in the vocabulary yet: a gap, declared in the adapter's gap scheme with a kind and a severity. The Bridge reports each such path a record carries, so the vocabulary's maintainers see what real exports hold.
Source crates/bridge/src/run/entry_gaps.rs
given a record carrying a path whose entry names a gap 9 passed
- passed reports a path a record carries three times once at the first counting three100 ms
- passed carries no count on a finding for a path the record carries once93 ms
- passed counts only its own record's nodes where two records carry the path103 ms
- passed writes the count as an xsd integer107 ms
- passed reports a path once, valued with the entry's source path, however many nodes carry it95 ms
- passed gives a reported gap's finding the gap as its body, `oa:classifying` as its motivation and the input file as its source172 ms
- passed reports a gap of every kind that is true of the path244 ms
- passed reports a gap beside the finding a query constructs at the same node100 ms
- passed reports a gap once for an entry writing its path twice194 ms
given where the finding points 3 passed
- passed addresses an attribute's finding at the element it stands on128 ms
- passed refines an attribute of the record element no further150 ms
- passed writes a namespaced path as the census writes it for the same node120 ms
given a gap's severity 1 passed
given a gap that reports nothing 8 passed
- passed writes nothing for a gap of a kind true of only some of the occurrences at a path267 ms
- passed writes no finding whose body is a gap the committed adapter declares under a kind that does not report173 ms
- passed writes nothing for a verdict that names no gap92 ms
- passed leaves a crate whose entries name no gaps the findings it has today90 ms
- passed reads a verdict written twice as the one verdict it is90 ms
- passed reads no verdict and no gap from a subject that is no path entry89 ms
- passed reports from a verdict that names a gap and from no other whatever kind it names548 ms
- passed asks nothing of the scheme about a gap named by a verdict that names none91 ms
given a gap scheme or an entry that cannot be read 13 passed
- passed refuses a gap scheme that does not parse85 ms
- passed refuses a gap scheme the crate names and nothing answers to83 ms
- passed refuses a gap declaring a severity the specification does not name84 ms
- passed refuses a gap declaring two severities88 ms
- passed refuses a gap declaring a severity that is no iri86 ms
- passed refuses a gap the scheme declares with no kind85 ms
- passed refuses an entry naming a gap the scheme does not declare84 ms
- passed refuses a verdict that is no iri82 ms
- passed refuses a named gap that is no iri88 ms
- passed refuses a gap declaring two kinds84 ms
- passed refuses an entry declaring two verdicts85 ms
- passed refuses an entry naming two gaps82 ms
- passed refuses a source path that is no literal wherever it stands85 ms
Reporting values a concept map lacks Conversion::findings() 24 passed
An entry may name a concept map, the table a mapping looks a source value up in. A value the map lacks is reported where the record first holds it, so an adapter's author learns which codes real exports use.
Source crates/bridge/src/run/lookup_misses.rs
given a value the map lacks 7 passed
- passed reports a value no concept of the scheme carries at that value's first occurrence162 ms
- passed counts the nodes of the record holding that value and carries no count for one219 ms
- passed reports two different unmapped values at one path twice sorted by value95 ms
- passed reports each spelling of one key the map lacks as the record wrote it95 ms
- passed reports a miss once for an entry writing its path twice94 ms
- passed looks a value up in the one scheme the named file holds93 ms
- passed reports a value a no break space pads though the map holds the unpadded key158 ms
given a value that is no miss 3 passed
given where the finding points 3 passed
given the finding's body and severity 4 passed
- passed gives a lookup finding the gap the entry's lookup names as its body, `oa:classifying` as its motivation and the input file as its source124 ms
- passed takes the severity the gap declares and sh info where it declares none198 ms
- passed reads a lookup whatever the entry's verdict is681 ms
- passed reports a lookup finding beside the gap the same entry names and a query constructs101 ms
given a lookup that cannot be read 7 passed
- passed refuses an entry declaring a lookup in and no gap for its misses107 ms
- passed refuses an entry naming a gap for misses and no map to look in111 ms
- passed refuses an entry whose lookup names a gap the gap scheme does not declare103 ms
- passed refuses an entry whose lookup names a gap of a kind other than value not mapped369 ms
- passed refuses an entry declaring two maps or two gaps for its misses231 ms
- passed refuses a concept map that does not parse87 ms
- passed refuses a concept map holding two concept schemes or none225 ms
Validating the graph against the vocabulary Loaded::convert(), Conversion::unvalidated 6 passed
Where the host hands over the vocabulary, each record's graph is checked against the vocabulary's shapes and ontologies. What fails is a finding, so a pod is never handed a graph nobody checked without being told.
Source crates/bridge/src/run/output_validation.rs
given a record's graph 5 passed
- passed makes one finding of a failed shape result and still produces the graph the shape refused132 ms
- passed names a focus node that is an iri and leaves a blank one unnamed109 ms
- passed makes a finding of its own of each of two results about one record112 ms
- passed reports a predicate no ontology declares and leaves rdf type and the bridge's own alone165 ms
- passed reports prov qualified attribution as undeclared on each record and nothing for a qualified association with roles213 ms
given a shape 1 passed
- passed refuses a shape whose severity no finding can carry190 ms
Writing the graph and the findings Conversion::graph(), Conversion::findings(), Format 9 passed
A conversion is written as Turtle or N-Triples, byte for byte the same in every run. Findings can be written relative to the file they will be saved in, so a folder of results can be moved.
Source crates/bridge/src/rdf/serialising.rs, crates/bridge/src/rdf.rs, crates/bridge/src/records/written.rs
`findings(format, relative_to)` 5 passed
- passed writes no reference that resolves anywhere but the iri it was made from9 ms
- passed reads a percent encoded dot segment as a name and not a step9 ms
- passed names a document beside the file by the way up and back down to it9 ms
- passed names in full every iri the file cannot name relative to itself9 ms
- passed writes the same findings graph as turtle as it does as n triples2.71 s
`graph(format)` 4 passed
- passed counts the triples the written graph holds264 ms
- passed declares no prefix that is only a path of an iri the graph names96 ms
- passed writes turtle with the names the mapping gave the namespaces it used94 ms
- passed writes the same quads in the same order in two conversions189 ms
Telling whose failure an error is Error, ErrorKind 5 passed
Every failure says whose it is: the document's, the facts', the adapter's, the vocabulary's, a missing file's, or the Bridge's own. A host tells a person "this file is damaged" and sends an adapter's failure to its author.
Source crates/bridge/src/budget/tests.rs, crates/bridge/tests/library.rs
`kind()` 5 passed
- passed returns `Bridge` for a stopped convert, and the explaining stage's kind for any other fault8 ms
- passed returns `Document` for a document that does not parse110 ms
- passed returns `Facts` for facts that do not parse176 ms
- passed returns `Adapter` for a mapping that does not parse70 ms
- passed returns `Vocabulary` for a vocabulary file that does not parse118 ms
Stopping a convert at its budgets Budgets, ConvertOptions, Loaded::convert_with() 8 passed
A host gives a convert a time budget and a memory budget. A convert that passes either is stopped as a failure of the Bridge that names the budget, and the adapter converts the next document as before.
Source crates/bridge/src/budget/tests.rs, crates/bridge/src/run.rs, crates/bridge/tests/library.rs
given a time budget 5 passed
- passed stops a convert past its time budget at its next check of the time8 ms
- passed stops a query under either executor, and converts the next document unstopped12 ms
- passed stops a convert past its time budget even when no query is left to notice9 ms
- passed stops a convert past its time budget as a failure of the Bridge, naming the adapter and the budget100 ms
- passed converts the same graph afterwards as an adapter loaded again479 ms
given a memory budget 2 passed
given a convert within its budgets 1 passed
Choosing how queries are executed Executor, Loaded::explain(), Fallback 20 passed
The Bridge runs a query with its own compiled executor where the compiler reads it, and with the general evaluator (Oxigraph's) where it does not. The graph is the same either way; `Executor::Both` runs both and refuses a difference.
Source crates/bridge/src/compiled/tests.rs
given a query the compiler compiles 9 passed
- passed answers each key as the general evaluator does21 ms
- passed answers as the general evaluator does where the data tells a wrong plan apart18 ms
- passed answers each construct a mapping query uses with rows and as the general evaluator does537 ms
- passed answers each builtin as the general evaluator does and names the three whose answer is empty294 ms
- passed answers nothing where the general evaluator answers nothing20 ms
- passed answers an exists that shares no variable afresh for each tree30 ms
- passed returns the tuples of an answer that agree with the bound key and those that leave it unbound9 ms
- passed runs a subquery that reads nothing from the rows it joins once for the tree31 ms
- passed answers two plans that each remember an exists alike on one tree17 ms
given a query the compiler declines 3 passed
given a query a plan gives up on 2 passed
given `Executor::Both` 3 passed
- passed runs a query both ways and answers where they agree12 ms
- passed names the query and the triple where the two executors differ16 ms
- passed converts each tiny adapter alike under every executor483 ms
`explain()` 3 passed
Measuring a load and a convert load_skipping(), Loaded::convert_profiled(), Stage, Skip 10 passed
For finding where time goes: a profiled convert times each stage and counts each query's executions, and an adapter can be loaded to skip a stage. What a skipping adapter converts says so, and is not a validated conversion.
Source crates/bridge/src/run/skips.rs, crates/bridge/tests/library.rs
`convert_profiled(document)` 6 passed
- passed times every stage and query within the convert and nothing where profiling is off157 ms
- passed converts to the graph and findings `convert` gives220 ms
- passed counts each query's executions: one per record, and one for the detect query122 ms
- passed reports a nonzero row count for the item mapping160 ms
- passed returns no stage times from a plain load or a plain convert170 ms
- passed times serialising last, and only once the graph is written125 ms
`load_skipping(adapter, vocabulary, skips)` 4 passed
- passed leaves out a skipped stage's findings, and keeps the graph and every other finding786 ms
- passed loads nothing a skipped stage would have run, where a default load loads it642 ms
- passed names in `Conversion::skipped` each skip once, and nothing for a default load142 ms
- passed times a load made with `load_skipping`122 ms
Running an adapter's test manifest test(), TestOptions, TestReport 29 passed
An adapter carries a manifest of test entries, each a source document and what converting it must give. `test` runs them and returns an EARL report (the W3C format for test results), which the compatibility run and the adapters page read.
Source crates/bridge/src/harness/identity.rs, crates/bridge/src/harness/manifest.rs, crates/bridge/src/harness.rs, crates/bridge/src/run/adapter_files.rs, crates/bridge/src/run/address.rs, crates/bridge/src/run/json_source.rs, crates/bridge/tests/library.rs
`test(adapter, vocabulary, options)` 8 passed
- passed counts a finding produced twice and expected once as one extra9 ms
- passed gives each entry of the manifest the outcome it is built to have234 ms
- passed fails the shapes entry whose finding goes missing without a vocabulary173 ms
- passed times at least one entry and offers only the `sparql-1.1` profile170 ms
- passed says what differed in the words of the comparison171 ms
- passed runs nothing when the adapter requires a profile this bridge does not offer226 ms
- passed fails every entry when the adapter names no element name of each record77 ms
- passed passes every entry of the tiny json adapter121 ms
given an identity entry 4 passed
- passed passes where two documents name one record and the result says they are one111 ms
- passed passes where two records of one document are two and the result says so99 ms
- passed fails where the names break the relation the result states118 ms
- passed fails a conversion that names other than one record174 ms
given the EARL report 5 passed
- passed reports one earl assertion per entry its outcome on the test result168 ms
- passed reports an entry written as a blank node by its name108 ms
- passed reports a literal entry instead of leaving it out100 ms
- passed names no `file:` IRI, and each entry under the adapter's IRI257 ms
- passed names this Bridge at its own version423 ms
given a manifest that cannot be read 3 passed
given an entry that expects an address 9 passed
- passed passes a record address spelled another correct way165 ms
- passed passes a refinement spelled another correct way167 ms
- passed fails an address that selects another node of the same document160 ms
- passed passes a refinement of a text node spelled another correct way166 ms
- passed passes a refinement of the record itself spelled another correct way166 ms
- passed fails an entry whose refinement leaves the record148 ms
- passed fails an entry whose address selects no node146 ms
- passed fails an entry whose address selects several nodes152 ms
- passed fails an entry whose expected address selects several nodes159 ms
Converting a document with an adapter cascade-bridge convert 10 passed
`convert` turns one source document into a graph of records with an adapter, and prints on standard error what it converted. Its exit status is all a calling program learns: 0 with the graph written, 2 with nothing on standard output.
[engine/command.md](https://github.com/the-cascade-protocol/cascade-bridge-spec/blob/main/engine/command.md#convert)
Source crates/bridge-cli/tests/cli.rs
- passed writes to standard output the graph the adapter expects of the document172 ms
- passed leaves the working directory as it was, and prints no `Graph` line, where no file is named150 ms
with `--out <file>` 1 passed
with `--format ntriples` 1 passed
- passed writes the same graph as N-Triples228 ms
with `--envelope <iri>` 2 passed
with `--time-budget-seconds <n>` 1 passed
when it has converted the document 3 passed
- passed prints `Adapter` and the adapter's identifier344 ms
- passed prints `Document`, the document's IRI and its count of records235 ms
- passed prints `Detect true` for a document the adapter's detect query claims219 ms
Writing a conversion's findings to a file --findings 8 passed
Findings are what a conversion noticed about a document: what the mapping could not carry over and what the vocabulary's shapes refuse. `--findings <file>` writes them beside the graph, in a form an adapter commits as the findings it expects of that document.
Source crates/bridge-cli/tests/cli.rs
- passed writes the findings the adapter expects of the document200 ms
- passed names the document relative to the file, so a checkout at another path reads the same findings213 ms
- passed writes each IRI of the findings under a declared prefix, `oa:` and `sh:` among them200 ms
- passed writes the same findings as N-Triples with `--format ntriples`299 ms
- passed writes to standard output the graph it writes without the flag281 ms
- passed prints `Findings` and the file's path, then `Graph` and its path, last on standard error208 ms
when the findings file cannot be written 2 passed
- passed exits 2 naming the file196 ms
- passed writes no graph to standard output195 ms
Validating against a checkout of the vocabulary --vocabularies 5 passed
An adapter names the vocabulary files its output must satisfy, each a `bridge:vocabularyFile`; `--vocabularies <directory>` is a checkout that holds them. Without it nothing is validated, so `test` refuses, and `convert` writes the graph and says it went unvalidated.
Source crates/bridge-cli/tests/cli.rs
with `--vocabularies <directory>` 1 passed
- passed writes to `--findings` what the checkout's shapes draw on the graph191 ms
given an adapter that names vocabulary files, and no `--vocabularies` 4 passed
- passed refuses to `test`, with status 2, naming `bridge:vocabularyFile` and the flag141 ms
- passed converts to the graph the adapter expects166 ms
- passed says on one line that the graph was not validated, with the count of vocabulary files and the flag185 ms
- passed refuses `--findings`, with status 2, writing neither the file nor a graph187 ms
Running an adapter's tests cascade-bridge test 8 passed
`test` runs every entry of an adapter's test manifest and prints each entry's outcome; an adapter's CI runs it. It exits 1 where an entry failed.
[engine/command.md](https://github.com/the-cascade-protocol/cascade-bridge-spec/blob/main/engine/command.md#test)
Source crates/bridge-cli/tests/cli.rs
- passed prints the adapter, then this Bridge and its version, before any entry397 ms
- passed prints a line for each entry, its outcome first345 ms
- passed prints a tally of the outcomes last379 ms
- passed exits 1 when an entry fails469 ms
with `--earl <file>` 2 passed
- passed writes the report to the file, an outcome for each entry435 ms
- passed prints `EARL` and the file's path last304 ms
with no `--earl` 1 passed
- passed writes no file358 ms
with `--fallbacks <file>` 1 passed
Reading how an adapter's queries will run cascade-bridge explain 3 passed
The Bridge compiles an adapter's SPARQL queries into plans of its own, and runs a query it cannot compile on a slower general evaluator. `explain` prints each query's plan, or why it has none, so an adapter author sees what a query will cost before running it.
Source crates/bridge-cli/tests/cli.rs
- passed prints `Query` and each query's path inside the adapter258 ms
- passed prints the plan of a query it compiles, a step to a line286 ms
- passed prints `evaluated:` and the reason for a query it does not compile254 ms
Measuring a conversion --profile, --skip 8 passed
`--profile` prints where a conversion's time went, and `--skip` leaves out a check so the rest can be timed. A run that skips is a measurement, not a validated conversion, and says so.
Source crates/bridge-cli/tests/cli.rs
with `--profile` 4 passed
- passed prints `Load` and `Convert`, each with its time169 ms
- passed prints a line for each stage: `loadQueries`, `lift`, `mapping` and `serialising`168 ms
- passed prints a line `other`, for the time no stage counted390 ms
- passed prints a line for each query: how often it ran, what it returned, its time, and whether it was compiled252 ms
with `--skip <check>` 3 passed
- passed warns `MEASUREMENT ONLY` on standard error, naming each check it skips157 ms
- passed prints `Skipped` and the checks, once it has converted213 ms
- passed refuses `--findings`, with status 2, writing no file13 ms
with neither flag 1 passed
- passed says nothing of a measurement166 ms
Telling why a command stopped cascade-bridge 19 passed
A command that cannot do what it was asked exits 2 and says why on standard error, after `cascade-bridge: `. Arguments it cannot parse get the usage instead.
Source crates/bridge-cli/tests/cli.rs
given arguments it cannot parse 15 passed
- passed prints the usage, which offers `--vocabularies` on `test`, `convert` and `explain`13 ms
- passed refuses a command it does not know12 ms
- passed refuses `test` with no adapter10 ms
- passed refuses a flag with no value12 ms
- passed refuses a flag it does not know11 ms
- passed refuses `--format rdfxml`12 ms
- passed refuses `--memory-budget-mib 0`12 ms
- passed refuses `--memory-budget-mib x`10 ms
- passed refuses `--memory-budget-mib 0.5`11 ms
- passed refuses `--memory-budget-mib 4096`11 ms
- passed refuses `--time-budget-seconds -1`11 ms
- passed refuses `--time-budget-seconds never`10 ms
- passed refuses `--executor fast`13 ms
- passed refuses `--skip everything`11 ms
- passed refuses a third argument to `library`13 ms
given a file it cannot read 2 passed
- passed names the document, after `cascade-bridge: `171 ms
- passed names the `--facts` file, writing no graph173 ms
given an adapter and a document that are both wrong 1 passed
when standard output closes before the graph is written 1 passed
- passed exits 2 saying `standard output`, with no panic184 ms
Naming a file by its IRI file_iri(), path_to_file_iri(), file_iri_to_path() 8 passed
The command names an adapter, a document and its facts by `file:` IRIs, and a finding names its document by one. Both hosts must write a path's IRI alike, as Node writes it for a real path, or a findings file written on one host names a document the other cannot find.
Source crates/bridge-cli/tests/file_iri.rs
`path_to_file_iri(path)` 3 passed
`file_iri_to_path(iri)` 4 passed
`file_iri(path)` 1 passed
Running the commands on Node hosts/node/cascade-bridge.mjs 17 passed
The same engine, built as WebAssembly, runs under Node behind a host that offers the native command's commands. Each case runs one command on both hosts and compares them, because a graph must come out the same wherever it is converted.
Source crates/bridge-cli/tests/node_host.rs
given a document the adapter converts 4 passed
- passed writes the graph and the findings the native command writes983 ms
- passed writes the findings the native command draws from the vocabulary's shapes1.01 s
- passed prints on standard error what the native command prints677 ms
- passed reports for each entry of `test` the outcome the native command reports1.05 s
given no `--vocabularies` 3 passed
given an adapter whose files are unusually named or placed 3 passed
given an adapter whose schema imports the XML namespace 2 passed
- passed answers the import itself where the adapter has no `xml.xsd`989 ms
- passed validates with the adapter's own `xml.xsd` where it has one1.06 s
given an adapter neither host can load 3 passed
- passed refuses a mapping holding a `SERVICE` pattern, naming the query and the clause658 ms
- passed names a mapping that is missing once, by its IRI650 ms
- passed names a mapping that is a directory once, by its IRI612 ms
when something outside the adapter fails 2 passed
- passed exits 2 saying `standard output` when standard output closes764 ms
- passed exits 2 saying a fault in the Bridge when the engine traps69 ms
Answering a calls file for conformance cascade-bridge library 9 passed
`library` makes each call a calls file lists on the Bridge's library and writes what each returned into a results directory; the specification's tooling runs its library cases through it. It judges nothing.
[engine/command.md](https://github.com/the-cascade-protocol/cascade-bridge-spec/blob/main/engine/command.md#library)
Source crates/bridge-cli/tests/cli.rs, crates/bridge-cli/tests/node_host.rs
- passed writes `{}` for a `load` that held, and the answer for an `ask`146 ms
- passed writes the graph a `describe` or a `convert` returned, and the findings a conversion drew316 ms
- passed writes no findings for a conversion with no vocabulary179 ms
- passed writes a failure's kind for a call that failed332 ms
- passed writes the map and the path of a file a map lacks147 ms
- passed writes nothing for a `convert` made before any `load`14 ms
- passed writes the report a `test` returned362 ms
given the node host 1 passed
when a result cannot be written 1 passed
Measuring conversions for the benchmark hosts/node/bench.mjs 24 passed
`bench.mjs` converts documents on Node and writes a result file of measures in the form the specification's `bench/result.schema.json` gives. An engine's speed over time is drawn from these files, so a measure keeps its name and its kind.
Source crates/bridge-cli/tests/node_host.rs
- passed writes each measure under its input's name, of the kind the schema gives it1.99 s
- passed counts the triples `convert` reports for the same document2.29 s
- passed writes the quad count and the SHA-256 of the canonical N-Quads of each output1.77 s
- passed writes the same output digests whichever executor converts5.01 s
- passed records the cpu model and the other load it was told of1.84 s
- passed records the build profile and the commit of the package it measured1.78 s
- passed exits 1 where a record's query falls back to the general evaluator, naming the measure1.70 s
with `--glossary <file>` 6 passed
- passed gives each stage a sentence and names only a row of the specification's stages as its specification stage7 ms
- passed gives every name it writes a sentence from the specification's glossary or the engine's1.63 s
- passed refuses a run that writes a stage the engine's glossary has no sentence for, naming the row2.08 s
- passed gives the manifest's description of an input to the row of its first convert2.31 s
- passed writes rows without a description for a manifest that describes no input2.06 s
- passed refuses an undescribed input when the manifest describes another, naming it680 ms
given N-Triples to digest 2 passed
with `--executor <name>` 3 passed
with `--inputs <manifest>` 3 passed
with `--baseline-adapter <directory>` 1 passed
given an input it cannot measure 2 passed
Passing the specification's own adapters cascade-bridge test 2 passed
The Bridge specification ships two small adapters whose test manifests hold an entry of every test type. A Bridge that passes them judges an adapter's tests as the specification says, so these run the whole of each through `test`.
crates/bridge-wasm/src/lib.rs 1 passed
Build and packaging 25 passed
The package's imports, held to the allowlist package/check-imports.mjs 2 passed
Source crates/bridge-cli/tests/node_host.rs
- passed passes on the package's module265 ms
- passed names the import an allowlist one entry short leaves out139 ms
Rules this repository keeps crates/bridge/tests/rules.rs 5 passed
Checks of the repository itself, which `CLAUDE.md` cites by name.
Source crates/bridge/tests/rules.rs
given the repository's files 5 passed
- passed pins every dependency to an exact version or a git rev16 ms
- passed meets a real adapter only through the compatibility run73 ms
- passed meets the specification's synthetic adapter only through its vector36 ms
- passed names no filesystem outside its test fixtures20 ms
- passed names the sentence body nowhere in the crates31 ms
Third-party test documents, as published crates/bridge/tests/cda 1 passed
HL7's example documents are held byte for byte as published, less the AMA's CPT descriptors.
Source crates/bridge/src/validate/cda.rs
given HL7's files 1 passed
Workings no caller sees crates/bridge/src 17 passed
Checks of private functions whose outcome no public function shows. They are not part of the contract.
Source crates/bridge/src/compiled/scope/tests.rs, crates/bridge/src/compiled/tests.rs, crates/bridge/src/measure.rs, crates/bridge/src/query.rs, crates/bridge/src/run.rs, crates/bridge/src/xpath.rs
`scope` 5 passed
- passed works out what a pattern binds in every row and in some row12 ms
- passed declines nothing where a group reads what it binds or what only the groups around it bind and it does not11 ms
- passed works out what a filter reads as unbound10 ms
- passed works out where a bind joins and where it binds in every row10 ms
- passed starts an exists body with the row it runs on less what is hidden7 ms
`BUILTINS` 1 passed
- passed names each builtin once12 ms
`Stopwatch` 4 passed
- passed takes a stage entered inside another out of the outer stage's time60 ms
- passed adds a stage run again to its time, and returns the times in stage order14 ms
- passed runs the work and keeps nothing when it is off8 ms
- passed names the stage entered last of those running as the one a query runs in8 ms
`prologue_prefixes()` 4 passed
`prepare()` 1 passed
- passed reads each query of the adapter once per prepare100 ms
`xpath` 2 passed