The runtime's tests
The newest run on main of the tests of cascade-runtime-js, 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.
npm test, node:test over every package. For an agent: cascade-runtime-js.ctrf.json.
What each package promises · 9 packages, 188 capabilities
cascade-runtime 1107 passed 1 skipped
cascade-runtime 1107 passed 1 skippedcascade-runtime 0.0.0 · commit 326fc39 · unreleased: what main does today, not a compatibility promise
The library an app calls to import a person's health records into their pod, store them, and query them.
Glossary
- About
- a judgment that its member, an export's patient, is the subject, so every record naming that patient is the subject's.
cascade:About - absence (absences)
- what a reply says the records lack: the codes and words a record of it would carry (`match`), what was looked through (`coverage`), and the tool call (`query`) or the files (`sources`) that looked.
- act (acts)
- one thing done to a pod that writes files to it: an import, an entry session, a connection to a hospital's server, or a run of the matcher.
prov:Activity - activity
- on a call's result, the name of the act the call made.
- adapter (adapters)
- the program that converts an export into records; `import` loads it on first use.
- address (addresses)
- a pod's identifier, made once when the pod is made: `pod://`, a random UUID and a slash.
- answer (answers, answered, answering)
- the rows a question returns from a pod.
- the one-time code that arrives at the redirect URI from a sign-in, which `connect()` trades for the token.
- backed (backs)
- of an absence, borne out by what was looked through; an absence that is not comes back with `backed: false` and a `reason`.
- Binary
- FHIR's resource that wraps a file's bytes, base64-encoded.
- brands bundle (brands bundles)
- the list of the hospitals that use a vendor's system, as the vendor publishes it in SMART's User-access Brands format: a FHIR Bundle of Organizations, each pointing to the endpoint its records are served from.
https://hl7.org/fhir/smart-app-launch/brands.html - builder (builders)
- a program that builds a reference table on the app's own machine from its publisher's release, as is needed where a licence keeps a feed from publishing the rows.
- bundler (bundlers)
- a program, such as Vite or esbuild, that joins an app's modules into the files a web page loads.
- C-CDA
- Consolidated Clinical Document Architecture: HL7's standard for the XML summary documents patient portals hand out.
- CapabilityStatement
- FHIR's resource in which a server says what software it is and what it supports, served at `<FHIR base>/metadata`.
https://hl7.org/fhir/R4/capabilitystatement.html - cell (cells)
- one tab-separated value on a line of a compact read, under the column name the view's first line gives.
- citation (citations, cite, cites, cited)
- where a fact points (`cite`): a view entry, a FHIR resource in a download, or a line of one. In a reply about downloads it also gives, field by field, what the fact says the record there holds.
- claim (claims, claimed, claiming, unclaimed)
- to say that an export's patient is the owner: the owner claims a profile by filing an About judgment. A patient no one has claimed is unclaimed, and its records are stored but shown in no answer.
cascade:About - ClinVar
- the public archive, kept by the US National Library of Medicine, of how laboratories classify variants, from benign to pathogenic; one of the reference tables.
cascade:VariantClassifications - ClinVar ID (ClinVar IDs)
- the number ClinVar gives one variant, which a pod holds as `clinvarVariationId`.
- code system (code systems)
- a published list of codes for one kind of thing, such as RxNorm for medicines, LOINC for lab tests and SNOMED CT for clinical findings.
- coding expression
- a variant written in HGVS notation against a gene's transcript, such as `NM_000249.3:c.2042C>T`.
cascade:hgvsCodingDnaExpression - combination (combinations, combination product)
- a medicine with more than one active ingredient, such as a tablet of lisinopril with hydrochlorothiazide.
- compact read (compact reads)
- the whole pod as tab-separated text, which the `ask` tool returns a part at a time when called with `format: "compact"`; each line is one row of a view, its cells separated by tabs.
- connection (connections)
- one sign-in of one person at one hospital's server. `connect()` returns it as a `Connection`, good for one pull; `pod.connect()` stores the pod's record of it.
cascade:ConnectToServer - criticality
- how dangerous a reaction to an allergen could be, as a source states it: `low`, `high` or `unable-to-assess`.
cascade:allergyCriticality - current version (current versions)
- of a series, the version a pod opened now is given: the newest one the app has kept.
cascade:defaultTableVersion - custodian (custodians)
- the organisation that keeps a document and answers for its true copy.
cascade:CustodianRole - dateIs
- on a lab change's `medication`, which of its days the change is placed on: `start of use`, `end of use` or `prescription written`.
- demo hospital (demo hospitals)
- a pretend hospital with made-up patients, from the package cascade-sandbox, which an app or a test signs in to and pulls from with no account and no network; Cascade North and Cascade South are two.
- Different
- a judgment that its members are separate things; it overrules a Same of the two.
cascade:Different - directory (directories)
- the list of hospitals an app offers a person to connect to: one row for each hospital, with its name, the vendor of its system, its FHIR base and the places it serves.
- DocumentReference (DocumentReferences)
- FHIR's resource for a document a hospital holds about a patient, such as a clinical note or a C-CDA document: it points to the document by URL, or carries it inline.
cascade:ClinicalNoteOrDocument - download (downloads)
- a file of a person's records as a hospital's server or portal gave it, before any import: FHIR resources in JSON, or a C-CDA document.
- drug class (drug classes, class, classes, classed)
- a group of medicines that work alike or are built alike, such as ACE inhibitors, as the US Food and Drug Administration assigns them.
cascade:DrugClasses - entry point (entry points)
- a name an app imports the package by: `cascade-runtime`, or one with a path after it, such as `cascade-runtime/check`. The browser entry point is the build of `cascade-runtime` that a bundler gives a web page in place of Node's.
- entry session (entry sessions)
- one call of `pod.enter()`: the act that files what the owner typed, as one owner-entered record or several, under a `urn:uuid:` name the app makes once.
- Erroneous
- a judgment that its members are wrong; they are left out of every answer.
cascade:Erroneous - export (exports, exported)
- what a person downloads of their own records: an Apple Health export, or a C-CDA document from a patient portal.
- fact (facts)
- one record an item rests on: what the model says of it, and where it is.
- feed (feeds)
- a published list of the versions of reference tables, which an app reads to find newer ones.
- FHIR
- Fast Healthcare Interoperability Resources: HL7's standard for health records as JSON.
https://hl7.org/fhir/R4/ - FHIR base (FHIR bases)
- the URL of a hospital's FHIR server; each record there is at `<FHIR base>/<type>/<id>`.
cascade:serverBaseUrl - field (fields)
- one kind of thing a record says: its `value`, `unit`, `status`, `code`, `name` or `id`, a date (`date`, `start`, `end`, `recorded`), or its text (`text`, from which a `quote` is taken).
- finding (findings)
- something the matcher noticed about a pod's records and filed for the owner to answer with a judgment.
cascade:FindingForReview - guide
- `guide/AGENTS.md`, the document the package ships for a developer, or a coding agent, who is building an app on a pod.
- handle (handles)
- a compact read's short name for a view entry: a letter for its view, then the first eight or more hexadecimal digits of the view entry's name, such as `L41e35923`. `ask` takes a list of them in `entries` to return only those view entries' rows.
- head
- the snapshot of this app's latest act in a pod.
- header (headers)
- the one file of a sealed pod left readable, `settings/encryption.json`, which says how the pod is sealed.
- host (hosts)
- the app's code that runs the tools for a model and gives them the functions they reach pods through (`PodReads`); in Node, `podReads()` makes one.
- index (indexes, index by code)
- a file kept beside a version of a reference table that says which rows each code finds, so that the rows need not all be read.
- interpretation (interpretations)
- a laboratory's flag on a result, such as `H` for high.
cascade:resultInterpretationCode - item (items)
- one point of a reply, with what it rests on.
- join (joins, joined)
- of a record, to be put with the records of a view entry by a judgment, a Same or the matcher's; the view entry is then named for its least record, so its name, and the handle made from it, changes.
- judgment (judgments, judge, judges, judged)
- a conclusion about records, made by a person or by a machine.
cascade:Judgment - kept answer (kept answers)
- an answer to a named question saved beside the pod's folder, and returned again while nothing it was worked out from has changed.
- kit (kits)
- a story and the exports it uses, which the vocabulary carries for testing, such as `alex-rivera`.
- lab change (lab changes)
- a difference between one lab test's results before and after the day a medication started or stopped, as `findChanges()` reports it; it says what moved and never why.
- label (labels)
- of a series, its name as a person reads it, such as 'Vaccine groups'; a feed gives it and a check updates it.
- launcher
- the SMART Health IT launcher, `launch.smarthealthit.org`: a public test hospital on the internet, kept by the SMART project, which this project did not write.
- lens (lenses)
- a choice of which judgments count when a question is answered: `everyday` is the default, and `export` is stricter, for records sent elsewhere.
- lookup (lookups)
- what the reference tables say about one code, such as its name.
- loopback
- the machine's own network interface, `127.0.0.1`. An app with no server of its own gives a redirect URI there, and `loopbackSignIn()` listens on it for the hospital's redirect.
- map (maps, mapped)
- of a table row, to give for one code the code it stands for in another series.
- matched
- on a call's result, the result of the matcher's run that followed it.
- matcher (matchers)
- the part of a runtime that compares a pod's records and writes a Same for those its rules find to be one thing, such as one allergy reported by two sources.
cascade:CascadeMatcher - matcher judgment (matcher judgments)
- a Same the matcher wrote for records its rules found to be one thing; it names the version of each reference table it used.
- member (members)
- a record a judgment is about.
prov:hadMember - model (models)
- a language model that an app lets answer a person's questions about their records.
- model context
- `document.modelContext`, the browser API proposed as WebMCP through which a web page offers tools to a model the browser runs.
- named question (named questions)
- a query the vocabulary carries under a name, such as `pod/My active allergies`.
- narrative
- the part of a C-CDA document written for a person to read, as table rows, list items and paragraphs, beside its coded records; a narrative line or row is one of those.
cascade:narrativeText - OID
- the dotted number by which a C-CDA document names a code system, such as `2.16.840.1.113883.6.1` for LOINC.
- OperationOutcome
- FHIR's resource for a server's warning or error message; it is no record of the patient.
- order of preference
- for a table kind, the series an app reads first when several hold a code, set as `preference`; a code's name comes from the first series in it that names the code.
- Organization (Organizations)
- FHIR's resource for a hospital, a clinic, a laboratory or another body that gives care.
cascade:Organization - origin (origins)
- the scheme, server name and port of a URL, such as `https://hospital.example`: what a browser treats as one site.
- owner (owners)
- the person who keeps a pod and decides what its records mean; in every pod on this page, the subject acting for themselves.
- owner-entered record (owner-entered records)
- a record the owner typed in themselves and filed with `pod.enter()`, such as an allergy they know they have; no source holds it, and being the owner's own it needs no claim.
- pack (packs)
- one file holding all of a sample's files, so a page fetches them at once.
- packed package (packed)
- the package as `npm run build:package` makes it for publishing: its compiled code, its browser build and the vocabulary and adapters it carries. A source checkout is not packed.
- panel (panels)
- a set of lab tests reported together, such as a thyroid panel.
- parent snapshot (parent, parents)
- the snapshot that an act's snapshot names as the one before it; a pod's first snapshot has none.
- partial date (partial dates)
- a date that gives only a year, or a year and a month.
- patient (patients)
- the person an export's records are about, as that source knows them, before anyone has said who they are in the pod.
cascade:PatientProfile - PKCE
- Proof Key for Code Exchange, RFC 7636: the part of a sign-in by which a public client shows, at the token exchange, that it is the app that began the sign-in. `connect()` always uses its S256 method.
https://www.rfc-editor.org/rfc/rfc7636 - plan (plans)
- what a pull asks a hospital for: a list of searches, each for one type of resource, and the types to read by id when a record names one that no search returned (`backfill`).
- pod (pods)
- one person's records, and what that person has said about them, kept as files in one folder.
- precise ingredient (precise ingredients)
- a particular form of an ingredient, such as lisinopril anhydrous of lisinopril, which some medicine products are tied to.
cascade:hasPreciseIngredient - product ingredients
- the reference table that gives each medicine product its active ingredient, from RxNorm.
cascade:ProductIngredients - profile (profiles)
- one source's record of its patient, which the owner claims; `claimedProfiles` and `unclaimedProfiles` list them.
- public client (public clients)
- an app that can keep no password of its own, as one that runs in a browser or on a person's own machine cannot; every app this package signs in is one.
- pull (pulls, pulled, pulling)
- the records one patient has at one hospital, as `pull()` fetched them in one go, with the FHIR base they came from and when; also the fetching itself.
- record (records)
- one thing said about a person's health, such as an allergy, a medication or a lab result.
cascade:Record - recorded date (recorded dates)
- when a record was written down, as against when the thing it records happened: a C-CDA record's author time, a report's issue time.
- redirect URI (redirect URIs)
- the app's own URL to which a hospital sends the person's browser when the sign-in is over.
- reference range (reference ranges)
- the span of values a laboratory calls normal for a test, printed beside a result.
cascade:referenceRangeText - reference tables (reference table)
- public code lists, such as RxNorm for medicines, that tell a runtime when two codes mean one thing.
cascade:ReferenceSeries - Refusal
- the error thrown when the package declines a request it understood, such as a name it does not have; it has written nothing.
- refused
- on a call's result, why a rule turned the call down; a refused call wrote nothing.
- registration (registrations)
- who the app is to a hospital's vendor: its client id, which is the name the vendor knows it by, its redirect URI, and the scopes it asks for, which say what it may read.
- reply (replies)
- a model's answer to a person's question about their records, as JSON.
- reply contract (contract, contracts)
- the form a reply must take: an `answer`, a `short` form of it, and `items`. `replySchema` is its JSON Schema, and `replyErrors()` lists where a reply departs from it.
- report (reports)
- one laboratory's classification of one of a person's variants, as a pod holds it; `pod.agreement()` compares each with ClinVar. (A hospital server's `serverReport()` is another thing: what the server says of itself.)
- resource (resources)
- one record in FHIR, named by its type and its id, such as `Observation/ldl-1`.
- retraction (retractions, retract, retracts, retracted)
- the owner taking back a judgment they filed: the judgment stays in the pod and no longer counts.
prov:invalidated - review status
- ClinVar's statement of how well a classification is supported, such as `criteria provided, multiple submitters, no conflicts`.
cascade:clinvarReviewStatus - row (rows)
- one line of a table: of a view, what one view entry holds, a cell per column; of a reference table, what it says of one code or variant.
- rule (rules)
- a numbered requirement in the vocabulary that every runtime must meet, such as A14 in `runtime/arrivals.feature`; a heading on this page links the rules its API reaches.
- rule list (rule lists)
- the vocabulary's list of what the matcher compares, each line naming a query and the table kind it reads; it has versions, as a reference table has.
cascade:RuleListRow - runtime (runtimes)
- software that reads and writes pods as the vocabulary requires; this package is one.
- Same
- a judgment that its members are one thing, so answers show them once.
cascade:Same - sample (samples)
- a kit's pod saved as files a web page can read.
- sandbox story (sandbox stories)
- a made-up patient at a demo hospital whose records were written to show one outcome, such as a lab result that falls after a medication starts, with that outcome written down beside them.
- schema (schemas)
- a description, in JSON Schema, of what a tool's input may hold: its properties, the type of each, which are required, and the values or bounds each allows (`enum`, `minimum`, `maximum`).
https://json-schema.org/ - sealed (seal, seals)
- of a pod or a file, encrypted on disk so that only the secret opens it.
- search (searches)
- one request to a hospital for a patient's records of one type, such as Condition; a plan lists them, and a hospital may answer a search a page at a time.
- search list (search lists)
- a version's codes and their names kept as one file beside its rows, which a search reads.
- secret (secrets)
- the six words that open an encrypted pod; `sixWords()` draws them from the EFF long word list, a public list of 7,776 easy-to-type words.
- series
- one of the reference tables across its versions, such as RxNorm's product ingredients.
cascade:ReferenceSeries - 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/ - signal (signals)
- the AbortSignal an app passes to connect() or pull() and aborts to stop it.
- SMART configuration
- what a hospital's server publishes at `<FHIR base>/.well-known/smart-configuration`: where its sign-in page and its token exchange are, and what they support.
- SMART on FHIR
- the standard by which an app signs a person in to a hospital and is then let read that person's records: OAuth 2.0 as HL7's SMART App Launch profiles it for FHIR servers.
https://hl7.org/fhir/smart-app-launch/ - snapshot (snapshots)
- the set of files a pod held as one act left it, which names the snapshot before it as a git commit names its parent.
cascade:Snapshot - source (sources)
- one hospital server, or one document, whose records an export holds.
- source's short name (sources' short names, source's short names)
- a compact read's name for a source: `S1`, `S2` and so on, each listed with who wrote it.
- SPARQL
- the W3C query language for data written as statements, as Turtle writes them; `pod.ask()` runs an app's own SPARQL SELECT.
https://www.w3.org/TR/sparql11-query/ - starter copies (starter)
- the reference tables as the package carries them, which a new app uses until it has read a feed.
- step (steps)
- one scripted action on a pod, such as making it, an import, an entry session or a judgment, named by a letter and a number such as `J10`.
- store
- where an app keeps its reference tables: the folder `.tables/` beside its pods in Node, a database in a browser.
- story (stories)
- the steps taken with one made-up patient's exports, in order.
- structured output
- a model provider's feature that makes a model reply in a given JSON Schema; providers take only some of JSON Schema's keywords.
- subject (subjects)
- the person a pod is about.
cascade:Subject - submitter (submitters)
- a laboratory that sent ClinVar its classification of a variant.
- table kind (table kinds)
- what a reference table's rows say, such as product ingredients or vaccine groups; the vocabulary declares each kind.
cascade:TableKind - table search (search the tables, table searches)
- to find the codes of a series whose name holds the text asked, as `tables.search()` does, a page at a time.
- template (templates)
- Turtle with blanks, given in the guide, which an app fills in with what a person typed or decided and passes to `pod.enter()` or `pod.judge()`.
- term (terms)
- one word the vocabulary defines, named by an IRI, a web-style identifier such as `https://ns.cascadeprotocol.org/cascade#allergenName`.
- tie
- codes, words, a day and a kind of record that the caller holds an absence to as well as the absence's own, passed as `tied`; the evals take them from their answer key.
- token (tokens, access token)
- the access token a hospital issues when a person signs in: the key the package sends with each request for that person's records. `connect()` keeps it where the app's code cannot read it.
- token exchange
- the request in which `connect()` trades the authorization code for the token.
- tool (tools)
- a function a model may call: a name, a description, a JSON Schema for its input, and the code that runs it.
- tool call (tool calls)
- one run of a tool by a model: the tool's name, the input it was given, whether it succeeded, and what it returned.
- Turtle
- a W3C text format for writing statements in the vocabulary's terms; `pod.enter()` and `pod.judge()` take it.
https://www.w3.org/TR/turtle/ - Unopened
- the `Refusal` thrown when a pod does not open with the secret given, or with none; its `outcome` gives the reason, such as `incorrect secret`.
- variant (variants)
- a difference in one of a person's genes from the reference sequence, as a genetic test reports it.
cascade:GeneticVariantFinding - verdict
- the column of `pod.agreement()`'s rows saying how a report stands to ClinVar: `agrees` when its classification is among the row's, `differs` when the row holds another, and none when ClinVar cannot say.
- verify (verifies, verified)
- to check a version's rows, once fetched, against the checksum the feed gives for them and against the version's own name, which is worked out from the rows.
- version (versions)
- what a record says at one time; when a source changes a record, the pod keeps the old version and adds a new one. (Of a reference table or the runtime, "version" has its everyday meaning.)
cascade:version - view (views)
- a pod's records of one kind, such as medications, as its judgments leave them: one line for each thing however many sources reported it. A named question such as `pod/My medication history` returns a view's rows.
cascade:View - view entry (view entries, entry, entries)
- one thing in a view, such as one medication or one lab result: the records that are one thing, shown as one. A row names it in `entry`, by an IRI that ends in `#` and 64 hexadecimal digits.
cascade:inEntry - 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# - withdrawn (withdrew, withdraws)
- of a record, said by its own source not to be so: refuted, ruled out, entered in error, negated or nullified.
No entry matches.
Opening a pod openPod() 4 passed
`openPod` makes a new pod in a folder, or in memory when no folder is given. Everything else an app does starts from the pod it returns.
Source pod-links.test.ts, pod.test.ts
given a link in a pod's folder, or in the folder of its answers, to a folder outside it 1 passed
- passed gives each new pod an address of its own: `pod://`, a random UUID and a slash1 ms
- passed gives an owner and files that all lie under its address41 ms
- passed throws for a folder that holds files but no pod, leaving the folder as it was0 ms
Looking into an export before importing pod.look() 6 passed
`look` lists an export's sources and saves nothing, so an app can say whose records an export holds before it imports them. An Apple Health export holds the records of every hospital the person's phone is connected to; a C-CDA document is a summary file from one patient portal.
Source pod.test.ts
given an Apple Health export 2 passed
given a C-CDA document 2 passed
given files the app holds in memory 1 passed
given a pod that has imported before 1 passed
Importing a health export pod.import() 20 passed
`import` stores an export's records in the pod. They show in answers only once the owner has claimed the export's patient, and the matcher then joins records of the same thing from different hospitals.
Rules runtime/arrivals.feature A14 conformance/alex-rivera/alex-rivera.feature P8 conformance/alex-rivera/alex-rivera.feature P24 Source pod.test.ts
when nobody has claimed the export's patient 4 passed
- passed returns the import as `activity`, with the files it stored in `wrote`0 ms
- passed returns the export's patient in `unclaimedProfiles` and nobody in `claimedProfiles`0 ms
- passed shows none of the export's records in answers0 ms
- passed shows them once the owner claims the patient with `pod.judge()`0 ms
given a claim the owner retracted, and a later import naming the same patient 1 passed
given the owner's NotAbout over the export's patient, and a later import naming it 2 passed
given a pull that names three patients 1 passed
with `claimProfiles`, the list of the patients the person confirmed 2 passed
with `claimProfiles` naming both of Alex's patients, on each of his exports 2 passed
with `match: false` 1 passed
- passed skips the matcher, which a later `pod.match()` runs0 ms
with `timeBudgetSeconds` or `memoryBudgetMiB`, the limits of a conversion 1 passed
with no `timeBudgetSeconds`, the time a conversion may take by the size of its document 1 passed
with `onProgress` 3 passed
- passed reports four parts in order: `loading the adapter`, `converting`, `saving`, `judging`0 ms
- passed counts upward through the documents it converts and the claims it records0 ms
- passed throws the callback's own error when the callback throws at its first call, with no file added to the pod's folder37 ms
given files that are not an export 2 passed
Recording a hospital connection pod.connect() 2 passed
When an app signs a person in to a hospital's server, `connectFiles()` saves what the server said about itself, and `connect` stores that in the pod. From these records the matcher can tell that a hospital which moved its server to a new address is still one hospital.
Rules runtime/arrivals.feature A16 runtime/matcher.feature M20 Source pod.test.ts
Asking a pod questions pod.ask() 6 passed
`ask` answers a named question, or the app's own SELECT query in SPARQL (the W3C query language), as rows of plain strings. It answers under a lens, `everyday` unless the app names another.
Source pod.test.ts
- passed answers a named question with a string for each column and an array of strings for each column the vocabulary declares a list25 ms
- passed gives a query of its own's columns as strings, whatever their names1 ms
- passed ends a list column's value at every declared separator, so a value's own '; ' stays in it0 ms
- passed runs the app's own SELECT under the lens named, and returns none of the `export` lens's rows when none is named49 ms
- passed throws, listing the names there are, for a question or a lens the vocabulary doesn't have0 ms
- passed throws for a query that is not a SELECT0 ms
Names for vocabulary terms terms, codeStems 3 passed
`terms` and `codeStems` are a hand-kept copy of the vocabulary's IRIs inside the package, so an app never types one. These checks hold the copy to the vocabulary.
Source terms.test.ts
terms 2 passed
Entering a record by hand pod.enter() 3 passed
A person can add a record no hospital holds, such as an allergy they know they have. The app writes the record in Turtle from a template in the guide, and because it is the owner's own, it needs no claim.
Rules runtime/arrivals.feature A12 runtime/arrivals.feature A14 conformance/alex-rivera/alex-rivera.feature P16 Source pod.test.ts
- passed returns the entry session as `activity` and the matcher's run on it as `matched`0 ms
- passed shows the record in answers with no claim0 ms
- passed returns `refused`, with nothing written, for Turtle the pod's rules turn down0 ms
Recording the owner's judgment pod.judge() 37 passed
`judge` files a judgment the owner has made: a claim, a Same, a Different or an Erroneous. The app writes it in Turtle from the template in `packages/cascade-runtime/guide/AGENTS.md`, naming it `urn:cascade:this-judgment`, and `judge` returns the lasting name the pod gives it.
Rules conformance/alex-rivera/alex-rivera.feature P15 runtime/matcher.feature M19 Source pod.test.ts
given a judgment about a record the pod holds 2 passed
given an acknowledgement of a warning 7 passed
- passed files one of a kind of a pair over exactly the pair's two records34 ms
- passed files one of a kind the vocabulary names that this runtime has no code for229 ms
- passed refuses, saying the vocabulary names no warning kinds, an Acknowledged on a vocabulary that names none104 ms
- passed throws, writing nothing, for a verdict other than an Acknowledged that names a kind of warning4 ms
- passed throws, writing nothing, for an Acknowledged of a kind of a pair that does not name exactly two records6 ms
- passed files one of a kind over the records it is about33 ms
- passed throws, writing nothing, for an Acknowledged that names no one kind of warning or a member that is no IRI, a version, a revision or a judgment11 ms
given records imported from documents 5 passed
- passed names the document each member was shown from, and no version0 ms
- passed names the same documents for an Acknowledged of those records, and none for a document it names itself49 ms
- passed throws, writing nothing, for an Acknowledged that names a matcher judgment assertion8 ms
- passed files a person's replacement of a person's judgment0 ms
- passed throws, writing nothing, for a person's judgment that replaces a matcher's, and for a retraction of one2 ms
given an About whose basis is a machine's, attributed to a person 8 passed
- passed throws, writing nothing, for each machine basis, the owner typed a person in the judgment, not typed in it, or typed also a software agent31 ms
- passed files each machine basis by a software agent the judgment types83 ms
- passed files a machine basis by a software agent that is a blank node the judgment types38 ms
- passed checks the machine basis once for a judgment, not once to prepare it and again to file it44 ms
- passed checks the machine basis again for a judgment of the same name that differs only in a subclass statement it states37 ms
- passed files a machine basis by an author only the vocabulary types: cascade:CascadeMatcher, or an agent the judgment types a cascade:Server59 ms
- passed refuses a machine basis by an author that is a blank node with no type or a literal, with the shape's message7 ms
- passed says each machine basis, and that a person's About has the basis cascade:OwnerStatement2 ms
given a judgment that names itself, and states its time and its author 11 passed
- passed files it under that name, returns it, and keeps its time and its author as given5 ms
- passed writes nothing for a retry, with its time or without, and the pod's files are the same18 ms
- passed refuses another judgment under a name the pod holds, writing nothing6 ms
- passed refuses a retry that states another role or another agent for its author, writing nothing8 ms
- passed throws, writing nothing, for a name the pod gives something else, whether a record or the pod's subject3 ms
- passed throws, writing nothing, for a retraction under the name of a judgment, and a judgment under the name of a retraction32 ms
- passed throws, writing nothing, for a name that no file can be named after, and says to name it a urn:uuid:3 ms
- passed names a judgment with no time the time now, and keeps a time in the future62 ms
- passed files a retraction under the name and the start time it gives, and writes nothing for a retry37 ms
- passed files a judgment's time and a retraction's start time at an offset of +14:00 and of -14:00, the bounds, as given154 ms
- passed throws, writing nothing, for a time that is no xsd:dateTime, for two times, and for a name that is a blank node2 ms
given a judgment read from one pod and filed into a rebuilt one 1 passed
given a judgment of a member the pod does not hold 1 passed
given a judgment of a view entry 1 passed
given a finding 1 passed
Opening a pod again openPod() 37 passed
So that a returning app is fast, a pod opened again returns a kept answer while nothing the answer was worked out from has changed. `head` lets the app's next act carry on from its last one.
Rule runtime/naming.feature N14 Source pod.test.ts
with an answer kept from an earlier session 2 passed
when no kept answer fits 1 passed
- passed works the answer out again198 ms
when answers cannot be saved 1 passed
- passed answers all the same63 ms
given a pod an import built and closed in an earlier session 21 passed
- passed reads the build back instead of deriving and building every view, and answers as a build whole does39 ms
- passed opens from the working copy kept beside it, reading no file of the pod's snapshot set, and answers as a build whole does34 ms
- passed builds again when the working copy kept beside it was cut short, and the next session opens from the one it wrote98 ms
- passed writes nothing at close, neither the working copy nor a file of the pod, after a session that opened from the working copy and changed nothing93 ms
- passed builds again when a byte of the working copy kept beside it changed84 ms
- passed builds again when a file of the snapshot set was removed from the pod149 ms
- passed opens it, with tables that never opened it, by reading the build back: no derivation, no build and no matcher's view of its own, and answers as a build whole does97 ms
- passed reads a sealed pod's build back, kept sealed beside it327 ms
- passed builds a sealed pod again when its manifest names another hash, writes the build, and the next session reads it back357 ms
- passed builds again when a file the build read changed in place76 ms
- passed builds again when a view the build wrote no longer holds what it wrote, writes that view again, and the next session reads it back115 ms
- passed builds exactly once when its manifest names the hash taken over a wider set of files, a .DS_Store among them, and the next session reads the build back97 ms
- passed builds again when what is kept beside the pod was kept under another hash than the manifest names, as when a process stops before it closes the pod75 ms
- passed builds again when the vocabulary's build queries changed69 ms
- passed keeps the build a read made whole when the manifest named its hash and nothing was kept beside it, and the next session reads it back121 ms
- passed leaves every file of the pod as it was, views included, when only the build kept beside it was lost126 ms
- passed writes the build a read made whole again when the manifest named another hash, and the next session reads it back103 ms
- passed answers when the manifest named another hash and the pod cannot be written65 ms
- passed writes nothing when another session's step lands between what the read listed and its write, and answers all the same134 ms
- passed rebuilds a step in part from the build it read back, and the next session reads back what that step wrote, answering as a build whole does361 ms
- passed builds again when a step wrote its records and stopped before its views538 ms
given a runtime packed, or run from a checkout · keptBeside() 3 passed
- passed keeps answers for a packed, committed runtime, and the build too wherever the runtime and its components are each at a commit, a checkout's under its built code, and the pod's database wherever either is kept0 ms
- passed names a checkout's built code by paths written with a forward slash, so one pod synced between operating systems keeps its build6 ms
- passed names a checkout's built code by the bytes of what runs, so code built at another commit than the checkout's keeps its build apart16 ms
pod.head 4 passed
when a pod is retitled · pod.retitle(title), pod.titled 4 passed
- passed gives the new title in the manifest, in `pod.json` and on the reopened pod, and leaves the kept rows of a question as they were101 ms
- passed says a pod is titled only when a title was given when it was made or by `retitle`64 ms
- passed refuses an empty or all-whitespace title with a `Refusal`, leaving the pod untitled171 ms
- passed seals the new title of an encrypted pod, which opens again with its secret as titled84 ms
Keeping a pod's database beside it openPod(), pod.close() 17 passed
Beside a pod in a folder the runtime keeps `pod.db`: the pod's statements and its screens in SQLite, a cache its files can always build again. It is built whole when it is absent or names another build than the pod's, and kept current after each step.
Source pod-database.test.ts
given a pod imported into and closed 1 passed
given a new pod, open and not yet closed 1 passed
given an app that imports without matching, claims, retitles and then matches 1 passed
given a failing build of the database 3 passed
- passed records the failure as core-pod.keepDatabase.failed, answers the questions from the store with the rows of a pod that holds no database, and tries again at close502 ms
- passed tries the build once after the first answer of a pod imported into without matching, not at each question266 ms
- passed records the failure when the database cannot be opened315 ms
given a later import, in a later session 2 passed
given a retitle after a step, the pod closed and opened again 2 passed
given a fingerprint other than the one pod.db was built under 1 passed
given a pod.db damaged past its first page, which opens and names its ledger but does not read 1 passed
when the process stops after a step's files are written and before pod.db commits 1 passed
given a sealed pod 2 passed
- passed names no file beside it by what it holds: the database and its key are each under a keyed name, as a sealed pod's own files are0 ms
- passed seals pod.db, its log, its shared memory and its key file: none holds the pod's statements, its key, or a marker a transaction killed part way wrote330 ms
Answering a pod's questions from its database, a page at a time pod.ask(), pod.askPage() 19 passed
A pod opened again answers a named question that has a `.sql` beside its `.rq` from `pod.db`, its rows those the store gives, a page at a time when asked for one, without building the store, waiting for a step, or keeping answers.
Source pod-database.test.ts
given a pod imported into and closed, opened again 7 passed
- passed answers My lab results without reading the pod whole: no dataset is read and no store loads a statement73 ms
- passed gives, for each question with a .sql, the rows the store gives a pod with no database335 ms
- passed gives pages of 1, 2 and 50 that join, in order, to the whole list ask gives, the last naming no next page118 ms
- passed pages a question with no .sql the same way, from the rows the store gives183 ms
- passed refuses a page size that is no whole number above 0, and a key no page of a question with no .sql gave20 ms
- passed keeps no answers.json for a question with a .sql49 ms
- passed answers a question with no .sql by building the store, the rows the store gives a pod with no database207 ms
given a new pod just imported into, still open 1 passed
given a pod opened with no database beside it 4 passed
- passed answers the first question from the store without waiting for pod.db, builds it once after that answer while the next question is answered from the store, then answers the rest from it reading no dataset, with the rows the store gives468 ms
- passed holds a step and a retitle that come as pod.db is being built until it is built, and keeps pod.db equal to the build kept beside the pod978 ms
- passed builds pod.db to its end when the pod is closed as it is being built after the first answer, with no rejection left unhandled and nothing built again at close684 ms
- passed builds pod.db from the kept build as the first answer left it, though a queued call adds a graph to the kept build and drops it later while pod.db is built572 ms
when a later import is held part way, its files not yet written 1 passed
given a pod opened again and asked a page of a question with a .sql 5 passed
- passed pages on from pod.db after a retitle, reading no dataset, with the new title in pod.db and no build of it whole at close60 ms
- passed fills no screen again for a retitle, which changes only the manifest47 ms
- passed refuses a key of no page_key's shape rather than paging after it35 ms
- passed pages after a key of the rows ask gave from pod.db, as the store would, restoring no store61 ms
- passed answers under a lens pod.db was not built for from the store, the rows the store gives332 ms
when the pod is closed as a question is asked 1 passed
Keeping an open pod's answers current pod.ask() 4 passed
A pod works its answers out from its files, and a pod that stays open keeps that work: after each act it works out again only the records the act reached. These checks hold that shortcut to the full work, so a pod left open answers exactly as one opened afresh.
Rules runtime/currency.feature C8 runtime/matcher.feature M20 Source server-same.test.ts
given two servers of one hospital, each holding allergies under the same ids, and an owner who judges the servers Same 4 passed
- passed returns after each act every statement that a copy of the pod opened afresh returns3 ms
- passed shows as the same exactly the records the judgments leave joined: none, then `a` and `b`, then `c` too, then `b` and `c`, then none0 ms
- passed works out again only what the act reached, for a pull and for a Different, without starting over0 ms
- passed holds after working out in part exactly what the full work holds0 ms
Encrypting a pod with six words openPod(), sixWords(), typedWords() 24 passed
A pod made with a secret is sealed: its files, and the answers kept beside it, are encrypted on disk and open only with that secret. The secret is six words from a public word list, which a person can write down and type back; one file, the header, stays readable and says how the pod is sealed.
Source pod.test.ts
sixWords() 1 passed
typedWords(typed) 1 passed
when a new pod is made with a secret 1 passed
when a sealed pod is opened 4 passed
- passed answers a question, once opened with the secret, with the rows it gave when it was made6 ms
- passed opens with the words as a person types them: capitals, commas, a hyphen missing6 ms
- passed throws `Unopened` with the reason in `outcome`: `secret needed` without a secret, `incorrect secret` with other words2 ms
- passed throws `Unopened` for a header it cannot read, before working out any key and without writing3 ms
checkSecret(folder, secret) 3 passed
when a secret is given for a pod that is not sealed 2 passed
- passed throws `Unopened` with `not encrypted` for a pod on disk39 ms
- passed throws `Refusal` for a pod in memory, which is never encrypted0 ms
when two openings make the same new pod at once 6 passed
- passed lets one opening read what the other sealed61 ms
- passed makes the pod again with the secret given, when the opening that began it stopped between its two writes and left only its sealed index13 ms
- passed makes the pod again when the opening that began it stopped after proving the layout, leaving a probe and no index, and its first write sweeps the probe10 ms
- passed refuses a folder whose header was deleted and whose sealed records remain, removing nothing6 ms
- passed opens with the header of an opening that is still making the pod, after its sealed index and before its header40 ms
- passed opens for exactly one of two different secrets, with `incorrect secret` for the other55 ms
when a pod made with a secret holds records 4 passed
Alex's pod made with the six words from two downloads, each import's index writes counted.
- passed names its files so its folder shows no record kind, no count by kind, and no hash of a record's triples5 ms
- passed writes its sealed index as often for an import of x-e4 as for one of x-e2, which writes more files0 ms
- passed throws `Unopened`, `changed outside the runtime`, on the next open after one of its files is deleted54 ms
- passed throws `Unopened`, `changed outside the runtime`, from an import whose step reads a file changed since the pod opened, rather than refusing it56 ms
when a 1.2 pod is opened with its secret 1 passed
when the same records are held plain and sealed 1 passed
- passed answers every question in the vocabulary the same644 ms
Encrypting a pod with an app's key openPod() 2 passed
An app that holds a key of its own, 32 random bytes, seals a pod under that key in place of six words. Nothing about a key needs stretching, so the pod opens without Argon2id; a passphrase is never accepted as a key.
Source pod.test.ts
when a new pod is made with a key 1 passed
given a key that is not 32 random bytes, or a key with a secret 1 passed
Opening a pod whose files are held in archives openPod() 3 passed
A host may keep the pod's files that never change in ZIP archives, in the folder the layout gives `cascade:holdsFilesInArchivesOfMediaType` (X1). A pod opens from every file at its own path and every entry of every archive, plain or sealed, and is the pod it was with them loose; an archive with no end record fails the open, naming it (N9).
Source pod.test.ts
- passed opens with every file an archive may hold in one archive as the same pod, answering as before; a torn archive fails the open, naming it297 ms
- passed opens a packed pod by the app's default path, its answers beside it, as the pod it was loose; a loose twin of an archived file with other bytes fails the first question, naming it228 ms
- passed opens a sealed pod whose sealed files of the set are held in an archive, through its sealed index, answering as before457 ms
Writing a pod's files into archives openPod() 3 passed
A pod opened on a folder keeps what its steps write that never changes in archives, one for each step, in the folder the layout gives them (X1, W1): the first archive in a pod holds its subject's file, so that a runtime that cannot read archives, which would see only the files at their own paths, opens no part of it. A pod of any other kind of host, or a sealed one, keeps its files as it did.
Source pod.test.ts
- passed keeps a fresh pod's files that never change in archives named by their bytes, the requirement's file beside them, and asks as the pod unpacked loose; a runtime from before archives refuses it156 ms
- passed packs a pod made loose when it is next written, its subject's file with the first archive, so a runtime from before archives refuses it then and not before691 ms
- passed writes none of an encrypted pod's files into an archive, and no requirement's file0 ms
Sample pods and exports to build against replayKit(), kitDownload() 7 passed
`replayKit` builds a kit's pod by performing its story, and `kitDownload` returns the path of one of its exports. Both come from `cascade-runtime/fixtures`, so a developer gets a realistic pod or export for a test without writing one.
Source pod.test.ts
kitDownload(kit, name) 2 passed
replayKit(kit, folder, { through }) 5 passed
- passed returns the steps it performed, in the story's order, from making the pod to the step named1 ms
- passed builds a pod that `openPod` opens as the story's person, at the story's address1 ms
- passed builds a pod whose matcher judgments cite only reference tables the app holds107 ms
- passed builds a pod that `openPod` opens without matching it again0 ms
- passed throws for a folder that already holds files, a kit it doesn't carry, or a step the story doesn't have24 ms
Publishing a pod for a browser answersToPublish(), samplesToPublish() 11 passed
A site can save a pod's answers as files, so a web page shows the pod without first downloading the query engine. `samplesToPublish` saves kits' pods the same way, as samples a site can offer.
Source pod.test.ts
answersToPublish(parts, podFiles, { lookups }) 2 passed
when a browser reads the published files 5 passed
- passed names the same pod as the open pod: address, subject, owner1 ms
- passed returns the same rows as the open pod for every question in the vocabulary447 ms
- passed answers a lookup from `lookups.json`, without the reference tables3 ms
- passed ignores answers and lookups that a different version of the runtime wrote8 ms
- passed throws `Refusal` for a question or a lens the vocabulary doesn't have1 ms
samplesToPublish({ kits }) 4 passed
- passed returns the name and title of every kit the vocabulary carries, when one kit is asked for1 ms
- passed returns a kit's sample as the pod's files, a list of them and one pack of them, beside its `answers.json`, `pod.json` and `lookups.json`2 ms
- passed throws `Refusal`, naming the kits there are, for a kit the vocabulary doesn't carry78 ms
- passed throws a plain `Error`, naming the kit, the step and the file, when a file the kit needs is missing3.92 s
Importing the package in a web page browserBuildVersion(), cascadeRuntime() 9 passed
A bundler that honours the `browser` condition gives a web page its own build of the package, the browser entry point, with the same calls as in Node. A page also relies on that build's types, on its `terms`, and on the version it files kept answers under, `browserBuildVersion()`, which answers published from Node must carry to be read in the page. A Vite app serves that build beside its bundle with `cascadeRuntime()` from `cascade-runtime/vite`.
Source browser-types.test.ts, entry.test.ts, vite.test.ts
given a page written in TypeScript with `customConditions: ["browser"]` 2 passed
given the packed browser entry point 3 passed
- passed returns from `browserBuildVersion()` the version that `browserBuildVersion(folder)` of `cascade-runtime/published` returns in Node for the same packed package3 ms
- passed exports `terms` as the Node entry point does1 ms
- passed throws from its own copy of `checkInput`, in `check.js`, an error named `Refusal` that is no instance of Node's `Refusal`1 ms
browserBuildVersion(folder) 1 passed
given a Vite build with a `base`, using `cascadeRuntime()` 3 passed
- passed copies the package's browser build and the components a page reads into `cascade-runtime/` under the build's output7 ms
- passed leaves `cascade-runtime` out of the app's bundle, as an import the page resolves2 ms
- passed writes an import map that points `cascade-runtime` at the copy under the base1 ms
Finding a hospital to connect to directoryOf(), searchDirectory(), TEST_DIRECTORY 15 passed
A directory is the list of hospitals an app offers a person to connect to; each row gives a hospital's name, the vendor of its system, and its FHIR base, the URL of the server that holds its records. `directoryOf` reads rows from the list a vendor publishes, a brands bundle, and `searchDirectory` finds the rows that match what a person types.
Source directory.test.ts
directoryOf(brands, vendor) 9 passed
- passed returns a row for every demo hospital from the brands bundle that `cascade-sandbox` makes of them, with its name, FHIR base and places204 ms
- passed returns one row for an Organization's FHIR endpoint: the Organization's name, the vendor given, the endpoint's URL as the FHIR base, and its city and state as a place0 ms
- passed drops a trailing slash from the FHIR base0 ms
- passed returns the city alone as the place where an Organization gives no state, and no `places` where it gives no location0 ms
- passed skips an Organization that names no endpoint, and one whose endpoint is of another kind, is missing from the bundle, has no URL, or says it speaks FHIR R21 ms
- passed keeps an endpoint that says it speaks FHIR R40 ms
- passed gives an Organization with no endpoint of its own the endpoint of the one it is `partOf`, named by a relative reference or by a `urn:uuid`2 ms
- passed skips an Organization that is `partOf` one the bundle does not hold0 ms
- passed returns no rows for what is no Bundle: another resource, a string, nothing0 ms
searchDirectory(directory, text) 5 passed
- passed returns every row for blank text1 ms
- passed returns the rows whose name or places hold a word beginning with the word typed0 ms
- passed matches each word typed against any word of the row, one word of the row serving two if need be0 ms
- passed ignores capitals and accents0 ms
- passed returns nothing for letters from the middle of a word, and for a word no row holds0 ms
TEST_DIRECTORY 1 passed
Signing a person in to a hospital connect(), loopbackSignIn() 7 passed
`connect` signs a person in to the hospital a directory row names, by SMART on FHIR: the app's `signIn` function takes the person to the hospital's own sign-in page, and `connect` returns a connection that a pull then reads through. The token the hospital issues stays inside the package, where the app's code cannot read it or leak it.
Source connect.test.ts
connect(row, registration, { signIn, fetch }) 3 passed
loopbackSignIn({ open }) 4 passed
- passed finishes the sign-in with the hospital's redirect that carries the `state` value `connect` sent0 ms
- passed responds 400 to a redirect that carries another `state`1 ms
- passed waits on after a redirect that carries another `state`, and finishes with the right one0 ms
- passed stops listening once the sign-in is back7 ms
Reading what a hospital's server says of itself serverReport(), connectFiles() 5 passed
`serverReport` asks a connected hospital's server for its CapabilityStatement, the server's own account of what it is, and returns it with the SMART configuration the sign-in read. `connectFiles` saves that report as the files `pod.connect()` stores, from which a pod can tell one hospital's server from another's. Reading those files back, and the connects refused, are on the fhir-pull page, under "Saving and reading what a hospital's server said of itself".
Rule runtime/arrivals.feature A16 Source connect.test.ts
serverReport(connection) 4 passed
- passed returns the server's CapabilityStatement as `GET <fhirBase>/metadata` gives it0 ms
- passed sends no token with that request0 ms
- passed returns the FHIR base and the client id the app signed in with0 ms
- passed returns the SMART configuration the sign-in read, without asking the hospital for it again0 ms
connectFiles(report, name) 1 passed
Pulling a patient's records from a hospital pull(), DEMO_PLAN 25 passed
`pull` fetches the signed-in patient's records from the hospital as FHIR resources, following a plan: the Patient, then each of the plan's searches a page at a time, then any record those name that no search returned. It returns a pull: the records, with which hospital they came from and when.
Source connect.test.ts
pull(connection, plan) 9 passed
- passed returns every record the hospital holds for the patient, each once, with `<fhirBase>/<type>/<id>` as its `fullUrl`1 ms
- passed returns each resource exactly as the hospital sent it1 ms
- passed returns the patient's id in `patient` and the FHIR base in `fhirBase`0 ms
- passed makes each of the plan's searches once, with its `category` where it has one1 ms
- passed follows each `next` link to a search's later pages0 ms
- passed sends every request to the hospital's own origin0 ms
- passed sends the token with every request for a record0 ms
- passed returns the plan's searches in `searches`, and nothing in `denied` or `missing`, when the hospital serves them all0 ms
- passed returns in `retrievedAt` the time of the hospital's last response, in UTC and without trailing zeros25 ms
DEMO_PLAN 1 passed
given a record that names another which no search returned 3 passed
given a search the hospital turns down 8 passed
- passed lists in `denied` a search whose first page comes back 400, 403 or 4040 ms
- passed keeps the pages before one that comes back 403, 404 or 4100 ms
- passed lists in `denied` a search whose second page comes back 403, 404 or 4100 ms
- passed keeps nothing of a page that holds a record of another patient, or of no patient0 ms
- passed lists in `denied` a search whose page holds a record of another patient, or of no patient0 ms
- passed returns the records of the last search, which comes after the searches turned down0 ms
- passed lists every search of the plan in `searches`, denied or not0 ms
- passed ignores an OperationOutcome among a page's resources: its search is not denied, and it is not kept as a record0 ms
given a hospital that fails once and then responds 2 passed
given a FHIR base written with a trailing slash 1 passed
- passed returns `fhirBase` without it, and every `fullUrl` under that26 ms
given a demo hospital served over HTTP on this machine 1 passed
Pulling the C-CDA documents a hospital holds pull() 19 passed
Beside its FHIR resources, a hospital can hold a patient's summary as a C-CDA document, which a DocumentReference points to by URL or carries inline. `pull` reads each one from the FHIR base's origin and nowhere else, and where it cannot read one it says why and carries on. Each document read comes with `retrievedFrom`, the URL it was read from.
Source connect.test.ts
given DocumentReferences that hold a structured C-CDA document 11 passed
- passed returns one of `documents` for each: the DocumentReference, the position of the content that holds it, and its `url` as written1 ms
- passed reads a document at a relative `url`, served as XML0 ms
- passed reads a document the hospital serves wrapped in a Binary resource0 ms
- passed reads a document carried inline as base64 `data`, with the DocumentReference's own URL as `retrievedFrom`0 ms
- passed sends the token with each request for a document0 ms
- passed skips content that is no structured C-CDA document: a PDF, and a C-CDA with no structured body0 ms
- passed keeps every DocumentReference as a record, whether or not its document was read0 ms
- passed reads once a `url` that two DocumentReferences name0 ms
- passed returns `retrievedFrom` with a character a URL may not hold, such as `|`, written as its percent escape, `%7C`0 ms
- passed returns `retrievedFrom` with the host in lower case and without `:443`, for a FHIR base written in upper case with `:443`0 ms
- passed returns a pull that `pullFiles` saves, with one `document-<n>.xml` for each distinct document read2 ms
given a document it cannot read 6 passed
- passed returns `notRead` with the reason, and no `bytes`, for a response that is a 404, over `limits.responseBytes`, no C-CDA document, or not well-formed XML0 ms
- passed returns `notRead` for inline `data` that is not well-formed XML, with no `retrievedFrom` and no `bytes`0 ms
- passed sends no request for a `url` on another origin, where the token must not go0 ms
- passed sends no request for a `url` that carries a user name or a password0 ms
- passed follows no redirect to another origin, and asks for that `url` once0 ms
- passed reads the documents that come after it0 ms
when reading a document must end the pull 2 passed
- passed throws `unauthorized` for a 401 in response to a document34 ms
- passed throws `cancelled` once the app aborts its `signal`21 ms
Bringing a pull into a pod pullFiles(), pod.look(), pod.import() 7 passed
`pullFiles` saves a pull as files, which `pod.look()` and `pod.import()` take as they take an export. Pulls from two hospitals land in one pod, where the matcher joins the records both hold. The files themselves, and the pulls `pullFiles` refuses, are on the fhir-pull page, under "Saving a pull as files" and "Refusing a pull an import cannot state".
Rules runtime/arrivals.feature A11 runtime/arrivals.feature A1 runtime/matcher.feature M14 Source pull.test.ts
pod.look(files) 1 passed
given one person's pulls from two hospitals, each imported and claimed 2 passed
given a pull the pod already holds, saved to a folder 1 passed
given a pull a pod kept in a folder holds, imported again after the pod is opened again 3 passed
Telling why a connection failed ConnectionFailure 22 passed
When signing in or pulling cannot finish, `connect` and `pull` throw a `ConnectionFailure`, whose `kind` is one of eight words an app can turn into a message for the person. It carries no token and no authorization code, so an app can log it or show it.
Source connect.test.ts
given any failure of `connect` or `pull` 4 passed
- passed throws a `ConnectionFailure`, which is no `Refusal`1 ms
- passed keeps the token and the authorization code out of its message and its properties0 ms
- passed has no `cause`0 ms
- passed names the hospital's origin in `origin`, its HTTP status in `status`, and what was asked of it in `askedFor`0 ms
when the person or the app stops the sign-in 1 passed
when the sign-in comes back wrong 1 passed
when a request would leave the hospital's `https:` origin 2 passed
when a pull goes over one of its `limits` 1 passed
when the hospital will not take the token 2 passed
when the hospital keeps failing 1 passed
when the sign-in cannot start 1 passed
when the hospital sends what the package cannot use 9 passed
- passed throws `hospital-error`, with the status and the hospital's own error code where it gives one, for a token exchange the hospital turns down0 ms
- passed throws `hospital-error`, with the hospital's own error code, for a sign-in the hospital turns down0 ms
- passed throws `hospital-error` for a SMART configuration that does not offer PKCE with S2560 ms
- passed throws `hospital-error` for a token response whose patient is no FHIR id0 ms
- passed throws `hospital-error` for a resource whose type or id is not one FHIR allows0 ms
- passed throws `hospital-error` for a `next` link back to a page already read0 ms
- passed throws `hospital-error` for a search whose first page comes back 410, and for one that comes back 4050 ms
- passed throws `hospital-error` for a redirect whose target a browser hides0 ms
- passed throws `hospital-error` for a directory row whose FHIR base is no URL, or carries a query0 ms
Keeping reference tables up to date tablesBeside(), tables.check() 31 passed
An app keeps its reference tables in a folder beside its pods, which `tablesBeside` returns, and `check` reads each feed and keeps every newer version whose rows verify, so damaged rows never reach a pod. With a `phase`, `tablesBeside` reports the copy of the package's own tables and the check for newer ones, each in a line a person reads while they wait.
Rules runtime/matcher.feature M10 runtime/naming.feature N12 Source outcomes.test.ts, tables.test.ts
when the copy of the package's tables is reported 2 passed
- passed says `already there` when nothing was copied1 ms
- passed says how many tables were copied and how many megabytes0 ms
when the check for newer tables is reported 6 passed
- passed says `none newer` when the feed answered and listed nothing newer0 ms
- passed says how many newer versions were kept, and of which tables0 ms
- passed says `not reached`, and that the package's tables are used, when the feed did not answer0 ms
- passed says `not reached` with the seconds it waited when the check's time ran out0 ms
- passed says that a newer version could not be read now, and never `not reached`, when the feed answered and a download failed0 ms
- passed counts the versions it refused0 ms
tables.check() 3 passed
when a check cannot read the vocabulary 2 passed
- passed rejects with what failed0 ms
- passed keeps the version at the next check0 ms
given a version whose rows do not verify 1 passed
- passed returns in `refused` why, with nothing of the version kept96 ms
given a feed or rows that cannot be read now 1 passed
given the check an open starts, whose bound is on each request, not on the whole check 2 passed
given a feed that goes back to a version the app's own does not descend from 1 passed
given a feed whose series are of several table kinds 3 passed
given a vocabulary whose rule list and page marks name a kind it no longer declares 1 passed
given builders named in the app's settings 4 passed
- passed runs each builder at a check and keeps the versions it builds0 ms
- passed returns a builder's result after the feeds', under the feed the builder wrote in `.builds/`0 ms
- passed refuses a builder's version that does not descend from the one a feed gave0 ms
- passed keeps nothing more, of a feed or of a builder, at a check that finds nothing new0 ms
given a pod's open that starts a check of the feed, which has not yet answered 4 passed
tables.references() 1 passed
Starting from the tables the package carries tables.start() 21 passed
The package carries starter copies of the reference tables, so a new app works before it has reached a feed. `start` copies them into the app's store, and until it has, a version is copied the first time something reads it.
Source tables.test.ts
tables.start() 5 passed
- passed returns more than 0 bytes for an empty store19 ms
- passed returns 0 for a store that holds every version5 ms
- passed copies only the versions the starter names, and no other file it carries4 ms
- passed reads at most three versions ahead of the one it is writing6 ms
- passed makes no search list that the starter already carries: a table search finds a code though any search list it made would be refused5 ms
when a start is cut short 3 passed
- passed rejects with what failed0 ms
- passed copies, at the next start, only the version it had not written0 ms
- passed converts no version after the one that failed0 ms
when a lookup comes before the start 4 passed
given starter copies without search lists, as a browser's are 4 passed
given a store whose search list is cut short, in another format or by other code systems 1 passed
- passed makes the search list again at a start41 ms
given a store emptied while the app runs 1 passed
- passed returns the starter's current versions again8 ms
given a newer package whose starter no longer carries a version the store names 2 passed
given rows a server sends already unzipped 1 passed
- passed reads them the same as rows sent gzipped2 ms
Choosing an app's feeds and settings configureTables(), cascade-runtime.json 9 passed
An app sets its own reference tables in a `cascade-runtime.json` in the folder it runs in, or in code with `configureTables`: the feeds it reads, whether it checks them when it starts, the series a code's name is read from, and the builders it runs. Code wins over the file, and both are read once, before the first pod opens.
Source tables.test.ts
given an app's own `cascade-runtime.json` 3 passed
given a folder whose `cascade-runtime.json` is the package's own 1 passed
given a setting in the file and another in code 1 passed
- passed uses the code's `feeds` and `checkOnOpen` in place of the file's0 ms
configureTables(settings) 2 passed
when the app's file is one the package cannot use 2 passed
Opening a pod with newer reference tables openPod(), pod.opened, pod.unheldTableVersions() 23 passed
When an app's reference tables have changed since a pod was last opened, opening the pod gives it the newer versions and lets the matcher judge what they newly join. `pod.opened` is that act, and it and `pod.unheldTableVersions()` name any version the pod uses that this app does not hold.
Rules runtime/opening.feature O1 runtime/opening.feature O2 runtime/matcher.feature M7 Source tables.test.ts
given tables with a newer version than the pod was last opened with 2 passed
- passed returns the open as `pod.opened`, with the files it wrote and nothing refused0 ms
- passed returns an empty `unheld` in it0 ms
given the same tables as at the pod's last open 2 passed
- passed returns no `pod.opened`0 ms
- passed returns none from `pod.unheldTableVersions()`0 ms
given only a newer version of the vocabulary's rule list 1 passed
- passed returns `pod.opened`, with nothing refused0 ms
given tables that lack a version the pod uses 2 passed
given a check that has kept one version and not yet the next 2 passed
given a newer version of a series the pod uses, while the open's matcher run is held 10 passed
- passed returns the pod before its matcher run for the new series has written0 ms
- passed answers a question asked as the open returns ahead of the run, over the pod as it was0 ms
- passed answers a question asked from the first answers ahead of the run, which starts once no call is waiting0 ms
- passed answers a question asked during the run with the rows kept before it0 ms
- passed answers, once `pod.opened` settles, as an open that waited for the run0 ms
- passed answers `pod.unheldTableVersions()` during the run over the pod as it was, without waiting for it0 ms
- passed rejects `pod.opened` with a run's failure, and still returns the pod0 ms
- passed runs the open again at the next open after a run that failed0 ms
- passed closes a pod closed during the run once the run has finished, which the next open does not run again0 ms
- passed answers a question asked after a write was called during the run with the pod after both, not the rows kept before it0 ms
given a newer version of a series the pod uses and pod.db beside the pod, while the open's matcher run is held 3 passed
- passed answers a question with a .sql during the run at once, from pod.db, with the rows from before it0 ms
- passed lists the pod's files once, from the open until `pod.opened` settles0 ms
- passed answers a question with a .sql, once `pod.opened` settles, with the rows the run left, which pod.db holds once the pod is closed0 ms
given a new pod, made and closed, then opened with the app's tables, asked once and closed, as the starter kit's `ask` does 1 passed
- passed leaves pod.db beside the pod1 ms
Listing and searching the reference tables tables.held(), tables.uses(), tables.search(), tables.codeNamed() 22 passed
A page that shows a person their reference tables lists each series the app holds, with its versions and where it came from, and searches a series' codes by the code as written or by words of its name.
Source tables.test.ts
tables.held() 6 passed
- passed returns the series in the order of their labels1 ms
- passed returns a series' versions, the current one first0 ms
- passed returns the credit a series' publisher asks for, and the feed the series came from0 ms
- passed returns, from the `checked.json` beside the feed, when the series' publisher was last checked for a newer release0 ms
- passed leaves out the vocabulary's rule list0 ms
- passed returns what another app on the same store has kept since0 ms
tables.current() 1 passed
- passed returns the current version of each series `held()` lists0 ms
tables.uses() and tables.openedWith(pod) 3 passed
tables.search(series, text, page) 8 passed
- passed finds a code by the code as written1 ms
- passed finds a code by words of its name, whatever their case0 ms
- passed returns with each code its name and the codes it maps to, each with its name3 ms
- passed returns the codes of several series as one list, each code once2 ms
- passed returns 50 codes a page, in the order of the codes as written0 ms
- passed returns `total` and `offset` with every page, and no code past the last page0 ms
- passed looks up the names of only the codes on the page and the codes they map to0 ms
- passed throws `Refusal` for a series whose version no file can be named for3 ms
given lists of codes that `tables.search()` merges into one order, by `merged(lists, spaces)` 1 passed
given a version's rows from which `listing(text, spaces)` makes its search list 1 passed
given a search list kept beside a version that cannot be used 1 passed
tables.codeNamed(series, written) 1 passed
Looking up a code in the reference tables tables.about(), tables.facts(), tables.inPanels(), tables.classedElsewhere() 23 passed
`about` returns what the reference tables say of each code an app shows: the code as written, its name, whether it is retired, and a product's ingredients. `facts` returns everything every table says of one code, each with the series and version it came from, among them the panels a lab test is in and the drug classes a medicine is in.
Source tables.test.ts
tables.about(codes) 8 passed
- passed returns every code asked with the code as written, and nothing more for a code no table holds0 ms
- passed returns a code's name from the series the app's order of preference names first0 ms
- passed returns a code's status from a later series where the first does not hold the code0 ms
- passed returns a product's ingredients from the first product ingredients series in the order of preference that maps it, passing an earlier one that does not, with the version that says so0 ms
- passed returns no ingredients for a code no row maps0 ms
- passed returns a product's ingredient and never its precise ingredient32 ms
- passed reads each version's rows from the store once, however many lookups follow8 ms
- passed throws `Refusal` when a series it reads has a version no file can be named for1 ms
tables.facts(code) 10 passed
- passed returns what each table kind says of the code, each with its series and current version2 ms
- passed returns only what the series named in `among` say1 ms
- passed returns a panel's tests in the panel's own order, each with whether the panel requires it and its name2 ms
- passed lists a panel's tests under `panels` and never under `mappings`1 ms
- passed returns a lab test's name and the panels that hold it, with its place in each1 ms
- passed returns a class given on the code itself with no `through`1 ms
- passed returns no class for a combination product1 ms
- passed returns a product's classes through its own precise ingredient where that is classed, else through its ingredient1 ms
- passed returns `withheld`, naming the ingredient, where only a different form of the ingredient is classed1 ms
- passed returns a precise ingredient's own classes1 ms
given a product ingredients version that states no precise ingredient 2 passed
tables.inPanels(code) 2 passed
tables.classedElsewhere(codes) 1 passed
Reading what ClinVar says of a variant tables.variantClassification(), pod.agreement() 22 passed
ClinVar is a public archive of how laboratories classify genetic variants, which an app holds as reference tables. `variantClassification` returns what the app's copy says of one variant, and `pod.agreement()` returns, for each laboratory's report of a variant in a pod, whether the report agrees with it.
Rule runtime/matcher.feature M17 Source variants.test.ts
tables.variantClassification(variant) 9 passed
- passed finds the variant's row by its ClinVar ID60 ms
- passed finds the row by a coding expression when the variant has no ID1 ms
- passed returns `not found` for an ID on no row, though the variant's expression is on one0 ms
- passed returns `not found` for an expression on no row, and for two expressions of one variant, each on a different row0 ms
- passed reads every series when the variant names no gene0 ms
- passed returns `not covered`, with the genes the first series covers, for a variant of another gene that no series holds4 ms
- passed returns the row from a series that states no genes, for a gene the first series does not cover1 ms
- passed returns the row's classifications by the vocabulary's labels, with its review status, when it was last evaluated and how many submitters contributed1 ms
- passed returns `no series` when the app holds no variant classifications series5 ms
given an app that read the feed with `tables.check()`, with no starter copies 1 passed
given an index by code, kept beside a version, that was built for other properties 2 passed
- passed finds the variant's row all the same1 ms
- passed keeps a new index beside the version0 ms
tables.labels(concepts) 1 passed
tables.facts(code) 3 passed
pod.agreement() 4 passed
Which `verdict` a report gets is the vocabulary's `tests/fixtures/variant-classifications-agreement`.
- passed returns `agrees` for a report whose value is among the row's, the row found by the variant's ClinVar ID0 ms
- passed returns `differs` for a report whose value the row does not hold, the row found by a coding expression0 ms
- passed returns no `verdict` for a variant that finds a row in each of two series0 ms
- passed writes nothing to the pod0 ms
given the pod's published answers 1 passed
- passed returns each report's `verdict` without the query engine334 ms
given a newer version of the series that classifies a variant otherwise 1 passed
- passed returns `differs` for the report that agreed112 ms
Asking a pod what the reference tables say of its records pod.medicationClasses(), pod.panelResults(), pod.joinedBy() 12 passed
Three questions join a pod's records to the app's reference tables, which a pod does not hold itself: the drug classes of its medications, its lab results in a panel the person picks, and the table versions that joined its records. Each answer names the version of the table it read.
Source tables.test.ts
pod.medicationClasses() 6 passed
Which class a medication is in is the vocabulary's `tests/fixtures/medication-classes-through-precise-ingredients`.
- passed returns a medication's classes through its ingredient, where its product has no precise ingredient0 ms
- passed returns a precise ingredient's own classes as stated0 ms
- passed returns a product's class through its precise ingredient, and through its ingredient for a kind of class the precise ingredient lacks0 ms
- passed returns no class for a product classed only in a different form, nor for a combination0 ms
- passed returns with each class the version of the drug classes table that holds it0 ms
- passed returns the classes that `tables.facts()` gives each medication's code4 ms
pod.panelResults(panel) 5 passed
Which tests count as missing is the vocabulary's `tests/fixtures/panel-results`.
- passed returns each test the panel requires, with the pod's result or with no `entry` where the pod has none0 ms
- passed returns a test of a nested panel with the nested panel as `via`, beside its own place in the panel asked0 ms
- passed returns a row for each result a test has0 ms
- passed returns only the rows of the panel asked, with the version that lists its tests0 ms
- passed returns no row for a code that is no panel0 ms
pod.joinedBy() 1 passed
What a view entry cites is the vocabulary's `tests/fixtures/joined-by`.
Finding lab changes after a medication starts or stops findChanges(), changesIn(), compact(), timelineIn() 31 passed
`findChanges(pod)` compares each lab test's results before and after the day a medication started or stopped, and returns each pair of a medication and a test whose results moved as a change, strongest first; `changesIn(medications, labs)` does the same over rows an app already holds. A medication is placed on its day: the day its use started, else the day its prescription was written, and for a stop the day its use ended. A change says what changed and never why, so an app or a model can tell a person "your LDL fell after atorvastatin started" from their own records.
Source changes.test.ts, stories.test.ts
changesIn(medications, labs) 14 passed
- passed returns one change for a medication and a test with three results before its day and three after, with `start:<medication code>:<test code>` as its `key`1 ms
- passed counts a result on the medication's own day as before it0 ms
- passed returns `direction` `down` when the mean after is lower, and `up` when it is higher1 ms
- passed leaves out of both sides a value that is not a number, a number in another unit and a result with no full day0 ms
- passed returns in `left` how many results it left out for each reason, and in `rows.left` their rows0 ms
- passed compares in the unit most of the results carry, and in the earliest on a tie1 ms
- passed returns `not enough results`, with a `score` of 0, for a pair with fewer than three results on one side0 ms
- passed returns no pair for a test with results on one side of the day only0 ms
- passed returns no pair for results that moved less than they vary among themselves, a `score` under 11 ms
- passed orders changes by `score`, highest first, the pairs without enough results last1 ms
- passed scores results that do not vary at all against 1% of the mean before0 ms
- passed returns at most `limit` pairs, 5 when none is given0 ms
- passed returns only the pairs of the `test` or the `medication` named: by code, by the code's IRI or, for a medication, by its name1 ms
- passed throws `Refusal` for a medication or a test the rows do not hold, and for a `limit` under 11 ms
given renewals of one drug 3 passed
given a medication whose use ended 2 passed
given a prescription with no start of use stated 1 passed
compact(change) 1 passed
timelineIn(medications) 2 passed
given the pod of each sandbox story, pulled from its demo hospital and imported 6 passed
- passed returns exactly the lab changes the story was written to show, and none for the story written to show none1 ms
- passed returns each lab change's `kind`, medication, day, test, `direction` and `unit` as the story states them0 ms
- passed returns in `rows` the results the story lists before and after, by day and value, with their count, least and greatest0 ms
- passed leaves no result out, so `left` counts nothing0 ms
- passed scores 0 only the lab change of the story written to show too few results0 ms
- passed places a medication the hospital holds only a prescription of on the day it was written0 ms
given one sandbox story imported twice, as a pull and as the C-CDA document of the same records 1 passed
given a kit's pod, `tamsin-vale`, replayed into a folder 1 passed
Tools a model reads a pod with TOOLS 16 passed
`TOOLS` are the tools an app offers a model for reading a person's pods: each has a name, a description, a JSON Schema for its input and a `run`. A tool reaches the pods only through the functions its host gives it (`PodReads`), so one set of tools serves Node and a web page, and its rows name their view entries, which is what a reply cites.
Source changes.test.ts, pod-tools.test.ts
changeTools(pod) 7 passed
- passed returns four tools: `find_changes`, `finding_rows`, `lab_series` and `timeline`0 ms
- passed returns from `find_changes` each lab change in its compact form, with no `rows` and no `medication.entry`0 ms
- passed returns from `finding_rows` the rows behind the lab change a `key` names, those before and those after0 ms
- passed returns from `lab_series` one test's results by day, oldest first, with those it left out counted0 ms
- passed returns from `timeline` each medication with its start of use and the day its prescription was written0 ms
- passed throws `Refusal` for input outside a tool's schema: a `limit` of 0 or of 21, no `key`, a property it does not name0 ms
- passed throws `Refusal` for a medication, a test or a `key` the pod does not have1 ms
TOOLS 4 passed
- passed lists seven tools: `list_pods`, `find_changes`, `finding_rows`, `lab_series`, `timeline`, `ask` and `reference_table_checks`2 ms
- passed declares for each tool the kind `ReadingPodsOrTables` at the tier `free`, as `offeredTools()` lists it0 ms
- passed exports for each of the vocabulary's kinds of act, and for no other, the notation of the tier it has there163 ms
- passed calls exactly one function of the host's `PodReads` for each tool2 ms
given `find_changes`, `lab_series` or `timeline` 1 passed
given `ask` with a question 4 passed
- passed returns the question's `total` and at most `limit` rows from `offset`2 ms
- passed returns 50 rows when no `limit` is given2 ms
- passed throws `Refusal` when asked for rows with no question1 ms
- passed throws `Refusal` when the handles in `entries` are not a list of strings0 ms
Reading a folder of pods for the tools podReads() 5 passed
`podReads(host)`, from `cascade-runtime/tools/node`, gives the tools their `PodReads` over the pods a host names, such as the folders `podsIn(folder)` finds. It opens each pod once and keeps it open until `close()`, so a model's many calls do not each pay for an opening.
Source pod-tools.test.ts
- passed opens a pod once for calls that arrive together1 ms
- passed closes each pod it opened when `close()` is called0 ms
- passed forgets that a pod failed to open, so the next call opens it again0 ms
- passed throws `Refusal`, listing the pods there are, for a name the host does not have0 ms
- passed throws `Refusal` for an encrypted pod, which the tools never open0 ms
Tools a model proposes a write with propose_entry, propose_judgment, propose_retraction 40 passed
A model proposes a write through a tool at the tier `ask`: an entry, a judgment of records, or the retraction of a judgment. The tool shows the person what the call will do through its door, and writes only when the person says yes to that call.
Rule runtime/consent.feature Y2 Source proposals.test.ts
PROPOSAL_TOOLS 3 passed
- passed lists three tools at the kind `WritingToAPod` and the tier `ask`, as `offeredToolsOf()` lists them1 ms
- passed is offered to a door that can ask the person and to none that cannot, and is no tool of `TOOLS`, which every door offers1 ms
- passed takes the pod's name in every one, beside its own properties1 ms
given a door that asks the person 23 passed
- passed propose_entry writes the proposal once, naming the model the door names, when the person says yes1 ms
- passed propose_entry writes nothing, and says so, when the person's answer is no1 ms
- passed propose_entry writes nothing, and says so, when the person's answer is dismissed0 ms
- passed propose_entry writes nothing, and says so, when the person's answer is unanswered0 ms
- passed propose_entry writes nothing when the question fails to reach the person1 ms
- passed propose_entry refuses, and writes nothing, when its door cannot ask0 ms
- passed propose_entry refuses, and asks nothing, when its door names no model0 ms
- passed propose_judgment writes the proposal once, naming the model the door names, when the person says yes0 ms
- passed propose_judgment writes nothing, and says so, when the person's answer is no0 ms
- passed propose_judgment writes nothing, and says so, when the person's answer is dismissed0 ms
- passed propose_judgment writes nothing, and says so, when the person's answer is unanswered0 ms
- passed propose_judgment writes nothing when the question fails to reach the person0 ms
- passed propose_judgment refuses, and writes nothing, when its door cannot ask0 ms
- passed propose_judgment refuses, and asks nothing, when its door names no model0 ms
- passed propose_retraction writes the proposal once, naming the model the door names, when the person says yes0 ms
- passed propose_retraction writes nothing, and says so, when the person's answer is no0 ms
- passed propose_retraction writes nothing, and says so, when the person's answer is dismissed0 ms
- passed propose_retraction writes nothing, and says so, when the person's answer is unanswered0 ms
- passed propose_retraction writes nothing when the question fails to reach the person0 ms
- passed propose_retraction refuses, and writes nothing, when its door cannot ask0 ms
- passed propose_retraction refuses, and asks nothing, when its door names no model0 ms
- passed asks again for the same proposal, so a yes is for the one call it answers0 ms
- passed shows the person the pod, who proposes and what will be written, before it asks0 ms
given a host that checks a proposal before the person is asked 10 passed
- passed propose_entry answers { written: false, refused } and asks nothing when the check refuses0 ms
- passed propose_entry answers { written: false, refused } when the host refuses the write after the yes0 ms
- passed propose_entry asks the person with the lines the check gave, and none of what the model wrote1 ms
- passed propose_judgment answers { written: false, refused } and asks nothing when the check refuses0 ms
- passed propose_judgment answers { written: false, refused } when the host refuses the write after the yes0 ms
- passed propose_judgment asks the person with the lines the check gave, and none of what the model wrote0 ms
- passed propose_retraction answers { written: false, refused } and asks nothing when the check refuses0 ms
- passed propose_retraction answers { written: false, refused } when the host refuses the write after the yes0 ms
- passed propose_retraction asks the person with the lines the check gave, and none of what the model wrote0 ms
- passed asks for each record of a judgment by what the host showed, not by its IRI0 ms
given input its schema refuses 4 passed
- passed counts a record named twice once: a Same of one record is refused before it asks, as an answer0 ms
- passed proposes each record of a judgment once however often it is named0 ms
- passed refuses an unknown verdict and a member that is no IRI, before it asks0 ms
- passed refuses an entry that is empty, a retraction of no IRI and a call that names no pod, before it asks0 ms
Recording a write a model proposed proposedTurtle() 4 passed
What a write a model proposed records, as the vocabulary's rule Y3 says: the act that wrote it has an association in `cascade:ModelProposerRole` whose agent is the model, a `prov:SoftwareAgent` typed in the same file, and one in `cascade:PatientRole` whose agent is the person who said yes, a `prov:Person`.
Rule runtime/consent.feature Y3 Source proposals.test.ts
- passed gives an entry a session of the door's naming, with the model and the owner in their roles, beside the model's drafts21 ms
- passed gives a judgment the person as its author, and the model's association beside the person's on its act4 ms
- passed gives a retraction the person as its only unqualified association, and both roles6 ms
- passed writes a label with a quote, a backslash and a line break in it as the one label it is2 ms
Reading a whole pod in pages ask tool 21 passed
With `format: "compact"` and no question, `ask` returns the whole pod as tab-separated text, a page of at most `PAGE_CHARACTERS` characters at a time: the compact read. Each line begins with a handle, a short name for its view entry that a reply can cite, and each source is written by a short name, `S1`, `S2` and so on, which the page's `sources` lists.
Rule runtime/naming.feature N13 Source pod-tools.test.ts
given a kit's pod, `tamsin-vale` 7 passed
- passed returns the whole pod in one page of at most `PAGE_CHARACTERS` characters, with no `next`1 ms
- passed returns one view for each of `COMPACT_QUESTIONS`, in that order0 ms
- passed gives each view its `total` and one line for each row its question returns45 ms
- passed names each view entry by a handle that `entries` resolves to that view entry51 ms
- passed writes no IRI but the subject's4 ms
- passed names in `leftOut` each view it leaves out, every view entry of which is in the view named beside it15 ms
- passed throws `Refusal`, listing the questions the tool offers, for a question it does not offer0 ms
given a pod of 400 lab results, too long for one page 3 passed
- passed returns in `next` the input that asks for the page after0 ms
- passed keeps every page within `PAGE_CHARACTERS` characters0 ms
- passed puts every row on exactly one page0 ms
given the text a source wrote for a record 4 passed
- passed leaves out a text that says no more than the cells of its row, a date written in words counting as the row's date1 ms
- passed keeps a text that adds words, after the short name of the source that wrote it1 ms
- passed keeps each source's status, a report's conclusion and a text's prose, though other cells say the same words1 ms
- passed compares a text with the values its own source gave, not with the row's1 ms
given `entry/What needs review` 2 passed
given a handle in `entries` 3 passed
- passed returns the rows of the view entry whose name the handle begins0 ms
- passed returns, for a handle made before another record joined the view entry, the rows of the view entry that record is in now5 ms
- passed throws `Refusal`, naming the handle, when no view entry has it or its letter is another view's7 ms
Checking a pod against the reference tables reference_table_checks tool 10 passed
`reference_table_checks` returns what a pod's records and the reference tables say together that no question returns: each variant report that differs from ClinVar's classification today, and each pair of active medications whose codes share an ingredient. It reads the tables only when the host turns them on, and it lists what it could not check, so an empty list is never read as nothing found.
Rule runtime/lifecycle.feature L1 Source pod-tools.test.ts
with the tables on, holding a ClinVar series and a product ingredients series 6 passed
- passed returns each report that differs from ClinVar's classification today, with the variant's view entry, the report, its date and classification, and the ClinVar row0 ms
- passed returns in `notChecked` each variant it could not check, and why: `not covered`, `not asked`0 ms
- passed returns each pair of active medications in two view entries whose codes share an ingredient, with both view entries, their codes and the ingredient0 ms
- passed returns no pair for a stopped or a paused medication, for two view entries that show one code, or for two codes of one view entry0 ms
- passed returns in `notChecked` each active medication it could not check, and why: `no code`, `no ingredients row`0 ms
- passed returns in `versions` the version of each series it read0 ms
with the tables on, holding neither series 2 passed
- passed returns `held: false` for each check, and no rows0 ms
- passed asks the tables nothing further0 ms
with the tables off 2 passed
- passed returns `tables: "off"`, a sentence saying so in `said`, and no rows0 ms
- passed reads no table0 ms
Offering tools to a model in a web page toolRegistry() 6 passed
`toolRegistry()` keeps the list of tools a web page offers a model, each until the `AbortSignal` it was registered with aborts. Given the browser's model context (`document.modelContext`), it registers each tool there too.
Source tools.test.ts
register(tool, { signal }) 5 passed
- passed lists tools in the order they were registered1 ms
- passed throws `Refusal` for a name that is already listed0 ms
- passed removes a tool when its signal aborts0 ms
- passed accepts a name again once the tool that had it is removed0 ms
- passed ignores a tool whose signal has already aborted0 ms
given a model context 1 passed
Checking a tool's input against its schema checkInput() 8 passed
`checkInput(schema, input)` holds what a model or a form gave a tool to the tool's schema, written in the few JSON Schema keywords `InputSchema` names, and throws a `Refusal` that says the first thing wrong. It is also served alone from the entry point `cascade-runtime/check`, with none of the runtime behind it, so a web page checks an input without loading the query engine.
Source check.test.ts
checkInput(schema, input) 7 passed
- passed returns nothing for an input the schema allows1 ms
- passed throws `Refusal`, naming the property, when a required property is missing1 ms
- passed throws `Refusal` for a property the schema does not name, even one every object inherits, such as `toString`0 ms
- passed throws `Refusal` for a value of another type than the schema's: a number for a string, 1.5 for an integer, a string for an object0 ms
- passed throws `Refusal` for an integer under `minimum` or over `maximum`0 ms
- passed throws `Refusal` for a value that is not one of `enum`0 ms
- passed names an item of an array by its position, as `input.codes[1]`0 ms
given the entry point `cascade-runtime/check` 1 passed
Checking a model's reply against a person's records checkReply(), replyErrors(), replySchema, numberedReply() 36 passed
A model that answers about a person's records replies in a fixed JSON form, the reply contract: items, each resting on facts that cite a record and on absences. `checkReply` holds a reply to the contract and each fact to the record it cites, and returns what the pod itself holds of that record, so an app shows the pod's words and never the model's.
Rule runtime/naming.feature N13 Source reply.test.ts
given a reply about a pod (`ask`) 6 passed
- passed checks every fact and absence of a recorded reply: its four facts hold and its one absence is backed69 ms
- passed returns in `record.source` the records the cited view entry's values came from2 ms
- passed returns in `filled` what the pod holds of the view entry: its IRI, its name, its value with its unit, and its date1 ms
- passed returns in `held` every value the view entry holds of the field the fact names1 ms
- passed lists in `sources` each source of the view entry, by its short name and who wrote it1 ms
- passed checks a fact about the person, cited by the subject's IRI4 ms
given a fact that names a `source` 2 passed
given a fact that cites by handle 3 passed
given a fact the pod does not bear out 6 passed
- passed returns `no such field` when the view entry holds no value of the field1 ms
- passed returns `says otherwise` for a quote that is not words of the view entry's text1 ms
- passed returns `quote too short` for a quote of fewer than three words1 ms
- passed returns `ok: true` for a quote of three words or more, and for one that is the whole of a shorter text1 ms
- passed returns `nothing to check` for the field `text` with no quote0 ms
- passed returns `filled` for a field the view entry lacks0 ms
given a pod that cannot be read 1 passed
given a reply that breaks the contract 3 passed
given a reply that draws links 4 passed
- passed returns no error for a link from a fact of one item to a fact of another0 ms
- passed returns an error for a link that names its facts by number, not by their item and place0 ms
- passed returns an error, at the link, for a link that names item 0 or a fact before the first0 ms
- passed returns an error, at the link, for a link within an item that names a fact before the first0 ms
given a reply with an item that rests on no fact and no absence 1 passed
given a reply written to the other contract 1 passed
given `files` in place of `ask`, for a reply about downloads 2 passed
given neither `ask` nor `files` 1 passed
- passed rejects, naming both0 ms
checkCopiedReply(reply, { ask, ran }) 1 passed
numberedReply(reply) 2 passed
- passed numbers an item without `n` by its place, from 10 ms
- passed keeps an `n` that an item is given0 ms
replySchema 1 passed
given the fields the vocabulary's views write on a view entry 2 passed
Checking what a reply says a pod lacks checkAbsence() 33 passed
An absence is what a reply says the records lack, such as a colonoscopy after a positive stool test: the codes and words a record of it would carry, and the tool call that looked. `checkAbsence` backs it only when that call ran, returned every row and none matches, so a model cannot report "no record of it" after reading part of a pod.
Rule runtime/currency.feature C9 Source citations.test.ts
checkAbsence(absence, ran) 9 passed
- passed returns `backed: true` when the query ran, returned every row and no row holds one of the absence's codes or words2 ms
- passed returns `no query` for an absence that names no tool call0 ms
- passed returns `query not run` when no call that ran has the query's tool and input0 ms
- passed returns `query refused` when the call did not succeed0 ms
- passed returns `query found it` when a row holds one of the absence's codes or words1 ms
- passed returns `query cut short` when the call returned fewer rows than its `total`0 ms
- passed returns `nothing to look for` for an absence with no code and no word0 ms
- passed returns `no coverage` for an absence that does not say what was looked through0 ms
- passed returns `no such call` when the query names a call by number and no call with that tool and input has it1 ms
given an absence after a day (`match.after`) 4 passed
given a kind of record the absence is of 2 passed
with a tie (`tied`) 1 passed
given a row its source withdrew 2 passed
- passed ignores a row whose `status` is `entered-in-error`, `refuted` or `ruled out`0 ms
- passed returns `query found it` for a row whose `status` is `active` or `resolved`0 ms
given a compact read 10 passed
- passed reads each line alone, so a date on another line counts for nothing1 ms
- passed reads only the views of the absence's kind0 ms
- passed returns `query found it` for a matching line dated after the absence's day0 ms
- passed ignores a line whose status is `entered-in-error` or `ruled out`0 ms
- passed returns `query cut short` when a view shows fewer rows than its `total`, or fewer lines than it says it shows0 ms
- passed returns `query cut short` when the read goes on to a page that was not read0 ms
- passed returns `query cut short` for a read of only the view entries asked for0 ms
- passed returns `query found it` for a word that is also a source's short name, when it stands in a record's own text0 ms
- passed ignores a source's short name where it only marks which source gave a status0 ms
- passed ignores a source's short name where it only marks which source gave a reason a medication was taken for0 ms
given a compact read of several pages 5 passed
- passed returns `backed: true` when the pages that ran hold every row of the views of the absence's kind, in whatever order they ran1 ms
- passed returns `backed: true` for an absence of no kind when the pages run from the first to the one with no `next`1 ms
- passed returns `query cut short` when a page is missing1 ms
- passed returns `query found it` when the match is on a later page0 ms
- passed returns `query cut short` when one of the pages belongs to another read0 ms
Checking a citation of a download checkCitation(), downloadsSource(), isoDate() 29 passed
A download is a file of a person's records as a hospital gave it: FHIR resources in JSON, or a C-CDA document. A citation names a resource or a line of one and gives what the record there holds, field by field, and `checkCitation` returns `ok: true` only when that record's own fields say so: never its reference range, a neighbouring record or the day the file was updated.
Source citations.test.ts
given a citation of a FHIR resource 14 passed
- passed returns `ok: true` for a result's own value, unit and date, the value given as a number or as text42 ms
- passed returns `says otherwise`, with the value in `missing`, for a value that is the reference range's or the interpretation's1 ms
- passed returns `ok: true` for a coded result's text, with its code and date0 ms
- passed returns `says otherwise` for a date that is only when the resource was last updated0 ms
- passed returns `ok: true` for the end of a period given as `end`, and `says otherwise` for it given as `start`1 ms
- passed returns `ok: true` for a medication's name and code and the start of its period0 ms
- passed returns `ok: true` for a name only as whole words of the record's name, in any case1 ms
- passed returns `ok: true` for a status exactly as the resource writes it0 ms
- passed returns `says otherwise` for another status, part of a status, or the resource's `intent`0 ms
- passed returns `ok: true` for a code with the system the resource names for it, and `says otherwise` with another system1 ms
- passed returns `ok: true` for words quoted from a report's conclusion, a medication's dosage text or its instruction to the patient1 ms
- passed returns `says otherwise` for a quote that is other words, or part of a word1 ms
- passed reads a patient's gender, and whether they have died, as a value1 ms
- passed reads a patient's death as an `end`, and never as the date the citation gives without a kind0 ms
given a citation of a line of a file 11 passed
- passed returns `ok: true` for the id, code and date of the C-CDA record the line is in20 ms
- passed returns `ok: true` for a result in a panel, cited by any line of that result2 ms
- passed returns `says otherwise` for the low end of the reference range1 ms
- passed returns `not at that line`, with the first line of the record that does say it in `foundAt`, for a neighbouring record's value2 ms
- passed returns `ok: true` for words quoted from the narrative line cited0 ms
- passed returns `ok: true` for a code with the system its OID names, and `says otherwise` with another system1 ms
- passed takes a C-CDA record's own author time as its recorded date0 ms
- passed takes the document's author time as the recorded date of a record or a narrative line that has none2 ms
- passed returns `says otherwise` for a recorded date the document does not state1 ms
- passed takes a date that follows "reported", "recorded" or "documented" in a narrative line as its recorded date5 ms
- passed takes no recorded date from a date that follows "started", a negated word, or a longer word that ends in one of them2 ms
given a citation with nothing to find 2 passed
isoDate(written) 2 passed
Checking a citation of a view entry checkCitation(), podRowsSource() 13 passed
A reply recorded before facts named a field cites a view entry and copies what it says. `podRowsSource` reads the cited view entry, or the person by the subject's IRI, from the pod's rows, so `checkCitation` holds such a reply to the pod as it holds one to a download.
Rule runtime/currency.feature C9 Source citations.test.ts
- passed returns `ok: true` for a view entry's own result and date1 ms
- passed returns `says otherwise` for a value that is its reference range's0 ms
- passed returns `ok: true` for a code with the system its IRI belongs to, whichever of the vocabulary's namespaces writes it1 ms
- passed returns `says otherwise` for a code with another system0 ms
- passed holds no code of a reason as the code of the medication it was given for3 ms
- passed reads a gene variant's coding expression as a code, never as a name0 ms
- passed returns `ok: true` for a report's name, code and date, and for its issue time as its recorded date1 ms
- passed returns `ok: true` for words quoted from a report's conclusion, a medication's dosage or the text a source wrote, across its line breaks0 ms
- passed returns `ok: false` for a quote that is other words0 ms
- passed returns `ok: true` for a quote or a name only as whole words, in any case and spacing1 ms
- passed reads the person, cited by the subject's IRI: a birth date, a gender as a value, a death as an `end`1 ms
- passed returns `ok: false` for another birth date, another gender, the death given as a birth date, or an IRI that is not the subject's0 ms
- passed returns `ok: true` for `ruled out` or `refuted` of a condition its source refutes, and never for `resolved`0 ms
Checking what a reply says downloads lack checkRecordsAbsence() 20 passed
For a reply about downloads, an absence names the files that were looked through in place of a tool call. `checkRecordsAbsence` backs it only when those are all the files that could hold it, each was read, and no record in them matches.
Source citations.test.ts
checkRecordsAbsence(absence, { files, read, text }) 5 passed
- passed returns `backed: true` when the absence names every file, each was read and none holds a match21 ms
- passed returns `source not read`, naming the file, for a named file that was not read0 ms
- passed returns `sources leave out`, naming the files, when the absence's `sources` miss a file0 ms
- passed takes an absence that names no `sources` to name every file5 ms
- passed returns `records hold it`, naming the file, when a record holds one of the absence's codes or words2 ms
with a tie (`tied`) 1 passed
given an absence after a day (`match.after`) 6 passed
- passed returns `backed` for a matching record dated before that day, and `records hold it` for one dated after it10 ms
- passed ignores when a record was written or updated: FHIR `meta.lastUpdated`, a C-CDA author's time1 ms
- passed returns `records hold it` for a narrative row dated in words on that day, and `backed` for one dated the day before0 ms
- passed takes a partial date, a year or a year and month, to be the whole period it names4 ms
- passed reads no partial date in a quantity's value or inside a longer number0 ms
- passed reads no date in a code that is a long number0 ms
given a record its source withdrew 7 passed
- passed ignores a FHIR condition that is `refuted` or `entered-in-error`, with or without a day0 ms
- passed returns `records hold it` for a `confirmed` one0 ms
- passed ignores a C-CDA record that is negated or nullified, with or without a day0 ms
- passed ignores a narrative row that says it was entered in error, even after a cell or a clause that says no2 ms
- passed returns `records hold it` for a narrative row that denies being entered in error, however it is worded1 ms
- passed ignores a narrative line that says a condition was ruled out1 ms
- passed returns `records hold it` for a line that says it was not ruled out, or has yet to be0 ms
given a JSON download that begins with a newline or a byte-order mark 1 passed
- passed reads it as JSON1 ms
Building an app from the guide guide/AGENTS.md 16 passed
`guide/AGENTS.md` ships in the package and tells a developer, or a coding agent, how to build an app on a pod, with JavaScript examples and with templates, the Turtle an app fills in for what a person enters and judges. These checks run the examples as one program and hold the guide's lists to the vocabulary, so what the guide says is true of this build.
Rules conformance/alex-rivera/alex-rivera.feature P8 conformance/alex-rivera/alex-rivera.feature P11 conformance/alex-rivera/alex-rivera.feature P13 conformance/alex-rivera/alex-rivera.feature P16 conformance/alex-rivera/alex-rivera.feature P24 conformance/alex-rivera/alex-rivera.feature P25 Source guide.test.ts
given the guide's `js` examples, run in order as one program 5 passed
- passed runs every example to the end1 ms
- passed asks the person once before the hospital example imports, showing one source that holds none of the subject's records yet135 ms
- passed brings the record of the patient the example signs in as into a pod of its own: as many active allergies as the demo hospital holds202 ms
- passed shows each allergy as active, with the most severe criticality its records state and one record beneath for each it counts26 ms
- passed leaves a pod that conforms to the vocabulary's shapes603 ms
given the pod the examples leave, read through named questions 8 passed
- passed shows an owner-entered record from each template in its view: an allergy, a condition, an immunization and a procedure3 ms
- passed shows the members of each counting Same the person filed in one view entry0 ms
- passed shows the members of each Different in view entries of their own0 ms
- passed shows the new asthma record alone in its view entry, as active Asthma, and the old one still with bronchitis0 ms
- passed hides each record the person judged Erroneous0 ms
- passed counts no judgment the person retracted0 ms
- passed leaves the profile the person said was not theirs unclaimed, and its records in no view1 ms
- passed counts the About the person filed for a profile claimed on its own7 ms
given the guide's lists 3 passed
- passed lists under Questions, Lenses and What a pod holds exactly the vocabulary's named questions, lenses and views16 ms
- passed names, for each question whose columns it gives, only columns the question returns, and all of them but those ending in `Label`12 ms
- passed gives, as the line that installs cascade-reference-tables, the build this repository tests with4 ms
Refusing an option a call does not know import(), openPod(), connect(), pull(), serverReport(), findChanges(), samplesToPublish() 31 passed
Source options.test.ts
given a key no call takes 19 passed
- passed throws from `openPod`, naming the call and the key1 ms
- passed throws from `pod.import`, naming the call and the key0 ms
- passed throws from `pod.connect`, naming the call and the key0 ms
- passed throws from `pod.enter`, naming the call and the key0 ms
- passed throws from `pod.ask`, naming the call and the key0 ms
- passed throws from `connect`, naming the call and the key0 ms
- passed throws from `serverReport`, naming the call and the key0 ms
- passed throws from `pull`, naming the call and the key1 ms
- passed throws from `loopbackSignIn`, naming the call and the key4 ms
- passed throws from `popupSignIn`, naming the call and the key0 ms
- passed throws from `findChanges`, naming the call and the key0 ms
- passed throws from `changesIn`, naming the call and the key0 ms
- passed throws from `podReads`, naming the call and the key0 ms
- passed throws from `cascadeRuntime`, naming the call and the key0 ms
- passed throws from `replayKit`, naming the call and the key0 ms
- passed throws from `kitStory`, naming the call and the key0 ms
- passed throws from `samplesToPublish`, naming the call and the key0 ms
- passed throws from `toolRegistry.register`, naming the call and the key0 ms
- passed throws from `answersToPublish`, naming the call and the key0 ms
given a key a call took under another name 4 passed
- passed names the new key and the build that renamed it, for `aboutSubject` of `pod.import()`0 ms
- passed names the new key, and no build, for `claim` of `pod.import()`0 ms
- passed names `lookups` and the build that renamed it, for `look` of `samplesToPublish()` and `answersToPublish()`0 ms
- passed says only that it does not take the key, for a name another call renamed0 ms
given a key that is also a name on every object 1 passed
given an unknown key whose value is undefined 1 passed
- passed throws, naming the key0 ms
given a `timeBudgetSeconds` or `memoryBudgetMiB` that is not a number the Bridge can take 1 passed
given a `claimProfiles` that is not a list of profile IRIs 2 passed
given several keys the call does not take 1 passed
given something that is not an options object 1 passed
given the keys a call takes, or none 1 passed
Flame graphs of a build perf-trace.ts, perf-flame.mjs, perf-runs.mjs 28 passed
The flame graphs of a build: a traced probe that gives every call with the call it ran inside, the trace file and the own times drawn from those calls, the CPU profiles kept with their workers' beside them, and the pages that serve them.
Source perf-flame.test.ts
given spans that run at the same time, inside one that began first 2 passed
given calls that overlap and calls inside calls 8 passed
- passed takes a span's own time as the time none of the calls inside it were running, once where its calls overlap1 ms
- passed counts the time some call of a name was running once when two calls of it run together0 ms
- passed puts calls that nest on one track and a call that does not nest on a track beside it, each track properly nested5 ms
- passed writes whole microseconds, no args that would split one step into many frames in speedscope, and the glossary's words once in otherData1 ms
- passed leaves out the shortest calls past a limit and says so, their time staying their parent's own4 ms
- passed draws a call measured elsewhere on a track of its own name1 ms
- passed makes no more than MAX_TRACKS tracks of one name for calls that all overlap, and draws the rest as one merged event for each stretch of time they ran, with how many5 ms
- passed keeps no span of the Bridge's queries in the trace or in any own time, for the Bridge gave no position for them13 ms
given calls that ran at the same time inside different calls 1 passed
given a probed run with its calls 3 passed
given the profiles node wrote for a process and its worker threads 1 passed
given the list of a build's flame graph files 4 passed
- passed names each scenario's five longest steps and, for a pull request, says to download the files and drop them in the viewer11 ms
- passed links each file for a build on main straight into the viewer, the file's address encoded as speedscope reads it0 ms
- passed says how many calls a trace draws merged and how many it leaves out, and lists the Bridge's queries apart with their positions unknown0 ms
- passed says that a close's CPU profile is the whole fresh run0 ms
given the perf-flame branch holding the builds' folders 2 passed
- passed lists them newest first and serves the viewer, the newest builds' files, an index of them, and a link to it from the history page19 ms
- passed shows a build the line of its import beside the plain SQL load and its throughput table, from that build's performance file, and nothing for a build whose file is not there26 ms
given a build whose performance file holds the counts of a pod 1 passed
given builds whose performance files name different Oxigraph builds 1 passed
given a build whose performance file measured the jobs of every day 1 passed
given a build whose performance file measured every query on both engines 1 passed
given two files with the own time of a step 3 passed
- passed ranks the steps whose own time moved, apart from the stages, in a comparison and in a summary, each with its plain sentence3 ms
- passed lists the stages once and leaves out the steps with the longest own time when the caller lists them itself0 ms
- passed keeps the longest own times for the history page beside the longest stages1 ms
Recording a write a model proposed in a pod's files podReads().write 17 passed
Over a folder of pods, `podReads(...).write` files each proposal in the pod, and the files of the act that wrote it hold what Y3 names, alone: the model and the owner, each typed, in their roles.
Rule runtime/consent.feature Y3 Source proposals.test.ts
- passed refuses an entry of prefixes and no statement before the person is asked, as an answer, writing nothing9 ms
- passed refuses an entry that types the owner as a software agent before the person is asked, as an answer, writing nothing5 ms
- passed refuses an entry that types the model as a person before the person is asked, as an answer, writing nothing6 ms
- passed refuses an entry about a subject that is no draft before the person is asked, as an answer, writing nothing4 ms
- passed refuses an entry that states a property the vocabulary does not declare before the person is asked, as an answer, writing nothing187 ms
- passed refuses a Same of records the pod does not hold before the person is asked, as an answer, writing nothing23 ms
- passed refuses an erroneous judgment of a record the pod does not hold before the person is asked, as an answer, writing nothing34 ms
- passed refuses a retraction of a judgment the pod does not hold before the person is asked, as an answer, writing nothing29 ms
- passed refuses a retraction of a judgment already retracted before the person is asked, as an answer, writing nothing21 ms
- passed refuses a model's lone Same over a finding for review, before the person is asked, writing nothing274 ms
- passed passes the check of an entry, a judgment and a retraction the pod accepts, and shows each471 ms
given the question a person is asked 3 passed
- passed types the model and the owner in the file of the entry's act, and associates the model only in its role2 ms
- passed types the model and the owner in the file of the judgment's act, and associates the model only in its role1 ms
- passed types the model and the owner in the file of the retraction's act, and associates the model only in its role1 ms
Recording a write a model proposed under the vocabulary's shapes proposedTurtle() 3 passed
What `proposedTurtle` gives is held to the vocabulary's shapes, those of a person's judgment, of a retraction and of a write a model proposed, as the vocabulary's examples are.
Rule runtime/consent.feature Y3 Source proposals.test.ts
The stacked performance page perf-stacked.mjs 29 passed
The page "Where the time goes, over time": stacked charts of each scenario's steps over the builds, shaped from the performance files kept on perf-data, and drawn as a static page.
Source perf-stacked.test.ts
given builds whose own times are taken from one probed run 4 passed
- passed scales the own times so that the bands and everything else add up to the measured total, whether the own times sum to less than the probed run or to more10 ms
- passed gives a band to the seven steps with the most time across the builds and the rest to everything else, a step a build lacks being nothing there2 ms
- passed draws a build whose file has no own times, from before it had them, as all everything else, and leaves out a build that did not measure the chart1 ms
- passed draws only the newest builds of a window, and one chart for each scenario and size the files measured, in the glossary's order4 ms
given steps charted beside one another 1 passed
given the glossary's sentences 1 passed
given the questions of the question pages, whose sentences differ only by the question 2 passed
given the same steps with other weights 1 passed
given a page of charts and a person who cannot use a pointer 2 passed
given a perf-data checkout with more builds than a chart draws and a file that cannot be read 1 passed
given builds whose files hold the plain load of the same input and what the import handled 3 passed
- passed keeps the rows of the import and the floor on the build's column, draws no chart of the floor, and keeps no other count3 ms
- passed writes, under the chart of the fresh import, the line of the latest build that has a floor and a table of the newest builds' counts and rates6 ms
- passed writes no line and no table for a chart none of whose builds measured the import's parts1 ms
given builds measured on Windows and macOS as well as Linux 4 passed
- passed reads a name that ends in the system as that system's file, and one without as Linux's, each with an id of its own2 ms
- passed draws a chart for each system from that system's builds alone, never one series of two systems1 ms
- passed leaves out a file whose name says one system and whose environment says another, with a warning2 ms
- passed says what one file costs on each system, in microseconds, from each system's newest build, with what the scanner was set to and the range of each time, and draws no verdict from them5 ms
given a perf-data checkout whose newest builds hold the counts of a pod 3 passed
- passed writes a section What a pod holds, with a table of the newest build's counts for each size and no limit set on any, and keeps nothing of the older builds' rows in it10 ms
- passed says source entries or pod records wherever it gives a count, never a bare number of records, on the page and in the glossary4 ms
- passed writes no section for builds none of whose files hold them2 ms
given a perf-data checkout whose newest build measured the jobs of every day 3 passed
- passed writes a section What people do after the first import with one plain line for each job, read against the first import and the reopen of the same build, and no limit set on any5 ms
- passed keeps a job's line from the newest build that measured it when the newest build left that job to the nightly run, and says which build3 ms
- passed shows a job's line only when the build measured it and the first import it is read against, and a build that measured none has no section2 ms
given a perf-data checkout whose newest build measured every query on both engines 2 passed
given the perf-data checkout and the index of builds 2 passed
scoped-runs.test.ts 1 passed
Source scoped-runs.test.ts
Build and packaging 230 passed 1 skipped
Timing an import by mechanism importBench(), syntheticPull(), probing() 32 passed
The import bench imports a synthetic pull of one hospital as the app does, and reports the time and the counts of each place an import spends it, so that a speed-up is argued from a measurement.
Source import-bench.test.ts
given a pull of 200 resources 10 passed
- passed imports it, with nothing refused1 ms
- passed reports every hot spot's span with a non-zero count of calls0 ms
- passed rebuilds the pod twice, once for the import and the judgment that claims its patient and once after the matcher's run, not after each of the three steps4 ms
- passed reports every counted mechanism with a non-zero count0 ms
- passed reports each matcher rule that ran by its justification, with its store queries, none for a rule that applies to no record the import began and has no row0 ms
- passed binds into a comparison's text only the records the import began that its rule applies to0 ms
- passed times each layout view alone, so that the views' spans sum to no more than the build they are in0 ms
- passed counts the rows of each matcher rule that ran0 ms
- passed credits each graph scan to the span that made it, a constant however many versions: arrivals one graph.subjects() scan; refuseUnaccounted one whole-graph scan, three graph.subjects() scans and one pass to build the name index0 ms
- passed prints the table, with a row for each hot spot1 ms
given a pull of 200 resources imported onto a pod that holds another hospital's 4 passed
- passed imports it, with nothing refused0 ms
- passed reports the time of `pod.profilesTied` and of `pod.unclaimedProfiles`, each of which the import calls once0 ms
- passed rebuilds the pod twice, as a first import does0 ms
- passed binds the records of the run into the comparisons' text, the path a first import never takes0 ms
given a pull of 200 resources imported onto a pod that holds another hospital's, closed and opened again 4 passed
- passed imports it, with nothing refused0 ms
- passed reads the build the first import wrote back once, rather than building the pod whole, as the build the import's rebuilds continue from, and derives no matcher view of it apart0 ms
- passed rebuilds the pod twice, as an import onto an open pod does0 ms
- passed reports the time of each close, the pod's database built whole by the first import, at neither close, and kept current by the second import's two steps1 ms
given a pod holding one hospital's pull, closed and opened again, whose next import is refused before the good one 1 passed
given a pull of 200 resources, as a Bundle 3 passed
given the same pull imported into two pods, one probed, one not 1 passed
given a pull of no resources, one, and ten 1 passed
given a pull of 1000 resources, which is two pulls 4 passed
- passed splits it into a first pull and a later one that begins again with the last cycle of the first15 ms
- passed repeats a record only one earlier record has, in pairs and never in chains7 ms
- passed makes reports of laboratory results and notes on others, each naming records that are in the pull1 ms
- passed writes the time of one cycle in three to the minute, as C-CDA does, and the rest to the second5 ms
given a series of two imports of 20 resources into one pod, and a pod of 20 opened again 2 passed
given the same pull of 100 resources imported into an empty pod and into one that holds 300 earlier resources 2 passed
- passed imports it into each, with nothing refused1 ms
- passed lends the matcher its view of the larger pod moving no more quads than of the empty one: the views the build writes stay out of the store across the import's steps, rather than moved out and back for each; a read before the import and after it, as an app reads, moves them out and back once, which grows with the pod0 ms
The performance file perf-report.ts, perf-compare.mjs 130 passed 1 skipped
The runtime's performance file is rows in the Bridge spec's result format: the headline times come from unprobed runs and the stages and counts from one probed run, and a comparison of two files says what moved, as a change in percent and a multiple.
Source perf-report.test.ts
given the names of spans, counts and questions the runtime records 2 passed
given a row with no samples, a name of one part, or a negative time 2 passed
given two files, one slower and with a count that changed 3 passed
given a count of bytes, as a handoff's is 5 passed
- passed is a row in bytes where its counter's name ends in .bytes, and a count of things otherwise0 ms
- passed is in bytes when its row's name was cut at the length a part allows, or numbered because another had it0 ms
- passed is written as bytes by the probed run's count rows too0 ms
- passed is compared as an exact count, in whole bytes, with no word of faster or slower0 ms
- passed is shown in whole mebibytes as a headline size is, and a small one in tenths of one0 ms
given a process whose clock is pinned 5 passed
- passed gives every date and id asked of it the same instant and the next number, and a date it is given as it was21 ms
- passed gives two jobs ids that differ and a later job a later time, and the same job the same ids and time again1 ms
- passed puts the real clock and the real ids back5 ms
- passed writes the same pod from the same record on two runs, which a clock left running does not5.31 s
- passed has the fingerprint of a folder tell two statements apart, and not two labels of one blank node12 ms
given a pod holding a small pull, imported and read with the probe on 4 passed
- passed records the Bridge's own stages as bridge.* spans1 ms
- passed records each named question and each page of one as a span0 ms
- passed draws the Bridge's stages on a track of their own, as children of the convert that waited for them0 ms
- passed has a plain sentence for every stage, own time and count the probe saw, in a row of the performance file6 ms
given a performance file for the history page 1 passed
given the record of a Synthea patient, imported as the person's own 1 passed
given the lifetime record of a Synthea patient, whose Bundle names its entries urn:uuid:, imported as a hospital's pull is 3 passed
- passed writes a handful of files for one entry more, where a record named from the document is named again whole2.46 s
- passed changes only the addresses: each entry is named by its server, each reference to an entry as Type/id, and put back they are the Bundle that was generated287 ms
- passed keeps every question's rows: as many records, and as many rows of each question the first screen asks, as the Bundle with the names it was generated with2.37 s
given a record to load as plainly as SQL can 6 passed
- passed flattens each resource into one row of the table of its type, a scalar as a column and anything nested as JSON text1 ms
- passed puts two fields of one type that differ only in case in separate columns, which SQLite would refuse as one name twice15 ms
- passed reads, parses, flattens and inserts a gzipped Bundle in one transaction, and says what each stage took and how many rows went in8 ms
- passed loads a Bundle with no entry as an empty load, and one whose entries hold no resource as none inserted6 ms
- passed writes the floor's rows under floor-<size>: the median of each stage and their total, and the rows loaded1 ms
- passed is a scenario a run can name on its own, and one the glossary says plainly does no mapping, provenance, matching, views or files0 ms
given a fresh import and the plain load of the same input in one file 4 passed
- passed reads the import, the floor, how many times as long, what the run handled and each phase's rates from the rows0 ms
- passed says it in one line, and has no line for a file with no floor0 ms
- passed shows the line, a throughput table and a plain caption in a summary and in a comparison, and nothing for a file with no import2 ms
- passed keeps the floor's stages for the history page beside the headline times, and no count0 ms
given the glossary 3 passed
given the glossary as the files of a folder, one for each scenario 3 passed
given calls of one span that overlap, as the sealing of every file of an import does 4 passed
- passed takes the time some call was in progress as the span's wall time, and each call's own time into the sum121 ms
- passed keeps the wall time of a span that never overlaps equal to its sum61 ms
- passed takes a span measured elsewhere as its own wall time1 ms
- passed writes the stage row with the wall time as its value and the summed time, with its calls, in what it says0 ms
given a time under a millisecond, as a question answered from the database takes 1 passed
given two files from one kind of hosted runner, taken by different jobs and on a newer kernel 5 passed
- passed says nothing of the machines0 ms
- passed says that a different processor model is a different machine0 ms
- passed says that two files on a different Oxigraph build are not read against each other, and names the build in the file it writes1 ms
- passed says in the file's profile how many runs the headline is the median of, once the large size is run once1 ms
- passed names no job in the environment the harness writes0 ms
given main's file and a pull request's file, both taken in one job 13 passed
- passed heads its table with main and this pull request, and gives the change in percent and the multiple1 ms
- passed says in a sentence for each scenario what main took and what this pull request took0 ms
- passed says that the two were measured in one job on one runner, and names the processor once0 ms
- passed says that both read the Bridge build when it is the same one0 ms
- passed says that the two read different Bridge builds when they differ, how the build picked its own, and that the headline change includes the Bridge's2 ms
- passed blames no Depends-On when the file does not say how the Bridge was picked0 ms
- passed says nothing of the Bridge in the headline when both read the same one0 ms
- passed calls the file this build, not this pull request, in a run that has no pull request0 ms
- passed names the other components whose commits differ between the two0 ms
- passed says the pods differ, and that the times are not the same work, when main's pod and this build's hold a different number of statements, and says nothing when they hold the same3 ms
- passed says in plain words that totals are not comparable when the two runs landed on different CPUs, and still gives the table0 ms
- passed does not say that two runs are on one CPU when a file records none0 ms
- passed reads a CPU model from the runner a file names, and none from a file that names none0 ms
given a pull request whose job could not measure main 6 passed
- passed compares with the latest push to main instead, says that main's own run did not give a file, and says that it was taken on another run1 ms
- passed gives this pull request's own file alone when there is no file of main's at all, saying once that there is none0 ms
- passed does not print the pull request's summary again when the caller has put it on the page already65 ms
- passed exits 0 and falls back when the file of main's run is missing58 ms
- passed exits 0 and falls back when the file of main's run is not a performance file58 ms
- passed uses main's file from the same job when it is there, and the latest push's only to say nothing of it63 ms
given a file with sizes that the one it is compared with did not run 2 passed
given a file as the harness writes it 2 passed
given the starter kit's own files, when its checkout is beside this one 0 passed 1 skipped
- skipped holds the questions the harness asks as the kit's first screen2 ms
no cascade-starter-kit beside this checkout
- skipped holds the questions the harness asks as the kit's first screen2 ms
given the file micro-bench, which says what one file costs on the machine it runs on 8 passed
- passed times each operation per file at 1, 16 and 64 in flight and the one-file write, and leaves nothing in its folder56 ms
- passed makes rows under file-ops-3000-files that the result schema takes and the glossary explains, with the files counted1 ms
- passed names the state of the virus scanner in the rows of a run made with it off or the folder excluded0 ms
- passed is on the history page at 16 in flight, with and without the scanner, and the whole file written at once, and no other count0 ms
- passed is run on request, never by default, and alone when it is named1 ms
- passed reads --scanner-folders as a file micro-bench that changes nothing, with the two folders if they are named, and not with --scanner-compare0 ms
- passed ends a refusal with its message alone and exit code 2, no stack trace203 ms
- passed measures only the file operations when --scanner-folders is given, not the suite the plan runs without it, and refuses another scenario beside it0 ms
given the file micro-bench and a scanner whose checking can be switched and a folder excluded 11 passed
- passed measures as it is, then with live checking off, then with the folder excluded, and leaves a scanner that checked everything as it found it4 ms
- passed records what the runner's scanner is set to and where the files were made, switches all its checking on and takes its excluded folders off for a run, then excludes the folder, and puts every setting back1 ms
- passed puts it back even when a measurement fails2 ms
- passed puts it back, and then exits, when the process is interrupted, told to stop, hung up on or sent Ctrl-Break, and takes its handlers off when the run is over42 ms
- passed lets a second Ctrl-C come while the settings are being put back without ending the put-back or putting them back twice11 ms
- passed puts the scanner back, and exits, when told to stop while a measurement is still running11 ms
- passed does not put it back while it is being set: a signal in the middle of a change waits for it61 ms
- passed runs jobs in turn, the next after the one before has failed too24 ms
- passed puts the excluded folders back before the switch that Defender refuses, through the commands PowerShell is given1 ms
- passed records that switching it off was refused, and measures no run it would have named off2 ms
- passed never touches the scanner unless asked to compare1 ms
given the file micro-bench and a machine whose scanner is only read 8 passed
- passed measures a folder inside an excluded one and one outside, alternating, never changes the scanner, and removes what it made6 ms
- passed finds the folders when none is named: the first excluded folder that can be written to, and the temporary folder3 ms
- passed refuses, with nothing run and nothing changed, a scanner it cannot read, a list hidden from a shell that is not an administrator's, an empty list, a folder not in the list, and two folders in the same state2 ms
- passed says that neither folder is being scanned when live checking is off or Defender is passive, in what it prints before the runs and in its report, and when an entry of the list was not compared6 ms
- passed never picks a system or program folder or a profile folder on its own, says which it skipped, and writes into one only when it is named10 ms
- passed calls a drive's root, a program folder and what is inside one, the profile folders and the folder holding them system folders, and the person's own folders not0 ms
- passed removes the folders it made, and the run's work folder, when the process is interrupted, and exits13 ms
- passed marks a range so wide that one run was far from the others0 ms
given a build of the pod's database that is not probed 1 passed
given the files of a pod, counted by what the pod's layout says they are 3 passed
- passed puts each file in the kind its place gives it, tells a record, a version and a revision apart by the statements that name them, and sums each count over the kinds28 ms
- passed counts a real pod's files, statements and bytes as the folder holds them, whichever kinds they are in879 ms
- passed counts an encrypted pod's files by what they are once opened, as many files of each kind as the same pull makes in a plain pod, and reads no database it cannot open2.40 s
given a database whose build has no dbstat table 1 passed
given the counts of a pod written as rows 2 passed
given the plan's scenarios 1 passed
given a performance file that holds the rows of a pod's counts 4 passed
- passed reads back the kinds, the pod records and the source entries, and groups the kinds into what the source said, history, bookkeeping and what is derived2 ms
- passed keeps the version-to-record links in history and every class adding up to the total, whichever class the versions are given5 ms
- passed says in one line what a fresh import left, per pod record and per source entry, and how much of it is the source's own data1 ms
- passed is read by the summary and the comparison, which list the counts apart from the headline times and say what is new against a file with none13 ms
given a Bundle that is imported again with ten of its source entries changed 2 passed
- passed changes exactly ten laboratory Observations that carry a number, spread evenly through the Bundle, each in its value, version and change time and nothing else, and leaves the Bundle it was given as it was2 ms
- passed gives the same Bundle on every call, says in a sentence what it changed, and refuses a Bundle with fewer Observations to change than that2 ms
given a Bundle that is imported again with one more source entry 1 passed
given the jobs of every day 6 passed
- passed finds the database a sealed pod keeps under its keyed name, which a look for pod.db finds nothing of2.04 s
- passed names a job that took each once as one run in a process of its own, and the first import as the median of its runs1 ms
- passed lists each as a scenario of its own that a run may name alone0 ms
- passed runs the large size once, with each job once and no CPU profile, when the plan says so, and leaves the per-build size as it was0 ms
- passed explains every row the jobs write, in the glossary, with a sentence of the job's own for its total1 ms
- passed is said by the summary and the comparison in one line for each job, and a file of main's with none of them does not stop it2 ms
given every query of the vocabulary asked of one pod on both engines 7 passed
- passed writes the time of each engine, its rows with a fingerprint, whether they agree, and the query that ran past its limit, under the name of the query's file0 ms
- passed has a plain sentence of the glossary for every row it writes0 ms
- passed is a scenario of its own that every build runs, which a run may name alone0 ms
- passed says in plain lines what the adapters' conversion is of the first import, what the SQL versions save, which queries have none and which ran long, read from the rows alone4 ms
- passed names why a query's .sql could not be answered, and counts it neither as one without a SQL version nor in what the SQL versions saved1 ms
- passed says that the reference engine itself failed on a query, as that and not as a SQL version that gave no answer or a query not asked1 ms
- passed is said by the summary and by the comparison with main, before and after with the change and the multiple for what both files measured, and a file of main's with none does not stop it2 ms
The launcher check, when the launcher itself is down 3 passed
The launcher check pulls from the launcher over the network every night, so a red run can be the launcher's doing and not the runtime's. These two helpers of the check decide which failure a red run reports.
Source launcher-sandbox.test.ts
failureToReport(error, launcherAnswers) 1 passed
launcherAnswers(fhirBase) 2 passed
The launcher check, when the launcher responds 3 passed
Source launcher-sandbox.test.ts
failureToReport(error, launcherAnswers) 1 passed
launcherAnswers(fhirBase) 2 passed
- passed asks for the launcher's `metadata`1 ms
- passed returns true for a response below 500, a 429 among them0 ms
The launcher check, when the runtime's failure is not one the launcher's silence explains 2 passed
Source launcher-sandbox.test.ts
failureToReport(error, launcherAnswers) 2 passed
cascade-runtime/check, cascade-runtime/terms and cascade-runtime/tools in a browser bundle 3 passed
Source pod-tools.test.ts
Row files kept between builds of the package 10 passed
Building the package fetches the rows of every reference table, about 200 MB. The build keeps them in a folder, each file named by the SHA-256 of its bytes, and reads them from there the next time.
Source rowCache.test.ts
withKeptRows(fetch, folder) 4 passed
pruneRows(folder, now) 6 passed
- passed drops a row file no read has touched for 30 days0 ms
- passed keeps a row file a read has touched within 30 days0 ms
- passed keeps an old file that a read has just touched0 ms
- passed drops a half-written file an hour old, and keeps a newer one0 ms
- passed keeps every file the build did not write0 ms
- passed does nothing for a folder that does not exist1 ms
Starter copies of the reference tables, as the package is built with them 4 passed
Source tables.test.ts
writeStarterCopies(options, write) 4 passed
- passed writes each version's rows as the feed published them, gzipped, and no copy as a store keeps them0 ms
- passed writes each version's search list beside its rows0 ms
- passed writes no version of a table kind the app reads nothing of11 ms
- passed gives a store the same rows as a check of the feed keeps16 ms
Transpiling before the tests scripts/transpile.mjs 4 passed
`npm test` compiles with `scripts/transpile.mjs`, which strips types with esbuild and is much faster than `tsc -b`. These checks hold that it leaves a `dist` that `tsc -b` would have left. Each leaf builds a workspace of its own, because each one changes it.
Source transpile.test.ts
given a workspace that `tsc -b` built once 3 passed
given a package whose `tsconfig.json` it does not mirror 1 passed
- passed exits with status 1, naming what differs57 ms
Breaking changes in a build's notes breakingOf(), mergedPullRequests(), breakingNotes(), breakingSince() 23 passed
The `## Breaking` lines of each pull request, which the build notes of a release open with, and the check that a pull request has them.
Source pack-breaking.test.ts
breakingOf(body) 9 passed
- passed returns the lines of the section, each without its bullet6 ms
- passed returns no lines and no problem for None0 ms
- passed reads a body written with Windows line ends2 ms
- passed reads a body written with lone carriage returns, a byte order mark and U+2028 or U+2029 line ends0 ms
- passed strips a number from a numbered item as it does a bullet0 ms
- passed stops the section at the next heading0 ms
- passed stops the section at a --- rule or a Depends-On line, so a footer is not read as a line0 ms
- passed reads a next line end, a full-width digit and an arrow beside one as text, as the Python readers do0 ms
- passed reports a problem, naming what is wrong, for each body the check must refuse2 ms
mergedPullRequests(subjects) 1 passed
breakingNotes(entries) 4 passed
- passed opens with a heading and names the pull request of each line0 ms
- passed names the repository of a pull request that is not the runtime's, and a line said twice once0 ms
- passed keeps a pull request whose section is unreadable as a line saying why, and drops one with no section1 ms
- passed says Breaking changes: none when no pull request lists a line3 ms
breakingSince(repository, sha, get) 9 passed
- passed collects the lines of every pull request merged since the newest build before this one, however GitHub orders its releases1 ms
- passed compares with the newest build made before this one by its creation time, not the first in the list0 ms
- passed reads every page of releases0 ms
- passed collects the lines of the pull requests merged in each component since the commit the build before carried0 ms
- passed reads every page of a long history0 ms
- passed compares with the newest build that is an ancestor of this one, so a re-run of an older main run never says none wrongly3 ms
- passed says none when every earlier build is ahead of this one0 ms
- passed says none when the repository has no build before this one0 ms
- passed throws when GitHub refuses a pull request, so a build never omits a line unseen1 ms
Dependencies of the packed package mergedDependencies(), undeclaredImports(), vendored() 8 passed
What `npm run build:package` checks and copies so that the published package installs with everything its compiled code imports.
Source pack-dependencies.test.ts
mergedDependencies(declarers) 2 passed
undeclaredImports(stage, workspaces, declared) 3 passed
vendored(packages, from, modules) 3 passed
- passed copies a package with everything it depends on into one flat folder0 ms
- passed keeps only the files a package names, beside its manifest, and leaves what only builds it out of the copy and out of its manifest4 ms
- passed resolves each dependency from the package that needs it, not from another version above it3 ms
Annotating a red run's failures failure-annotations.ts 5 passed
A node:test reporter for CI: it writes one GitHub `::error::` line for each failing test, so a red run's summary names the test and why, not only an exit code.
Source failure-annotations.test.ts
given a run's `test:fail` events 5 passed
- passed writes one `::error::` line for a failing test, with its name and the first line of its error1 ms
- passed writes nothing for a test that passed, for one that was skipped, and for a parent whose subtests failed0 ms
- passed appends the next line that is not empty when the first ends in a colon, which is where an assertion says what differed0 ms
- passed escapes a percent sign, a carriage return and a line feed as GitHub's workflow commands require, in the test's name too0 ms
- passed writes nothing for a failing test marked `todo` or `skip`, which node does not fail the run for0 ms
Tripwire: copies of the kits' data kept in other repositories 3 passed
The made-up people of the vocabulary's kits are copied into the FHIR adapter's fixtures and saved from the sandbox's demo hospital. These checks fail when one copy changes and the other does not.
Source people-copies.test.ts, story-pulls.test.ts
given the FHIR adapter's fixtures 2 passed
given the pulls a kit saves of a sandbox story, `tamsin-vale` 1 passed
mcp 36 passed
mcp 36 passedcascade-mcp 0.0.0 · commit 326fc39 · unreleased: what main does today, not a compatibility promise
cascade-mcp, a command that serves a folder of pods to an MCP client, such as Claude Desktop or VS Code, over its standard input and output. It offers the tools of cascade-runtime/tools: those that read to any client, and those that propose a write only to a client that can ask the person, who must say yes to each.
Glossary
- isError
- the flag on an MCP tool's result that says the call failed; the result's text is then the reason.
- MCP (MCP client, MCP clients, MCP server)
- Model Context Protocol: an open standard by which an app that runs a model, the MCP client, starts a program, the MCP server, and calls the tools it offers.
- model (models)
- a language model that an app lets answer a person's questions about their records.
- pod (pods)
- one person's records, and what that person has said about them, kept as files in one folder.
- reference tables (reference table)
- public code lists, such as RxNorm for medicines, that tell a runtime when two codes mean one thing.
cascade:ReferenceSeries - standard error (standard output, standard input)
- a program's second output stream, where it writes what it has to say to a person; cascade-mcp's standard output carries only the protocol.
- tool (tools)
- a function a model may call: a name, a description, a JSON Schema for its input, and the code that runs it.
No entry matches.
Serving a folder of pods to an MCP client cascade-mcp --pods, --check-tables 5 passed
`cascade-mcp --pods <folder>` is started by an MCP client and offers it the tools a model reads a pod with, over the pods in the folder. What each tool returns is on cascade-runtime's page, from "Tools a model reads a pod with" to "Checking a pod against the reference tables"; here is what the command adds.
Source mcp.test.ts
when a client connects 3 passed
when a tool refuses its input 1 passed
- passed answers with `isError` and the tool's reason7 ms
when started without `--check-tables` 1 passed
Asking the person before a write elicitation 27 passed
`cascade-mcp` offers the tools that propose a write only to a client that declares it can show the person a question (MCP elicitation), and asks the person with each call: a write happens only on a yes, to that call.
Rule runtime/consent.feature Y2 Source elicitation.test.ts
when a client declares no elicitation capability 2 passed
when a client declares elicitation 20 passed
- passed lists every tool of `cascade-runtime/tools`1 ms
- passed sets each tool's annotations from its tier: `readOnlyHint` for a tool at free, and `destructiveHint` without it for a tool at ask1 ms
- passed no longer says it is read only, in its description or its instructions0 ms
- passed propose_entry: asks once, naming the client, and writes the proposal when the person accepts9 ms
- passed propose_entry: writes nothing, and says no, when the person's action is decline1 ms
- passed propose_entry: writes nothing, and says dismissed, when the person's action is cancel1 ms
- passed propose_entry: writes nothing, and says dismissed, when the person's action is accept without ticking2 ms
- passed propose_entry: writes nothing, and says dismissed, when the person's action is accept leaving the box out1 ms
- passed propose_judgment: asks once, naming the client, and writes the proposal when the person accepts2 ms
- passed propose_judgment: writes nothing, and says no, when the person's action is decline1 ms
- passed propose_judgment: writes nothing, and says dismissed, when the person's action is cancel1 ms
- passed propose_judgment: writes nothing, and says dismissed, when the person's action is accept without ticking1 ms
- passed propose_judgment: writes nothing, and says dismissed, when the person's action is accept leaving the box out1 ms
- passed propose_retraction: asks once, naming the client, and writes the proposal when the person accepts1 ms
- passed propose_retraction: writes nothing, and says no, when the person's action is decline1 ms
- passed propose_retraction: writes nothing, and says dismissed, when the person's action is cancel1 ms
- passed propose_retraction: writes nothing, and says dismissed, when the person's action is accept without ticking1 ms
- passed propose_retraction: writes nothing, and says dismissed, when the person's action is accept leaving the box out1 ms
- passed asks again for the same call, so a yes is for the one call it answers2 ms
- passed names the same model for every call of the connection, and another model for another connection11 ms
when a person leaves the question unanswered 1 passed
when the client stops waiting for a call before the person answers 1 passed
when a client speaks the 2026-07-28 revision to `cascade-mcp --pods` 1 passed
when `cascade-mcp --pods` serves a pod to a client that accepts 2 passed
Starting cascade-mcp --pods, --help 4 passed
The command keeps its standard output for the protocol, so what it has to say to a person goes to standard error. A start it cannot serve ends with status 2 and the usage.
Source mcp.test.ts
when started with no `--pods` 1 passed
with a `--pods` that is no folder 1 passed
- passed exits with status 2, naming the folder0 ms
with a flag it does not have 1 passed
- passed exits with status 2, with the usage0 ms
with `--help` 1 passed
fhir-pull 48 passed
fhir-pull 48 passed@cascade-runtime/fhir-pull 0.0.0 · commit 326fc39 · unreleased: what main does today, not a compatibility promise
The importer for a pull: it saves what pull() fetched from a hospital as files, and reads them back as documents for an import. It does the same for what a hospital's server said of itself at a connection. cascade-runtime exports pullFiles() and connectFiles() from here; the rest is called by pod.look(), pod.import() and pod.connect().
Glossary
- as-of date
- the instant a hospital answered as of: its records as they stood then, which is not when the document was made or arrived. Only the host that made a demo hospital sets one; a pull from a real hospital has none.
cascade:answeredAsOf - the party that wrote a document's content, such as the hospital whose server gave the record. A document is attributed to its author.
cascade:AuthorRole - the URL of a hospital's sign-in page, as its server publishes it.
- Bundle
- FHIR's resource that holds other resources; a pull keeps everything it fetched in one.
- C-CDA
- Consolidated Clinical Document Architecture: HL7's standard for the XML summary documents patient portals hand out.
- CapabilityStatement
- FHIR's resource in which a server says what software it is and what it supports, served at `<FHIR base>/metadata`.
https://hl7.org/fhir/R4/capabilitystatement.html - client id
- the name a hospital's vendor knows an app by, which the app sends when a person signs in.
- connection (connections)
- one sign-in of one person at one hospital's server. `connect()` returns it as a `Connection`, good for one pull; `pod.connect()` stores the pod's record of it.
cascade:ConnectToServer - custodian (custodians)
- the organisation that keeps a document and answers for its true copy.
cascade:CustodianRole - document (documents)
- one file that an import takes whole and gives to an adapter: a FHIR resource or Bundle in JSON, or a C-CDA document. The pod keeps its bytes.
- DocumentReference (DocumentReferences)
- FHIR's resource for a document a hospital holds about a patient, such as a clinical note or a C-CDA document: it points to the document by URL, or carries it inline.
cascade:ClinicalNoteOrDocument - FHIR
- Fast Healthcare Interoperability Resources: HL7's standard for health records as JSON.
https://hl7.org/fhir/R4/ - FHIR base (FHIR bases)
- the URL of a hospital's FHIR server; each record there is at `<FHIR base>/<type>/<id>`.
cascade:serverBaseUrl - importer (importers)
- the part of the runtime that knows one form of export: it says which files are its documents and what the export states about each. `pod.look()` and `pod.import()` try each importer in turn.
- index entry (index entries)
- one thing `index()` lists for `pod.look()` to count: something an import would bring, with its source's name, its kind or section, and when it was received, each only where the export states it.
- media type (media types)
- the standard name of a file's format, such as `application/fhir+json`; an import offers a document to the adapters of its media type.
- origin (origins)
- the scheme, server name and port of a URL, such as `https://hospital.example`: what a browser treats as one site.
- patient (patients)
- the person an export's records are about, as that source knows them, before anyone has said who they are in the pod.
cascade:PatientProfile - pod (pods)
- one person's records, and what that person has said about them, kept as files in one folder.
- pull (pulls, pulled, pulling)
- the records one patient has at one hospital, as `pull()` fetched them in one go, with the FHIR base they came from and when; also the fetching itself.
- record (records)
- one thing said about a person's health, such as an allergy, a medication or a lab result.
cascade:Record - record class (record classes)
- the vocabulary's class for one kind of record, such as `cascade:LaboratoryTestResult` for a lab result.
- resource (resources)
- one record in FHIR, named by its type and its id, such as `Observation/ldl-1`.
- search (searches)
- one request to a hospital for a patient's records of one type, such as Condition; a plan lists them, and a hospital may answer a search a page at a time.
- SMART configuration
- what a hospital's server publishes at `<FHIR base>/.well-known/smart-configuration`: where its sign-in page and its token exchange are, and what they support.
- source (sources)
- one hospital server, or one document, whose records an export holds.
- transmitter
- a party that passed a document on without writing it, as Apple Health does with a hospital's records. A document is never attributed to its transmitter.
cascade:TransmitterRole
No entry matches.
Saving a pull as files pullFiles() 6 passed
`pullFiles` turns what `pull()` fetched from a hospital into the files of one folder, which `pod.look()` and `pod.import()` take as they take an export: `bundle.json`, the FHIR resources; `pull.json`, everything else the pull holds; and a file for each C-CDA document the pull read. `pull` is what `pull()` fetched, and `name` is the name of the folder the files are saved under.
Source importer.test.ts
pullFiles(pull, name) 6 passed
- passed returns `pull.json` and `bundle.json` under the folder's name2 ms
- passed saves each C-CDA document read as `document-<n>.xml`, and gives its path in `pull.json`0 ms
- passed keeps, for a document the hospital would not give, its words in `notRead`, and no `path`0 ms
- passed leaves `documents` out of `pull.json` for a pull that read none0 ms
- passed saves once a document whose bytes two entries of the pull hold0 ms
- passed throws `TypeError` for a name that is not one folder's name1 ms
Refusing a pull an import cannot state PullRefused, pullFiles(), fhirPull.documents() 10 passed
An import states where a pull came from, so a pull whose `pull.json` does not say so plainly is refused, with a sentence that says which part. `pullFiles` refuses it before it is saved, and `documents` refuses one saved some other way. Each sentence reaches the person who asked for the import. `files` is what reads a saved folder's files, by path (`read(path)`, and `list(folder)` for the paths under a folder), and `folder` names the saved pull's folder in it.
Rule runtime/arrivals.feature A14 Source importer.test.ts
pullFiles(pull, name) 6 passed
- passed throws `PullRefused` for a FHIR base that is not a plain `https:` URL1 ms
- passed throws `PullRefused` for a patient that is no FHIR id0 ms
- passed throws `PullRefused` for a source with no name0 ms
- passed throws `PullRefused` for a time of the pull that is not a real time in UTC0 ms
- passed throws `PullRefused` for an as-of date with no time0 ms
- passed throws `PullRefused` for a list of searches, answered or denied, that is not one0 ms
fhirPull.documents(files, folder) 4 passed
- passed rejects with `PullRefused`, giving the sentence `pullFiles()` gives, for each pull `pullFiles()` refuses, saved as a `pull.json`1 ms
- passed rejects for a `pull.json` that is not a JSON object0 ms
- passed rejects for a document that names no file and no reason0 ms
- passed rejects for a document read from a URL that is not on the hospital's origin, or not as a URL writes it1 ms
Reading a saved pull as documents fhirPull.documents() 5 passed
`documents` is what an import takes from a saved pull: the Bundle as one document, then each C-CDA document the pull read, in the order `pull.json` lists them.
Source importer.test.ts
documents(files, folder) 5 passed
- passed returns undefined for a folder that holds no `pull.json`0 ms
- passed returns the Bundle first, as saved, of media type `application/fhir+json`0 ms
- passed returns each C-CDA document after it, as read, of media type `application/cda+xml`0 ms
- passed rejects for a folder with no `bundle.json`0 ms
- passed rejects for a folder without a document that `pull.json` names0 ms
Stating where a pull's records came from PullDocument.facts() 12 passed
`facts` is what the pull says of one document: the hospital as its author, the patient who signed in, when it was read, and which searches the hospital answered or refused. A pod uses the last to tell "the hospital has none" from "the hospital would not say".
Rules runtime/arrivals.feature A21 runtime/arrivals.feature A18 Source importer.test.ts
given the pull's Bundle 9 passed
- passed states the import's label, "FHIR pull", and the time it started1 ms
- passed states the hospital's FHIR base, the time of the pull and the patient who signed in0 ms
- passed names the hospital as the author, and no transmitter1 ms
- passed states no as-of date for a pull that has none0 ms
- passed states a pull's as-of date as `cascade:answeredAsOf`, never as the time the document was made7 ms
- passed states no record class for a pull that lists no searches0 ms
- passed states the record class of each search the hospital answered0 ms
- passed states the record class of each search the hospital refused, and not as answered0 ms
`PrescribedOrReportedMedication` is both answered, by the search for MedicationRequest, and refused, by the one for MedicationStatement; the hospital answered one kind of medication record and refused the other.
- passed states no record class for a search whose resources become no record0 ms
An Encounter, and an Observation of vital signs, are searched for and become no record, so they have no class.
given a C-CDA document the pull read 3 passed
Listing a saved pull's records before an import fhirPull.index() 6 passed
`index` is the look at a saved pull: what `pod.look()` counts, so that what a person approves is what the import brings. It counts a resource of the Bundle only where the import makes a record of it, and a C-CDA document by its `entry` elements, as a downloaded C-CDA's look does.
Source importer.test.ts
index(files, folder) 6 passed
- passed returns undefined for a folder that holds no `pull.json`0 ms
- passed returns one index entry for each resource that becomes a record, with the hospital's name, its FHIR base, the kind and the time of the pull0 ms
- passed leaves out a resource that becomes no record0 ms
Of the Bundle's resources, the Patient, a vital-signs Observation, an Observation whose `category.coding` is no list, an Observation that groups others by `hasMember`, an Encounter and a Medication make no record.
- passed leaves out a DocumentReference whose content is a structured C-CDA document0 ms
Of the Bundle's four DocumentReferences, `n2` and `n4` hold a structured C-CDA document, by the format code of HL7 and of IHE; the other two, one with no content and one whose content is `ccda-nonXMLBody`, are notes.
- passed returns, after the Bundle's, one index entry for each `entry` element of each C-CDA document read, by its custodian and section7 ms
- passed rejects for a `bundle.json` that is no Bundle0 ms
Saving and reading what a hospital's server said of itself connectFiles(), readConnect(), ConnectRefused 9 passed
A connection to a hospital's server is saved as the files `pod.connect()` records: the FHIR base, the client id the app signed in with, the server's CapabilityStatement and, where it has one, its SMART configuration. `readConnect` reads from them what the pod records of the server. One the import would refuse is refused by `connectFiles` and by `readConnect`, with one sentence.
Rules runtime/arrivals.feature A16 runtime/arrivals.feature A14 Source importer.test.ts
readConnect(files, folder) 7 passed
- passed returns the FHIR base and the client id as saved0 ms
- passed returns the base URL, the authorization endpoint and the software's name as the server wrote them0 ms
- passed leaves out what the server wrote as an empty string0 ms
- passed prefers the authorization endpoint of the SMART configuration to the CapabilityStatement's0 ms
- passed rejects with `ConnectRefused` for a connect the import would refuse0 ms
- passed rejects with `ConnectRefused` for a folder with no `connect.json`2 ms
- passed rejects with `ConnectRefused` for a folder with no `capability.json`0 ms
connectFiles(connect, name) 2 passed
ccda-download 27 passed
ccda-download 27 passed@cascade-runtime/ccda-download 0.0.0 · commit 326fc39 · unreleased: what main does today, not a compatibility promise
The importer for a C-CDA document downloaded from a patient portal: it hands the file on whole for an import, with what the document's header says. pod.look() and pod.import() call it; an app does not.
Glossary
- adapter (adapters)
- the program that converts an export into records; `import` loads it on first use.
- C-CDA
- Consolidated Clinical Document Architecture: HL7's standard for the XML summary documents patient portals hand out.
- CDA
- Clinical Document Architecture: HL7's XML standard for clinical documents, whose root element is `ClinicalDocument`. C-CDA is the set of CDA templates US patient portals use.
- CDA time (CDA times)
- a time as CDA writes it: `YYYYMMDD`, then optionally hours, minutes and seconds, then optionally an offset from UTC, such as `20250403083000-0400`.
- custodian (custodians)
- the organisation that keeps a document and answers for its true copy.
cascade:CustodianRole - document (documents)
- one file that an import takes whole and gives to an adapter: a FHIR resource or Bundle in JSON, or a C-CDA document. The pod keeps its bytes.
- download (downloads)
- a file of a person's records as a hospital's server or portal gave it, before any import: FHIR resources in JSON, or a C-CDA document.
- id (ids)
- in CDA, an identifier in two parts: a `root`, an OID or a UUID that says who issued it, and an optional `extension`, the value that issuer gave.
- importer (importers)
- the part of the runtime that knows one form of export: it says which files are its documents and what the export states about each. `pod.look()` and `pod.import()` try each importer in turn.
- index entry (index entries)
- one thing `index()` lists for `pod.look()` to count: something an import would bring, with its source's name, its kind or section, and when it was received, each only where the export states it.
- media type (media types)
- the standard name of a file's format, such as `application/fhir+json`; an import offers a document to the adapters of its media type.
- NPI
- National Provider Identifier: the ten-digit number the US government gives each provider of health care; in CDA an id whose root is `2.16.840.1.113883.4.6`.
- nullFlavor
- CDA's attribute that says a value is absent and why, such as `UNK` for unknown; an id that carries one identifies nothing.
- patient (patients)
- the person an export's records are about, as that source knows them, before anyone has said who they are in the pod.
cascade:PatientProfile - record (records)
- one thing said about a person's health, such as an allergy, a medication or a lab result.
cascade:Record - scope (scopes)
- the two ids a record from a C-CDA document is named under: one of the document's custodian and one of its patient. Two downloads with the same scope give the same record the same name.
- section (sections)
- one titled part of a C-CDA document's body, such as Medications or Allergies, holding an `entry` element for each coded record.
No entry matches.
Recognising a downloaded C-CDA document ccdaDownload.documents(), isCdaDocument() 6 passed
A download is what a person saves from a patient portal: one C-CDA file. `documents` hands it on whole, once it is sure it is one, and leaves any other file to another importer; a file that claims to be one and is not well-formed is refused, not skipped. `files` is what reads the download's files, by path (`read(path)`), and `path` names the one file asked about.
Rule runtime/arrivals.feature A14 Source importer.test.ts
documents(files, path) 4 passed
- passed returns the file as one document of media type `application/cda+xml`4 ms
- passed returns undefined for XML whose root element is not HL7's `ClinicalDocument`0 ms
- passed returns undefined for a file whose name does not end in `.xml`, and for a path, `absent.xml`, that names no file0 ms
- passed rejects for a `ClinicalDocument` that is not well-formed XML1 ms
isCdaDocument(bytes) 2 passed
Saying what a C-CDA document's header states CcdaDocument.facts() 3 passed
The importer says of a download only what its header states: that the import is a "C-CDA download", when it started, and which version of C-CDA the header names. Who wrote the document is the adapter's to read from the document, not the importer's to say, so no author is stated here.
Rule runtime/arrivals.feature A11 Source importer.test.ts
facts(importStarted) 3 passed
- passed states the import's label, "C-CDA download", and the time it started11 ms
- passed states the version of C-CDA that the header names0 ms
- passed states nothing else0 ms
Listing a C-CDA document's entries before an import ccdaDownload.index(), dateOrUtcTimeOf() 10 passed
`index` is the look at a download: what `pod.look()` counts to show a person what an import would bring. It counts each `entry` element once and names its source as the document's custodian.
Source importer.test.ts
index(files, path) 6 passed
- passed returns one index entry for each `entry` element of each section, counting once an `entry` that holds another, and giving a section's title whole when an element breaks it0 ms
- passed gives the custodian's name, not the author's, with its white space collapsed, and no other field than the section and the time0 ms
- passed gives the document's time as `dateOrUtcTimeOf(cdaTime)` returns it0 ms
- passed returns no index entry for a document with no section1 ms
- passed returns undefined for a file `documents()` returns undefined for0 ms
- passed rejects for a `ClinicalDocument` that is not well-formed XML0 ms
dateOrUtcTimeOf(cdaTime) 4 passed
Finding whose records a C-CDA document holds scopesOf() 8 passed
A record from a C-CDA document is named under a scope: an id of the document's custodian and an id of its patient, so that the same record in two downloads gets one name. `scopesOf` reads the scope from the header.
Rule runtime/naming.feature N1 Source importer.test.ts
scopesOf(bytes) 8 passed
- passed returns the custodian's id and the first id of the patient, and no other key0 ms
- passed skips a custodian id that has a nullFlavor, and drops an empty extension0 ms
- passed picks the custodian's NPI where it has one0 ms
- passed picks, with no NPI, the id that sorts first by type and value, however they are ordered7 ms
- passed writes a UUID root in lower case0 ms
- passed returns null for a custodian with no id that names an organization0 ms
- passed returns null for a document that does not state exactly one patient with an id0 ms
- passed returns undefined for a file that is no CDA document0 ms
apple-health 18 passed
apple-health 18 passed@cascade-runtime/apple-health 0.0.0 · commit 326fc39 · unreleased: what main does today, not a compatibility promise
The importer for an Apple Health export: it finds the export's clinical record files and says where and when Apple Health received each. pod.look() and pod.import() call it; an app does not.
Glossary
- attributed (attributes the document, attributes nothing)
- of a document, said to be the work of a party, by `prov:wasAttributedTo`; a pod reads this to say whose word a record is.
- the party that wrote a document's content, such as the hospital whose server gave the record. A document is attributed to its author.
cascade:AuthorRole - document (documents)
- one file that an import takes whole and gives to an adapter: a FHIR resource or Bundle in JSON, or a C-CDA document. The pod keeps its bytes.
- export (exports, exported)
- what a person downloads of their own records: an Apple Health export, or a C-CDA document from a patient portal.
- FHIR
- Fast Healthcare Interoperability Resources: HL7's standard for health records as JSON.
https://hl7.org/fhir/R4/ - importer (importers)
- the part of the runtime that knows one form of export: it says which files are its documents and what the export states about each. `pod.look()` and `pod.import()` try each importer in turn.
- index entry (index entries)
- one thing `index()` lists for `pod.look()` to count: something an import would bring, with its source's name, its kind or section, and when it was received, each only where the export states it.
- IRI
- a web-style identifier, of which a URL is one kind; Turtle writes one between angle brackets.
- media type (media types)
- the standard name of a file's format, such as `application/fhir+json`; an import offers a document to the adapters of its media type.
- pod (pods)
- one person's records, and what that person has said about them, kept as files in one folder.
- record (records)
- one thing said about a person's health, such as an allergy, a medication or a lab result.
cascade:Record - resource (resources)
- one record in FHIR, named by its type and its id, such as `Observation/ldl-1`.
- source (sources)
- one hospital server, or one document, whose records an export holds.
- transmitter
- a party that passed a document on without writing it, as Apple Health does with a hospital's records. A document is never attributed to its transmitter.
cascade:TransmitterRole
No entry matches.
Finding the documents of an Apple Health export appleHealthExport.documents() 4 passed
An Apple Health export is a folder: `export.xml`, which lists the clinical records Apple Health received from hospitals, and one FHIR resource in each file of `clinical-records/`. `documents` hands each of those files on as a document, whether or not `export.xml` lists it, and refuses an `export.xml` it cannot read. `files` is what reads the export's files, by path (`read(path)`, and `list(folder)` for the paths under a folder), and `folder` names the export's folder in it.
Rule runtime/arrivals.feature A14 Source importer.test.ts
documents(files, folder) 4 passed
- passed returns undefined for a folder that holds no `export.xml`1 ms
- passed returns each `.json` file directly under `clinical-records/`, listed in `export.xml` or not, as a document of media type `application/fhir+json`2 ms
- passed leaves out a file that is not `.json` and a file in a folder below1 ms
- passed rejects for an `export.xml` that is not well-formed XML1 ms
Saying where an Apple Health record came from AppleHealthDocument.facts() 10 passed
`facts` is what the importer states of one document: the import and the hospital that wrote the record, which Apple Health only passed on. An import writes it beside the document, so a pod can say whose word a record is: the hospital's, as its author, and not Apple Health's.
Rules runtime/arrivals.feature A21 runtime/arrivals.feature A14 Source importer.test.ts
given a record that `export.xml` lists 5 passed
- passed states the import's label, "Apple Health export", and the time it started11 ms
- passed states the URL the record was read from, its server's base URL, its FHIR version and, in UTC, when it was received1 ms
- passed names the hospital as the author, and attributes the document to it3 ms
- passed names Apple Health as the transmitter, and attributes nothing to it1 ms
- passed keeps a line break in the hospital's name2 ms
given a record file that `export.xml` does not list 2 passed
- passed names Apple Health as the transmitter, and no author3 ms
- passed attributes the document to nobody0 ms
given a record whose attributes cannot be stated 3 passed
Listing an Apple Health export's records before an import appleHealthExport.index() 4 passed
`index` is the look at an export: what `pod.look()` counts to show a person what an import would bring. It reads the records `export.xml` lists, and not the files they name.
Source importer.test.ts
index(files, folder) 4 passed
- passed returns undefined for a folder that holds no `export.xml`0 ms
- passed returns one index entry for each record, with its hospital's name, its server's base URL, its kind and, in UTC, when it was received0 ms
- passed gives Apple's own identifier as the kind of a type it has no word for0 ms
- passed leaves out of an index entry what the record does not state0 ms
graphdb 14 passed
graphdb 14 passed@cascade-runtime/graphdb 0.0.0 · commit 326fc39 · unreleased: what main does today, not a compatibility promise
A loader that copies a pod into a GraphDB server, so that a developer can explore the pod's records with GraphDB's own tools. npm run graphdb -- <name> <GraphDB's base URL> runs it; no app needs it.
Glossary
- derivation (derivations)
- a query a lens carries that works out statements from a pod's files which the files do not hold themselves; what the derivations of a lens work out is the pod's derived state under it.
- derived state
- what a lens works out from a pod's files and keeps beside them: statements the files do not hold themselves. It is kept in a graph of its own, named for the lens (`urn:cascade:derived:<lens>`), apart from the files.
- GraphDB
- Ontotext's database for data written as statements, with a web workbench for browsing and querying it.
- lens (lenses)
- a choice of which judgments count when a question is answered: `everyday` is the default, and `export` is stricter, for records sent elsewhere.
- named graph (named graphs)
- a set of statements kept under a name, an IRI, inside one store; a query can ask which graph a statement is in.
- named question (named questions)
- a query the vocabulary carries under a name, such as `pod/My active allergies`.
- pod (pods)
- one person's records, and what that person has said about them, kept as files in one folder.
- record (records)
- one thing said about a person's health, such as an allergy, a medication or a lab result.
cascade:Record - repository (repositories)
- one database on a GraphDB server, with an ID and a title.
- row (rows)
- one line of a table: of a view, what one view entry holds, a cell per column; of a reference table, what it says of one code or variant.
- saved query (saved queries)
- a SPARQL query that GraphDB keeps under a name, for anyone using the server to run.
- SPARQL
- the W3C query language for data written as statements, as Turtle writes them; `pod.ask()` runs an app's own SPARQL SELECT.
https://www.w3.org/TR/sparql11-query/
No entry matches.
Loading a pod into GraphDB load(), GraphDB 12 passed
`load` copies a pod into a GraphDB server, so that a developer can explore its records in GraphDB's workbench: it creates a repository, sends each file of the pod as a named graph and the derived state as one more, and saves each named question as a saved query. A load that fails leaves no half-filled repository behind, which a second load would refuse. `title` is the pod's title, `store` holds the pod's statements, and `questions` is the named questions by name. The tests run against `test/fake-graphdb.ts`, a local server that answers as GraphDB does.
Source graphdb.test.ts
load(graphdb, title, store, questions) 5 passed
- passed creates the repository1 ms
- passed sends each file of the pod as a named graph, under the file's address0 ms
- passed sends the derived state as one graph, named for its lens0 ms
- passed returns how many graphs it sent0 ms
- passed saves each named question as a saved query, under the question's name0 ms
when the server refuses a graph partway through 3 passed
when a load is run again after one that was refused 1 passed
when the server already holds the repository 2 passed
- passed rejects with `GraphDBRefusal`, saying nothing changed0 ms
- passed leaves the repository as it was0 ms
when the server gives no answer 1 passed
Asking a GraphDB repository a question GraphDB.ask() 2 passed
`ask` sends a SPARQL query to a repository and returns the rows the server answers, in the form `pod.ask()` returns them, so that a question written for a pod can be tried in GraphDB.
Source graphdb.test.ts
ask(query) 2 passed
- passed sends the query as written0 ms
- passed returns the rows the server answers0 ms
runtime 730 passed
runtime 730 passed@cascade-runtime/runtime 0.0.0 · commit 326fc39 · unreleased: what main does today, not a compatibility promise
The core every Cascade package is built on: it files what arrives in a person's pod, names it, runs the matcher and builds the views. Apps call cascade-runtime, which wraps it; this page is for whoever builds on the core itself.
Glossary
- accept (accepts, accepted, unaccepted, decline, declines, declined)
- of an adapter, to take a document it can read and convert it. The saved-output Bridge declines a document its step marks `unaccepted.txt`, and accepts one it saved nothing for.
- act (acts)
- one thing done to a pod that writes files to it: an import, an entry session, a connection to a hospital's server, or a run of the matcher.
prov:Activity - adapter (adapters)
- the program that converts an export into records; `import` loads it on first use.
- adapter's description (description)
- what the Bridge reads from an adapter before loading it: the media type it converts, and the files of the adapter and of the vocabulary it needs to load.
- adopt (adopts, adopted, adopting)
- of an open, to take a newer version of a table the pod uses as the pod's current one.
- Argon2id
- the slow key derivation that turns a secret into a pod's key, so that guessing a secret costs time.
- arrival (arrivals)
- one state of one record as a source reported it, as an adapter hands it to the runtime, before it is filed.
- base URL (base URLs)
- the address of a hospital server's API, which a record read from that server is named from.
- blank node (blank nodes)
- a thing a statement mentions without an IRI, which has no name outside its file.
- Bridge
- the program that runs an adapter on a document and returns what it converted, or the reason it failed.
- built whole
- of a pod: its derived state and the files its build writes worked out from every file, with nothing kept from before.
- C-CDA
- Consolidated Clinical Document Architecture: HL7's standard for the XML summary documents patient portals hand out.
- canonical N-Quads
- a graph's statements written one to a line in the single spelling and order the W3C's RDFC-1.0 fixes, so equal graphs give equal text.
- canonical path
- a path written the one plain way: no `.` or `..` part, no doubled or leading slash, no backslash.
- check (checks, kit check)
- one of the five things `runtime/the-kit.feature` requires of a replay of a kit's story, numbered 2 to 6, such as check 3, "every file conforms to the shapes". Check 1 is that every example passes.
- checkout (checkouts, sibling checkout)
- a folder holding a repository at one commit; a sibling checkout is one in the folder beside the runtime's own.
- ClinVar
- a public database of genetic variants; each has a ClinVar ID.
- code system (code systems)
- a published list of codes for one kind of thing, such as RxNorm for medicines, LOINC for lab tests and SNOMED CT for clinical findings.
- comparison (comparisons)
- a query the vocabulary ships under `queries/matcher/` that returns the pairs of records one rule holds to be one thing.
- component (components)
- a repository the runtime reads when it runs: the vocabulary, an adapter, the reference tables.
- CONSTRUCT (CONSTRUCTs)
- the form of a SPARQL query that returns statements it builds, where SELECT returns rows.
- content-addressed file
- a file named by a hash of what it holds: a document or a version.
- conversion findings
- what an adapter reports about a document beside its graph, saved as `findings.ttl`: what it left out or could not read. Not a finding for review, which is the pod's.
- current version (current versions)
- of a series, the version a pod opened now is given: the newest one the app has kept.
cascade:defaultTableVersion - custodian (custodians)
- the organisation that keeps a document and answers for its true copy.
cascade:CustodianRole - dataset (datasets)
- a pod as a query reads it: a default graph and named graphs.
- default graph
- the statements a query reads outside any `GRAPH` block.
- derivation (derivations, derived)
- a query of the vocabulary that adds to a pod's dataset what follows from its files, such as which revision of a record is current.
- description of a version (descriptions of a version, descriptions of the versions, version's description)
- the file in the pod that says which series a table version belongs to, its number, and which version it revises.
cascade:ReferenceSeries - Different
- a judgment that its members are separate things; it overrules a Same of the two.
cascade:Different - document (documents)
- one file of an export, which the pod keeps under the hash of its bytes.
- EARL
- the W3C's Evaluation and Report Language: a report as RDF, one assertion for each test with its outcome.
- entry session (entry sessions)
- one call of `pod.enter()`: the act that files what the owner typed, as one owner-entered record or several, under a `urn:uuid:` name the app makes once.
- example (examples)
- in a feature, one named run: steps on a pod, then what a query of it must return.
- export (exports, exported)
- what a person downloads of their own records: an Apple Health export, or a C-CDA document from a patient portal.
- fault (faults)
- one sentence a kit check returns, saying one thing wrong with the pod; a check passes when it returns none.
- feature (features)
- a file of the vocabulary that states rules of a pod and, under each, examples.
- finding (findings)
- something the matcher noticed about a pod's records and filed for the owner to answer with a judgment.
cascade:FindingForReview - fingerprint (fingerprints)
- a number the C-CDA adapter works out from the strings of a record that has no id, to tell such records apart.
- first parent
- the parent snapshot that is the same writer's previous snapshot; a writer's first snapshot has none.
- fixture (fixtures)
- a sealed pod, or one sealed file, that the pod encryption vectors carry together with the secrets that open it.
- focus node (focus nodes)
- in SHACL, a node a shape is checking.
- graph (graphs, named graph)
- a set of statements held under a name; each file of a pod is read as the graph named by its address.
- group (groups)
- in SPARQL, the patterns between one pair of braces. A query's WHERE group is the one its WHERE keyword opens, not one inside a sub-select, OPTIONAL, MINUS or UNION.
- handle (handles)
- a short name a kit gives a record or a judgment, with the inputs its name is made from, in the kit's `handles.json`.
- hash (hashes)
- a short code worked out from bytes, such as a file's or the text of an IRI: the same bytes always give the same hash, and any change gives another.
- head
- the snapshot of this app's latest act in a pod.
- header (headers)
- the one file of a sealed pod left readable, `settings/encryption.json`, which says how the pod is sealed.
- HGVS expression
- the standard way to write a genetic variant, such as `NM_000249.4:c.2042C>T`.
- import (imports)
- the act of bringing an export's documents into a pod; its own file lists the documents it kept.
- index (indexes, index by code)
- a file kept beside a version of a reference table that says which rows each code finds, so that the rows need not all be read.
- IRI (IRIs)
- the name of one thing, written as an address, such as `urn:uuid:3b9e2d47-8c15-4f6a-a0d2-7e5c1b9f4a63` or `https://ns.cascadeprotocol.org/cascade#allergenName`; it need not be one a browser can open.
- isomorphic
- of two graphs: the same statements once their blank nodes are matched up.
- judgment (judgments, judge, judges, judged)
- a conclusion about records, made by a person or by a machine.
cascade:Judgment - justification
- the reason a rule gives for a Same, such as "same code".
- kept dataset (kept build)
- a pod's dataset held in memory from one step to the next, in place of a new read of every file.
- kit (kits)
- a story and the exports it uses, which the vocabulary carries for testing, such as `alex-rivera`.
- labels (labels file)
- the file the build writes that gives each thing in a pod (a record, a version, a revision, a document, a view entry, the subject) one name a person can read.
- layout
- the vocabulary's file that says in which folder of a pod each kind of thing is filed.
- lends (lent, lend)
- of the kept dataset: changes it in place into the matcher's view for the length of a run, and puts it back after.
- lens (lenses)
- a choice of which judgments count when a question is answered: `everyday` is the default, and `export` is stricter, for records sent elsewhere.
- linked worktree (worktree, worktrees)
- a second working folder of one checkout, as `git worktree add` makes.
- manifest
- the file the build writes last, which lists the pod's views and says when they were built.
- matcher (matchers)
- the part of a runtime that compares a pod's records and writes a Same for those its rules find to be one thing, such as one allergy reported by two sources.
cascade:CascadeMatcher - matcher judgment (matcher judgments)
- a Same the matcher wrote for records its rules found to be one thing; it names the version of each reference table it used.
- matcher's view
- a pod as the matcher reads it: its files but those the build writes, with the everyday lens's derived state.
- media type (media types)
- the kind of a document as the web names it, such as `application/fhir+json`.
- member (members)
- a record a judgment is about.
prov:hadMember - merged parent (merged parents)
- a parent snapshot that is another head, taken in as a git merge takes in a branch.
- MuHash3072
- the set hash Bitcoin Core uses: one number for each member, multiplied together modulo a 3072-bit prime, so the order of members does not matter.
- N-Triples
- a W3C text format that writes one statement a line.
- naming rule (naming rules)
- a term of the vocabulary that says how one kind of thing is named, from its content or from listed inputs, such as `cascade:VersionNamingRule`.
- new writer
- a writer with no head, or with one the pod does not hold; its first snapshot has no first parent and merges every head in the pod.
- outline
- a Gherkin Scenario Outline: one example written once and run for each row of its table.
- owner (owners)
- the person who keeps a pod and decides what its records mean; in every pod on this page, the subject acting for themselves.
- pack (packs)
- one file holding all of a sample's files, so a page fetches them at once.
- parent snapshot (parent, parents)
- the snapshot that an act's snapshot names as the one before it; a pod's first snapshot has none.
- patient (patients)
- the person an export's records are about, as that source knows them, before anyone has said who they are in the pod.
cascade:PatientProfile - performer
- the function a replay calls to perform steps of one kind, such as an import or an entry session.
- phrase (phrases)
- one wording of a step that `runtime/steps.md` defines, such as "the pod holds no revision".
- placeholder (placeholders)
- the name a view entry has in a pod's derived state, `urn:cascade:entry:` and a hash, until the build names the entry in its view.
- pod (pods)
- one person's records, and what that person has said about them, kept as files in one folder.
- pyshacl
- the SHACL engine the vocabulary's own tests run; the results this package gives are held to its.
- quad (quads)
- one statement together with the graph that holds it.
- realm
- one JavaScript global environment, such as a page or an iframe; an object made in another realm fails `instanceof` here.
- rebuilt in part
- of a step with a kept build: only the records the step reached are derived and written again.
- record (records)
- one thing said about a person's health, such as an allergy, a medication or a lab result.
cascade:Record - reference tables (reference table)
- public code lists, such as RxNorm for medicines, that tell a runtime when two codes mean one thing.
cascade:ReferenceSeries - Refusal
- the error thrown when the package declines a request it understood, such as a name it does not have; it has written no file of the person's.
- refused
- on a call's result, why a rule turned the call down; a refused call wrote no file of the person's, though a pod with a build still rewrites its manifest.
- register (registers, registered)
- of a code system, to give it a URI space in the vocabulary, from which a code's IRI is made.
- release (releases)
- a version of the rule list as shipped; a release may declare an earlier rule wrong.
- renew (renewal, renewed)
- of a kept store, to replace it with a new store filled from the old one, which frees the memory the old one held.
- replay (replays, replayed)
- performing a story's steps, in order, on a new pod.
- restorable union
- a union that can undo what a run did to it: it remembers the graphs it dropped, added to or took subjects from, and `restore()` puts every quad and blank node back.
- retraction (retractions, retract, retracts, retracted)
- the owner taking back a judgment they filed: the judgment stays in the pod and no longer counts.
prov:invalidated - revision (revisions)
- the pod's note that a record took a version at one arrival: which version, when, and from which document. (Of a pod, `revision()` is another thing: a name for the state its files are in.)
- rule (rules)
- a numbered requirement in the vocabulary that every runtime must meet, such as A14 in `runtime/arrivals.feature`; a heading on this page links the rules its API reaches.
- rule list (rule lists)
- the vocabulary's list of what the matcher compares, each line naming a query and the table kind it reads; it has versions, as a reference table has.
cascade:RuleListRow - runtime (runtimes)
- software that reads and writes pods as the vocabulary requires; this package is one.
- Same
- a judgment that its members are one thing, so answers show them once.
cascade:Same - sample (samples)
- a kit's pod saved as files a web page can read.
- saved output
- the graph and conversion findings a kit keeps for each document its story imports, as the Bridge made them.
- sealed (seal, seals)
- of a pod or a file, encrypted on disk so that only the secret opens it.
- secret (secrets)
- the six words that open an encrypted pod; `sixWords()` draws them from the EFF long word list, a public list of 7,776 easy-to-type words.
- seeded
- drawn by a random generator started from a stated number, so a failing case can be drawn again.
- selector (selectors)
- the place in a document an arrival was read from.
- series
- one of the reference tables across its versions, such as RxNorm's product ingredients.
cascade:ReferenceSeries - session (sessions)
- one stretch in which a writer has a pod open. (An entry session is another thing: the act of entering records.)
- set hash (set hashes)
- one hash over the paths and bytes of the files of the set, the same in whatever order they were added.
- SHACL
- the W3C's Shapes Constraint Language, in which the vocabulary's shapes are written.
- shapes (shape)
- 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/ - snapshot (snapshots)
- the set of files a pod held as one act left it, which names the snapshot before it as a git commit names its parent.
cascade:Snapshot - source (sources)
- one hospital server, or one document, whose records an export holds.
- SPARQL
- the W3C query language for data written as statements, as Turtle writes them; `pod.ask()` runs an app's own SPARQL SELECT.
https://www.w3.org/TR/sparql11-query/ - SPARQL constraint (SPARQL constraints)
- a constraint of a shape written as a SPARQL query, each row of which is one thing wrong with the focus node `$this`.
- stand-in (stand-ins)
- in a test, a fast hash used in place of Argon2id where no real key is under test.
- step (steps)
- one scripted action on a pod, such as making it, an import, an entry session or a judgment, named by a letter and a number such as `J10`.
- store (stores)
- what holds graphs and runs SPARQL over them; here Oxigraph.
- story (stories)
- the steps taken with one made-up patient's exports, in order.
- subject (subjects)
- the person a pod is about.
cascade:Subject - sync (syncs)
- the act a writer writes after it received another writer's files; its snapshot merges the heads that arrived.
- table kind (table kinds)
- what a reference table's rows say, such as product ingredients or vaccine groups; the vocabulary declares each kind.
cascade:TableKind - table version (table versions)
- one release of a reference table: the rows a table kind holds as of one date, named by an IRI the pod's files use.
- target (targets)
- what a shape names to say which nodes it checks: a class, the subjects or objects of a property, or one node.
- term (terms)
- one word the vocabulary defines, named by an IRI, a web-style identifier such as `https://ns.cascadeprotocol.org/cascade#allergenName`.
- the build (the build's)
- the files a pod works out from its records after every step: its views and its manifest.
- the set
- the files of a pod that a set hash covers; the layout says which, and an act's own file and a sync's file are left out of the hash their snapshot states.
- transmitter
- the party that passed a document on without writing it, as Apple Health does a hospital's record.
- tripwire
- a check that turns red on a change someone should look at, not on a fault in the package.
- Turtle
- a W3C text format for writing statements in the vocabulary's terms; `pod.enter()` and `pod.judge()` take it.
https://www.w3.org/TR/turtle/ - type index
- the file in which a pod lists, for each class of thing, the file or folder that holds it, so that another app can find the pod's views.
- unheld
- of a table version a pod names: not among the tables the pod is opened with.
- union (unions)
- a store read with some of its graphs as the default graph.
- Unopened
- the `Refusal` thrown when a pod does not open with the secret given, or with none; its `outcome` gives the reason, such as `incorrect secret`.
- URI space
- the beginning that every IRI of one code system's codes shares.
- vector (vectors)
- a test case the vocabulary publishes for every runtime: inputs, and the result each must give, such as a name.
- version (versions)
- what a record says at one time; when a source changes a record, the pod keeps the old version and adds a new one. (Of a reference table or the runtime, "version" has its everyday meaning.)
cascade:version - view (views)
- a pod's records of one kind, such as medications, as its judgments leave them: one line for each thing however many sources reported it. A named question such as `pod/My medication history` returns a view's rows.
cascade:View - view entry (view entries, entry, entries)
- one thing in a view, such as one medication or one lab result: the records that are one thing, shown as one. A row names it in `entry`, by an IRI that ends in `#` and 64 hexadecimal digits.
cascade:inEntry - 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
- the portable compiled form the Bridge is built in, which runs in a browser and in Node.
- worker
- a thread a web page or Node starts to run code apart from the main one.
- writer (writers)
- one app or device that writes to a pod; two writers hold copies of it and exchange files.
No entry matches.
Loading an adapter into the Bridge loadAdapter(), ofMediaType() 8 passed
An adapter is a folder of files the Bridge runs to convert one kind of document. `loadAdapter()` hands the Bridge only the files the adapter's description lists and fetches another when the Bridge reports it missing, so a web page downloads no more of an adapter or of the vocabulary than a conversion reads.
Source load-adapter.test.ts
loadAdapter(bridge, adapter, vocabularyOf) 5 passed
- passed loads nothing into the Bridge before a call needs the adapter4 ms
- passed hands the Bridge, at the first call, the files the description lists of the adapter and of the vocabulary0 ms
- passed loads again with a file of the adapter that the Bridge reported missing2 ms
- passed loads again with a file of the vocabulary that a conversion reported missing, and then no more0 ms
- passed asks for the vocabulary once, by the repository the description names1 ms
ofMediaType(loaded) 3 passed
Converting a document with the WebAssembly Bridge WasmBridge, inWorker(), inThread() 29 passed
The Bridge is one WebAssembly module, built by cascade-bridge-rs, that runs every adapter. The runtime runs it in a worker, so a document that crashes it costs one conversion and not the page.
Source wasm-bridge.test.ts
given an adapter loaded in a worker 2 passed
given the same adapters loaded again for another pod 10 passed
- passed starts no worker and resolves no component the second time2.74 s
- passed resolves the components once for every Components over the same folders90 ms
- passed loads the configured adapters at the same time, and returns them in the order configured though the first is the last to be ready446 ms
- passed reads, to load an adapter, only the files its description lists and the vocabulary files it names2.61 s
- passed stamps each file before it is read, one read after the load among them, and notices an edit after the read42 ms
- passed loads an adapter again for each change of what it was given, and for nothing else8.97 s
- passed keeps live the two most recently used vocabulary folders of one adapter folder, and lets the others go7.77 s
- passed says which version of each it uses on every call, ends the adapter a change replaces, and starts one load for two calls at once5.38 s
- passed runs two documents of one adapter at once, each in an instance of its own2.54 s
- passed does not fail a call on one instance for a fault on the other2.78 s
given a pool of instances of one adapter 3 passed
given a build of the Bridge written again into its folder 1 passed
- passed compiles the module again175 ms
given a resolution that fails 3 passed
- passed keeps no rejection of a component's resolution101 ms
- passed keeps no rejection of a search for the Bridge's package74 ms
- passed keeps no rejection of the release it downloads0 ms
given a Bridge that faults on one document 2 passed
- passed rejects that document with a BridgeError of kind `bridge`1.19 s
- passed converts the next document in a new worker2.36 s
inThread(compiled) 1 passed
given an export imported once through the saved output and once through the WebAssembly Bridge 1 passed
The arrivals example of `runtime/arrivals.feature` A3, in which the latex allergy arrives under a source version it already has, with other content, and is a revision.
Rule runtime/arrivals.feature A3given the check of a kit that would otherwise pass on nothing 3 passed
Converting from a kit's saved output SavedOutputBridge.of() 7 passed
A kit saves, beside each export, the graph and conversion findings the Bridge made of each document. `SavedOutputBridge` answers a conversion from those files, so a story replays where no Bridge can run, and what the kit saved stays the expected output every runtime is held to.
Source saved-output-bridge.test.ts
given a step whose export is a folder of documents 6 passed
- passed accepts a document the step saved output for5 ms
- passed converts it to the graph and, asked for every finding, the conversion findings saved under its file's name46 ms
- passed returns the graph alone where the convert asks for no findings2 ms
- passed declines a document the step marks with `unaccepted.txt`3 ms
- passed accepts a document the step saved nothing for1 ms
- passed rejects the conversion of that document with a BridgeError of kind `bridge`4 ms
given a step whose export is one document 1 passed
Turning an adapter's arrivals into revisions CorePod.import(), reachedIn() 25 passed
An adapter converts each document of an export into arrivals: one arrival is one state of one record, as its source reported it. `CorePod.import()` files each arrival as a revision of its record, and writes nothing for a state the record is already at.
Rules runtime/arrivals.feature A1 runtime/arrivals.feature A4 runtime/arrivals.feature A5 runtime/arrivals.feature A7 runtime/arrivals.feature A10 runtime/arrivals.feature A21 runtime/naming.feature N4 Source arrivals.test.ts
given an adapter that says what its convert was asked for 1 passed
given a document the pod does not keep, and an adapter whose convert is under way 2 passed
given an arrival whose selector has statements of its own, as a blank node or as a node named by an IRI 2 passed
given an arrival whose source change time states no time zone, an impossible one, or is a date 2 passed
given two source change times, one of them stating no time zone 1 passed
given one export that holds three states of one record: the state it is at, a new one, then the first again 3 passed
- passed writes two revisions, of the new state and of the first again0 ms
- passed keeps all three documents, the one that repeats the state the record is at as the two that wrote a revision do, and its import uses all three, though its export also lists the first export's document, kept already (A10)0 ms
- passed keeps nothing of the same export imported again, its documents being kept already, and makes no import for it (A1)0 ms
given Ada's exports imported with the ids they mint pinned, and the lines the line builder builds counted 4 passed
- passed builds the lines of the files of an import of one record once: as many as the pod's files hold0 ms
- passed builds the lines of the files of an import of four records of one server once, the server's file as the records' files1 ms
- passed builds a file once for each arrival that writes it, though the pod holds it already, and for nothing else0 ms
- passed leaves the same files when the same import is run again0 ms
given one export whose document that repeats a held state describes its import as another export 1 passed
given Ada's six exports, which hold repeated states, imported forward and then in reverse 1 passed
reachedIn(graph, document) 5 passed
- passed returns `""` as the transmitter of a document that names only its author0 ms
- passed returns, as the document's transmitter, the IRI of the agent an act that generated it names with the transmitter's role0 ms
- passed returns that one IRI when two acts that produced the document both name it0 ms
- passed returns `undefined` when two such acts name two transmitters0 ms
- passed returns `undefined` for a transmitter that no IRI names0 ms
Refusing a step that cannot be filed Performed.refused 22 passed
A step whose input breaks a rule is refused: the call returns `refused`, a sentence saying which rule, and writes no file. A failure that is not the input's fault is thrown instead.
Rule runtime/arrivals.feature A14 Source arrivals.test.ts
given an import 8 passed
- passed returns `refused` for a graph holding a statement about nothing the pod files3 ms
- passed returns `refused` for a record of a type the pod files nowhere, naming the type0 ms
- passed returns `refused` when the import's documents disagree on its description0 ms
- passed returns `refused` for a clinical record its export gives no `sourceURL`, naming the file0 ms
- passed returns `refused` for a path no importer reads0 ms
- passed returns `refused` for a document that is not well-formed XML, naming it0 ms
- passed returns `refused` for a CDA document no adapter accepts1 ms
- passed returns `refused` for a revision whose content holds a blank node0 ms
given records entered by the owner 5 passed
- passed returns `refused` for a file that does not exist0 ms
- passed returns `refused` for an entry session not named by a `urn:uuid:`0 ms
- passed returns `refused` for a version that breaks the vocabulary's shapes, naming the property0 ms
- passed returns `refused` for a file that describes two acts0 ms
- passed returns `refused` for a version whose content holds a blank node0 ms
given a judgment 2 passed
- passed returns `refused` for a file holding no judgment and no retraction0 ms
- passed returns `refused` for a file that is not Turtle0 ms
given a table version, or tables, that are not there 2 passed
given a refused step 2 passed
- passed writes no file0 ms
- passed does not stop `replay()`, which performs the step after it0 ms
given an adapter that fails 2 passed
- passed returns `refused`, with the Bridge's reason, for a `BridgeError` of kind `document`25 ms
- passed writes no file for it11 ms
given an adapter that breaks, which throws rather than refuses 1 passed
- passed rejects with the error for a `BridgeError` of kind `bridge`10 ms
Writing a step's files CorePod.import(), CorePod.open(), CorePod.judge() 24 passed
A step writes its files in an order, and to places, that leave the pod readable if the step stops part way: the file describing the act goes last, so no pod names an act whose files are missing.
Rule runtime/write-order.feature W1 Source core-pod.test.ts
CorePod.import() 1 passed
given files that take several writes at once (`Files.writeMany`), CorePod.import() 1 passed
given files that take several writes at once, StepWrites.commit() 4 passed
- passed starts no file of a wave before every file of the wave before it is written, and its act's file after all, one wave at several at once16 ms
- passed writes a file with no wave alone, in its place, and so splits the wave around it in two14 ms
- passed writes every file in one `writeAll` where the files have none that writes several at once, whatever the waves1 ms
- passed rejects with the failure of a wave, writing no file of a later wave and not its act's file1 ms
given a pod whose listing `CorePod.files` holds, StepWrites.commit() 9 passed
- passed reads no file whose name fixes its bytes and the listing lacks, in the first wave or the second, and still writes the second wave after the first36 ms
- passed shows its absence checks in the trace: a span, a count of the paths and a count of those read from the pod, for the check before it writes and the look again before each batch34 ms
- passed reads a file the listing has and compares it, refusing other bytes and not writing the same ones again25 ms
- passed looks for the files again after a wave fails, so a retry writes only what the failed wave left unwritten39 ms
- passed writes over a file whose name fixes its bytes that reached the pod after the listing, with the bytes it holds30 ms
- passed refuses a file whose name does not fix its bytes that another session wrote after the listing with other bytes, as a read of it does22 ms
- passed lists nothing for a commit of no file and no act, on a pod whose listing is not loaded6 ms
- passed takes a file an archive holds as in the pod: its name fixing its bytes, it is read, found, and not written loose31 ms
- passed refuses an act whose file is in the pod already, and writes none of the step's files28 ms
CorePod.open() 1 passed
given files that take a batch (`Files.writeAll`) 2 passed
when a write fails part way through a step 2 passed
- passed rejects with the failure0 ms
- passed returns from `revision()` the revision of the files as they were left0 ms
when a file is written to `CorePod.files` 2 passed
- passed writes the file to the pod's own files0 ms
- passed reads the file back from `CorePod.files`0 ms
CorePod.judge() 2 passed
Chaining each act's snapshot to the writer's last CorePod.head, CorePodOptions.head 14 passed
Each act leaves a snapshot in its own file: the set hash of the files the pod then holds, the files the act added, and the snapshot before it, as a git commit names its parent. A writer keeps its last snapshot, its head, outside the pod and hands it back when it opens the pod again; a writer whose head the pod does not hold is a new writer, and its first snapshot merges every head.
Rules runtime/naming.feature N14 runtime/naming.feature N15 runtime/write-order.feature W1 Source snapshots.test.ts
given a replay of an import, an entry session and a matcher run 1 passed
The example of naming.feature in which a writer's first snapshot has no first parent and each later act's names the one before it: Cleo's import, an entry session and a matcher run. Nothing in the pod is written after the replay.
given a writer handed a head the pod does not hold 5 passed
A copy of the replay's pod, which also holds a `.DS_Store` and a `records/allergies/.acl`, is opened by a writer whose head is a snapshot the pod does not hold; it enters Cleo's `second-entry`.
- passed writes a snapshot with no first parent, whose merged parent is the pod's one head4 ms
- passed writes as the set hash the hash of every file of the set the pod holds, the act's own file left out0 ms
- passed leaves out of the set a `.DS_Store` and an `.acl` the pod's folder also holds0 ms
- passed names in `fileAddedToSet` each file of the set its act wrote, and no other0 ms
- passed returns the snapshot it wrote as `head`0 ms
given that writer's next session, handed the head the first returned 4 passed
The same writer enters `third-entry` in a second session, handed the head the first session returned.
- passed writes a snapshot whose first parent is that head, with no merged parent0 ms
- passed writes as the set hash the hash of every file of the set the pod holds, the act's own file left out0 ms
- passed names in `fileAddedToSet` each file of the set its act wrote, and no other0 ms
- passed returns the snapshot it wrote as `head`0 ms
given an open that adopts a release declaring a rule wrong 4 passed
The example of naming.feature in which adopting a release that declares R4 wrong retracts the assertions of R4's two matcher judgments before the open's matcher runs: one open, two acts.
- passed writes two snapshots in the one step, a migration's and a matcher run's0 ms
- passed names the migration's snapshot as the first parent of the run's0 ms
- passed names a retraction among the files the migration's snapshot added0 ms
- passed leaves snapshots in which `snapshotFaults()` finds no fault0 ms
Naming what a pod holds versionName(), recordFromServerName(), normalisedBaseUrl(), snapshotName() 20 passed
Everything a pod holds is named by a naming rule of the vocabulary, from its content or from the inputs the rule lists, so two runtimes give one thing one name. The vocabulary publishes vectors, inputs with the name each must give, and every naming function of this package is held to them here. A name is an IRI, `ni:///sha-256;` and a digest worked out from a thing's canonical N-Quads or from its listed inputs; each rule in the list is matched to its naming function by the rule's IRI.
Rules runtime/naming.feature N3 runtime/naming.feature N4 runtime/naming.feature N14 Source naming-vectors.test.ts
given the vocabulary's naming vectors (`tests/vectors/naming/manifest.ttl`) 9 passed
The vocabulary's list of naming vectors, `tests/vectors/naming/manifest.ttl`: each vector names a rule, the inputs it is given and the name it must return, or the base URL it must normalise or refuse.
- passed has a naming function for the rule of every vector the list holds13 ms
- passed returns each vector's name for a record from a server, from a document, and from a C-CDA document with an id or without20 ms
- passed returns each vector's name for a record contained in another, and for a record its owner entered4 ms
- passed returns for each vector of a version, a revision, a finding and a table version the canonical N-Quads the vector holds, and the name those give22 ms
- passed returns each vector's name for a document, from its bytes2 ms
- passed returns each vector's name for a server and for an organization3 ms
- passed returns each vector's name for a matcher judgment, an assertion of one, and a release's retraction4 ms
- passed returns each vector's name for a table row and for a view entry4 ms
- passed returns each vector's name for a snapshot1 ms
normalisedBaseUrl(url) 3 passed
The same list's vectors of base URLs: the form a server's address is named from, or the reason it is refused.
given the vocabulary's snapshot vectors (`tests/vectors/snapshot/vectors.json`) 3 passed
The vocabulary's `tests/vectors/snapshot/vectors.json`: Bitcoin Core's own MuHash3072 vector, sets of files with the set hash each must give, and chains of snapshots with the name each is given.
- passed returns Bitcoin Core's MuHash3072 digest from `muhash3072()`, and from `fileDigest()` of the vector's numerator11 ms
- passed returns each vector's set hash from `setHash()`2 ms
- passed returns, for each snapshot of each chain, the vector's set hash, the name of its act's description, and its name9 ms
containedRecordName() 1 passed
The vectors never pass an empty `versionId`; an adapter that writes `versionId: ""` must still name the record as one that leaves it out.
recordFromCcdaWithoutIdName() 1 passed
As above for `keyFingerprint`: the vectors never pass an empty one, and an adapter that writes `""` must still name the record as one that leaves it out.
fingerprint() 2 passed
The C-CDA adapter works out the fingerprint of a record that has no id from its strings, and `Words` works it out again for a handle; the vocabulary's vectors take it as an input and never compute it.
earlierInUtc() 1 passed
A revision is checked to revise an earlier revision of its record by the times each states, which are strings.
Writing a code as an IRI codeIri() 1 passed
A record's code joins the reference tables and the matcher's rules as an IRI: its code system's URI space, then the code percent-encoded as SPARQL's `ENCODE_FOR_URI` does. `codeIri()` writes that IRI, so a code this runtime encodes is the IRI a query of the vocabulary gives the same code.
Rule runtime/matcher.feature M4c Source code-iri.test.ts
given the vocabulary's vectors (`tests/vectors/clinvar/code-iris.json`) 1 passed
The vocabulary's `tests/vectors/clinvar/code-iris.json`: a code system, a code, and the IRI each runtime must write.
Minting IDs and telling the time clock, StoryTime 4 passed
An import, a matcher run and a sync are each named by a new random UUID, and every act says when it happened. A pod takes both from one object: `clock` in use and, in a replay, a `StoryTime`, which gives the time its story's step states and IDs as random as `clock`'s.
Rule runtime/naming.feature N7 Source ids.test.ts
clock 1 passed
- passed returns from `newId()` a version 4 `urn:uuid:` no earlier call returned1 ms
StoryTime 3 passed
- passed returns from `newId()` a version 4 `urn:uuid:` no earlier call returned0 ms
- passed returns from `now()` the time of the step that began last3 ms
- passed throws from `now()` before any step has begun0 ms
Reading a pod between steps CorePod.dataset(), CorePod.revision(), CorePod.close() 7 passed
`dataset(lens)` is the pod as a question reads it, and `revision()` names the state it is in. Both hold until the next step, so an app keeps an answer for as long as the revision stands.
Source core-pod.test.ts
when a step is performed 3 passed
- passed returns from `dataset()` what the build wrote at that step0 ms
- passed returns a different `revision()` after a refused step than after the creation before it0 ms
- passed frees the dataset read before the step8 ms
given a second `CorePod` over the same files 2 passed
- passed returns the same revision0 ms
- passed returns the same dataset, with a build of its own or with none0 ms
when the build fails after `close()` 2 passed
Retitling a pod CorePod.retitle(), CorePod.revision() 1 passed
A retitle changes no revision, whatever the title holds: the title's line ends at a newline, not at a separator the manifest's text carries.
Source core-pod.test.ts
Deriving a pod's state with the vocabulary's queries Derivations.derive(), entries() 11 passed
What a pod shows is derived from its files by the vocabulary's CONSTRUCT queries, the derivations, run in a fixed order and ending with the query of the lens asked for, which makes its choice of judgments. `derive` returns what each one added, and gets one of them, `entries.rq`, by a faster route that returns the same triples.
Source derive.test.ts, entries.test.ts
Derivations.derive(union, lens) 5 passed
- passed leaves out of `added` a triple the union already states87 ms
- passed returns once a triple that a CONSTRUCT returns twice7 ms
- passed leaves out of `added` a triple an earlier derivation added3 ms
- passed gives a derivation whose file name holds a space the position of its percent-encoded `@id` in the crate4 ms
- passed refuses a crate whose `@id` is not a percent-encoded path1 ms
parseCrate(text) 1 passed
questions(vocabulary) 1 passed
given an `entries.rq` whose text is not the one `entries` was written for 1 passed
- passed runs the query as it is written3 ms
given the vocabulary's own `entries.rq` (tripwire) 1 passed
Red means the vocabulary changed `entries.rq`. The pod is still right, because the changed query runs as it is written, but slowly (#246), until `entries()` is checked against the new text and `ENTRIES_TEXT` in `src/entries.ts` is set to the new text's hash.
Building a pod's views, labels and type index CorePodOptions.build, vocabularyDerive(), podDataset() 17 passed
After a step, the build works out the pod's derived state and writes the files that follow from it: a view for each kind of record the pod holds, the labels, which give each thing a name a person can read, the type index, which lists where each view is, and the manifest. `CorePodOptions.build` runs it after every step, and `podDataset()` runs it over a pod read from a folder of its files.
The vocabulary's fixtures show what each query answers. These leaves show what only the runtime decides: when it writes, what it reads back, in what order it works (the labels read the views), and how it writes an entry's name in a view's file. A15's type index and N13 have no example; `tests/fixtures/labels-entries-as-their-views-name-them` holds the query's side of the labels leaf.
Rules runtime/arrivals.feature A15 runtime/naming.feature N13 runtime/matcher.feature M7 Source pod-build.test.ts
given the type index a build wrote 3 passed
given the labels file a build wrote 1 passed
given the views a build wrote 4 passed
- passed names each entry its view's address, `#`, and the hash `viewEntryName()` gives of its least member's IRI17 ms
- passed writes each entry in its view's file as `<#hash>`0 ms
- passed writes no IRI under the pod's address in a view's file0 ms
- passed writes no `urn:cascade:entry:` placeholder in a view's file0 ms
given the martin-okafor kit's pod, whose view of a variant's interpretations names, for each interpretation, the entry of the view of the person's variants that its variant is in 1 passed
given a pod whose matcher Same used a table version that is no longer the current version, read with `podDataset()` 4 passed
A view is an entity, so it names the table versions it came from with `prov:wasDerivedFrom`; `prov:used` is said only of an activity.
- passed leaves the Same's members in separate entries when no `samesStillJoined` is passed1 ms
- passed puts the Same's members in one entry when `samesStillJoined` returns the Same with its members' current version4 ms
- passed names the table versions a view was built with by `prov:wasDerivedFrom`0 ms
- passed states `prov:used` on no view built with a table version0 ms
Receiving another writer's files CorePod.receive() 7 passed
Two writers of one pod, two apps or two devices, each hold a copy and pass each other the files the other lacks. `receive()` writes those files and then a sync, an act whose snapshot merges the heads that arrived, so both writers end holding one set of files with one set hash.
Rules runtime/sync.feature S1 runtime/sync.feature S3 runtime/sync.feature S5 Source snapshots.test.ts
when a receive stops at one of its writes and is made again 2 passed
A writer receives the files of another that entered `second-entry`, once with every write allowed and then once for each of its writes, stopped there. The stopped receive is made again on the same pod.
given a person's file that replaces or retracts a matcher's judgment 2 passed
A person's replacement of a matcher's judgment, and a person's retraction of one, each filed through `judge()` and each arriving from another writer, over the replay's pod, whose matcher judged Cleo's records.
Rule runtime/naming.feature N16
Opening a pod with tables other than the ones it was matched with CorePod.open(), Performed.unheld, CorePod.unheldTableVersions() 19 passed
An app opens a pod with the reference tables it carries, which may be newer, older or other than those the pod was last matched with. `open` adopts what the tables hold of the pod's series, and returns in `unheld` the versions they do not hold, so an app can say a newer app has been here. `select(query)` takes a SPARQL SELECT and returns the rows it gives over the pod's dataset.
Rules runtime/opening.feature O1 runtime/opening.feature O2 runtime/matcher.feature M9 runtime/matcher.feature M13 runtime/matcher.feature M18 runtime/naming.feature N15 Source open.test.ts
given tables that lack a series the pod was matched with 2 passed
- passed returns the pod's versions of those series in `unheld`2 ms
- passed refuses nothing0 ms
given tables that list another version of the pod's rule list, on no line with it 2 passed
- passed returns the pod's version in `unheld`0 ms
- passed refuses nothing0 ms
CorePod.unheldTableVersions() 1 passed
given tables with no rule list 2 passed
- passed returns `refused`0 ms
- passed leaves the pod able to run its matcher with the tables it had0 ms
when the clock moves between an open's judgments 1 passed
given an adopted version that joins a pair the version before it did not 2 passed
given a pod that holds the description of a version newer than the tables' current one 1 passed
- passed matches by the rows of the tables' current version373 ms
given a build kept beside the pod, and tables that newly hold a version the pod names only in its series' file 4 passed
- passed answers, once opened with those tables in a later session, as the pod built whole with them does94 ms
- passed builds whole, not from the working copy kept beside it, for a read with those tables in a later session57 ms
- passed builds whole at an open with those tables in the session that built it with the older ones, though the open writes nothing169 ms
- passed builds whole at an open whose matcher run writes, as one adopting a newer version247 ms
CorePod.select() 2 passed
given two pods taken through the same steps 2 passed
Refusing a rule list a run cannot trust matcherRules(), originsJoining() 10 passed
The matcher's rules arrive as a table, the rule list: each row names a comparison, a query the vocabulary ships under `queries/matcher/`, and that query's hash. Before a run the matcher checks every row, and refuses the run sooner than run a query the vocabulary did not ship.
Rules runtime/matcher.feature M5 runtime/matcher.feature M11 Source matcher.test.ts
matcherRules(rows, vocabulary) 6 passed
- passed returns a rule for a row that names a query under `matcher/` and its hash5 ms
- passed throws Refusal for a query path that leaves `matcher/` through `..`5 ms
- passed throws Refusal for a query path written with a backslash1 ms
- passed throws Refusal for two rows that give one justification5 ms
- passed throws Refusal for a row with no query hash0 ms
- passed throws Refusal for a row that reads two table kinds1 ms
originsJoining(rule, rows, origins) 4 passed
- passed returns, for each pair, the table versions whose rows join it1 ms
- passed throws Refusal for a row that cites no table version, under a rule that reads a table0 ms
- passed throws Refusal for a row that cites a table version the run did not read0 ms
- passed throws Refusal for a row that cites a table version, under a rule that reads none0 ms
Binding a comparison query to a run's records boundToRecords(), boundToPairs() 14 passed
A comparison is a SPARQL query of the vocabulary that returns pairs of records, `?record` and `?other`. The matcher binds `?record` to the records a run takes by writing a `VALUES` block into the query's text, so a run reads those records and not the whole pod.
Rule runtime/matcher.feature M4a Source bound-records.test.ts
boundToRecords(query, records) 3 passed
given a group marked `# bound: ?record` 5 passed
- passed binds the marked group as well as the WHERE group1 ms
- passed returns the rows of the records given alone2 ms
- passed ignores a mark that the group's brace does not follow with nothing but `WHERE` between0 ms
- passed binds the WHERE group once where the mark stands before it, as a question's does1 ms
- passed ignores a mark inside a string0 ms
bindsARecord(query), answersWithARecord(query) 2 passed
boundToPairs(query, pairs) 3 passed
`TOKEN` 1 passed
Running the matcher on a step's records alone CorePod.match(), readEveryRecord(), recordsInOneBlock() 6 passed
A matcher run after a step compares only the records that step brought, and reads from the pod only the records their joins reach. It must write what a run reading every record writes, which no example can show, so the runtime tests it here.
Rules runtime/matcher.feature M1 runtime/matcher.feature M4a Source scoped-runs.test.ts
given each matcher run that takes records in the stories of the vocabulary's feature files 2 passed
inBlocks(records) 2 passed
given a first import and a comparison that returns a reference series as its `?record` 2 passed
Holding the matcher's joins to those of today CorePod.match() 1 passed
Narrowing the pairs a rule compares must leave its joins as they are. `joins.golden.txt` holds today's: for each run that takes records in each story of the feature files, each run over the whole pod after one, and for each kit's whole story, the Sames filed, as the rule's name and the members it joined, and the findings for review, as their body and their targets; and the runs of `joins-extra/`, which cover what no story does. To write it again after a change to the vocabulary's names or rules, run this file with `UPDATE_JOINS_GOLDEN=1`: it writes the file and fails, so a run that writes is never green.
Rules runtime/matcher.feature M1 runtime/matcher.feature M4a Source scoped-runs.test.ts
given each run that takes records in the stories of the feature files, and each kit's whole story 1 passed
Matching a pod whose files repeat a statement CorePod.match() 1 passed
Nothing stops two files of a pod from stating the same thing: a pod may hold files another app wrote. A matcher run is not refused for it.
Source pod-build.test.ts
given a pod in which a second file states again one record's first revision 1 passed
- passed does not refuse `match()`330 ms
Reading entries as of a record's arrival arrivalOrder(), ArrivedEntries 3 passed
The matcher takes records in the order they arrived, and compares each with the entries as they stood when it arrived. `arrivalOrder` gives a time its place in that order, and `ArrivedEntries` keeps the entries from one record to the next, so a run joins each Same once.
Rules runtime/matcher.feature M3 runtime/matcher.feature M5 runtime/matcher.feature M9 Source arrived-entries.test.ts
arrivalOrder(moment) 2 passed
ArrivedEntries 1 passed
Reading reference tables from a folder References.of(), References.rows(), tableTerms(), linesAbout() 11 passed
Reference tables are a folder: `references.ttl`, the list of each series and its versions, and one file of rows for each version. `References` reads them for the matcher, and `tableTerms` reads from the vocabulary which code systems there are and how each kind of table is found by code.
Source references.test.ts
References.rows(version) 4 passed
- passed throws Refusal for a version whose name gives no file name1 ms
- passed throws Refusal, naming the folder, for a version the folder has no file of4 ms
- passed returns a rule list version's rows from the vocabulary when the folder has no file of it13 ms
- passed returns the folder's own file of that version when it has one1 ms
reasonLabels(vocabulary, newStore) 2 passed
linesAbout(text, subject) 1 passed
tableTerms(vocabulary) 4 passed
- passed returns a code system for each one the vocabulary registers, with its label and its URI space0 ms
- passed returns `uriSpaces` in the order of `codeSystems`0 ms
- passed returns `pageTemplate` only for a code system that has one0 ms
- passed rejects with an Error that is no Refusal for a code system with no label, with no URI space, or with a page template that lacks `{code}`1 ms
Reading only the rows a pod's codes find References.rows(), rowsByCode() 9 passed
A pod's records are compared with tables of hundreds of thousands of rows, so a pod reads from each version only the rows its own codes find. Asked for a version's rows by a set of codes, `References.rows` returns those rows and reads no more of the folder than it must.
Source references.test.ts
rowsByCode(rows, foundBy) 2 passed
given a version whose rows are found by a property, as a vaccine group's are by its vaccine 2 passed
given a version whose rows are found by their own code, as a name's are 5 passed
- passed returns the code's rows, reading the version's file once and no index0 ms
- passed returns every row when every code is asked, and none for a code with no row0 ms
- passed reads no file at a second call0 ms
- passed ignores an index left beside the version0 ms
- passed returns every row of a version written as Turtle and not as sorted lines1 ms
Replaying a story into a pod replay(), PERFORMERS 10 passed
A story is a pod's address, its owner, and the dated steps that happened to it. `replay()` performs the steps in order on a pod and returns what each wrote or why it was refused: a kit's story, a feature's example and an app's demonstration pod are all made this way.
Source replay.test.ts
replay(options) 5 passed
- passed returns a refused step with the sentence refusing it and no file written2 ms
- passed leaves the pod holding only the files the steps before a refused one wrote0 ms
- passed tries the step after a refused one0 ms
- passed stops at a step whose kind, here an import, it is given no performer for, naming the kind in `stopped.why`0 ms
- passed returns only the steps it performed before it stopped0 ms
given a build 5 passed
- passed derives once after each step, with the build's lens, as of the step's time0 ms
- passed leaves a file the build writes out of every step's `wrote`0 ms
- passed leaves a built file as the derivation after the last step gives it0 ms
- passed writes a view with no pod address in its bytes0 ms
No check of a kit reads the bytes a replay put in the pod: check 6 writes each view again from its triples (`podAddressesIn` over `builtFileBytes`), so these two leaves are where those bytes are read.
Rule runtime/the-kit.feature Check 6 - passed writes a view that parses, against its own address, to the triples derived0 ms
Running a feature's examples and a kit's checks on a runtime runConformance() 21 passed
A feature file states a rule's examples in steps whose wording `runtime/steps.md` fixes. `runConformance()` compiles each example's steps, replays them into a pod of its own and returns one outcome for each example, failed with a sentence saying why when a step cannot be read or the replay stops.
Source conformance.test.ts
given a feature file of examples that cannot pass 7 passed
- passed returns one outcome for each example of the file, and no other1 ms
- passed puts the title of the example's rule before each failure's sentence0 ms
- passed fails an example with a step no phrase of `runtime/steps.md` reads, quoting the step0 ms
- passed fails an example that read the pod before a later step stopped the replay, naming that step and its kind0 ms
- passed fails an example whose step is named with a space0 ms
- passed fails two rows of one outline that share a name, naming the file and the name0 ms
- passed fails an example whose query is no SELECT0 ms
given an example that names another person and one that reads the pod before a judgment is filed again 2 passed
- passed passes an example that names a person of `people.ttl` other than the pod's owner0 ms
- passed reads `that step` as the step the pod is read after, not a later step that files the same judgment again0 ms
The step filed again, `again`, writes no file new to the pod, so `that step wrote 1 file` is true of `same` alone.
given a feature file that queries a table version an open gave the pod 4 passed
- passed answers a query named by its file with the version's rows, in an example read after the open1 ms
- passed answers nothing to that query in an example read as the pod stood before the open1 ms
- passed answers a query of the default graph with the version's description and none of its rows0 ms
- passed fails an example whose query file the vocabulary does not hold, naming the path0 ms
given a feature file that lists the tools a runtime offers a model 4 passed
- passed answers a query of the tools' graph with each tool that has no kind or no tier or neither, has two, or has a tier its kind has not, or a kind at never0 ms
- passed states each tool's name, kind and tier as the vocabulary's terms, a tool that declares neither still stating its name0 ms
- passed keeps the tools and the vocabulary out of the query's default graph0 ms
- passed answers that query nothing for tools that are all right, and for a runtime that offers none18 ms
given a kit whose Feature description opens with a paragraph of its own 3 passed
given a kit whose story has a step the runtime cannot perform 1 passed
Finding what an example names in words Words.record(), Words.judgment() 11 passed
A feature's example names a record or a judgment in words, such as `allergy SNOMED 373270004`, or by a handle, a short name whose inputs the kit's `handles.json` gives (`runtime/steps.md`). `Words` finds the one thing in a pod those words name, so a feature says which record it means without writing its IRI.
Source words.test.ts
Words.record(words) 5 passed
A pod of seven records, whose code systems the vocabulary registers with made-up URI spaces (`urn:test:snomed/`, `urn:test:ndc/`).
- passed finds a record by its kind and a code, through the URI space the vocabulary registers for the code system36 ms
- passed rejects a code that a record holds only as a literal5 ms
- passed rejects, with an Error that is no Refusal and names the code system, a code system the vocabulary does not register1 ms
- passed finds a variant by its HGVS expression, by its ClinVar ID, and by its ClinVar ID with its name18 ms
- passed rejects a kind given with neither a code nor a name0 ms
given a handle of `handles.json` 5 passed
A kit's `handles.json` gives a record a short name and the inputs its name is made from. The vocabulary here holds a document `bundle.json`, and two C-CDA documents, one that states a custodian and a patient and one that states neither.
- passed finds a record read from a server by its base URL, normalised, its type and its id20 ms
- passed finds a record read from a document by the document's bytes and its selector3 ms
- passed finds a C-CDA record by its id and the custodian and patient ids its document states7 ms
- passed rejects, saying `handles.json` gives its selector, a C-CDA document that states no custodian id or no patient id1 ms
- passed rejects, saying the handle has no name inputs, inputs of no form it knows1 ms
Words.judgment(words) 1 passed
The matcher's judgments the pod holds are each about two records, and give a justification in words.
Checking a replayed kit kitChecks(), shapeFaults(), snapshotFaults(), podAddressesIn() 14 passed
A runtime passes a kit when a replay of its story passes checks 2 to 6 of `runtime/the-kit.feature`, none of which an example can state. Each check returns its faults, one sentence for each thing wrong, and passes when it returns none.
Rules runtime/the-kit.feature Check 3 runtime/the-kit.feature Check 4 runtime/the-kit.feature Check 6 runtime/naming.feature N14 Source kit.test.ts
requirementFaults(pod, layout) 2 passed
Check 5 holds a pod that holds an archive to the requirement's file O4 names.
snapshotFaults(replayed, layout, newStore) 5 passed
Check 4 holds each act's snapshot to the rule of `runtime/naming.feature` N14, over the replay of Cleo's import, entry session and matcher run, and holds the last snapshot's set hash to the files the pod lists of its set.
- passed returns no fault for a replay of an import, an entry session and a matcher run26 ms
- passed returns no fault for the same pod with every file of its set but the stored documents held in one archive46 ms
- passed returns no fault for a `.DS_Store` and an `._` file beside the pod's files, which are no part of the set46 ms
- passed reports a file of the set that is missing from the pod, and the last set hash as wrong23 ms
- passed reports the last set hash as wrong for a file of the set whose bytes changed28 ms
podAddressesIn(bytes, address) 2 passed
Check 6 holds that no view the runtime wrote holds the pod's address, by what `podAddressesIn()` finds in a view's bytes.
given a view written relative to itself by `relativeTurtle()` 2 passed
Checking a graph against the vocabulary's shapes Shapes.read(), Shapes.results() 26 passed
The vocabulary's SHACL shapes say what a well-formed file of a pod holds, and some say it with a SPARQL constraint, which the SHACL library the runtime uses does not run. `Shapes` runs those itself, to the results pyshacl gives, and refuses any SHACL-SPARQL it does not run instead of skipping it. Check 3 of a kit reads every file of the pod against them, and no example can state that check: SPARQL cannot run SHACL.
Rule runtime/the-kit.feature Check 3 Source shapes.test.ts
given the vocabulary's own shapes and its case of a record named from its server 4 passed
`tests/shape-cases/` of the vocabulary holds about 180 cases that pyshacl runs; this one is run here by hand, for the one real SPARQL constraint path through the vocabulary's own shapes.
- passed returns no result for the valid case388 ms
- passed returns one violation of `cascade:ServerRecordNameShape` for the case whose name was changed, its message saying the name expected70 ms
- passed returns from `resultLines()` that result as one line of its focus node and its message, with no path70 ms
A kit's check 3 and an entry session's refusal both print these lines.
- passed returns from `resultLines()` a result of a property constraint as one line of its focus node, its path and its message51 ms
given a shape with a SPARQL constraint, whose results `Shapes.results()` returns 12 passed
- passed takes as focus nodes the shape's targets by class, by subject, by object and by node19 ms
- passed takes an instance of a subclass the vocabulary's terms declare as an instance of its class17 ms
- passed writes each variable's value into the constraint's message, `$currentShape` among them26 ms
- passed runs a query written with a prefix the shapes declare by `sh:declare`16 ms
- passed returns the results of the shape's other constraints beside the SPARQL constraint's16 ms
- passed gives a result its shape's severity, whatever severity the constraint itself states48 ms
- passed gives a result the constraint's messages and its shape's together22 ms
- passed takes a blank node as a focus node14 ms
- passed returns no result for a literal focus node whose string is another node's IRI16 ms
- passed runs the constraint of a shape that a triple names and no shape uses21 ms
- passed returns no result for a deactivated constraint, or for a constraint of a deactivated shape23 ms
- passed throws Refusal for a row that binds `?failure`20 ms
given a query that reads `$this` where a plain substitution would miss it 6 passed
- passed binds `$this` inside a sub-select that returns it, with and without GROUP BY38 ms
- passed binds `$this` in GROUP BY, in ORDER BY and in BOUND65 ms
- passed finds `$this` after an unspaced `<` that follows a variable, a number, a tagged string or a cast74 ms
- passed leaves alone an IRI in a collection whose `#` a comment could be read from22 ms
- passed reads a prefixed name spelled like a keyword as a name14 ms
- passed reads past a long string that ends in a backslash18 ms
Shapes.read(vocabulary, newStore) 4 passed
- passed throws Refusal for a constraint that is no `sh:select`: an `sh:ask`, or a constraint component3 ms
- passed throws Refusal for a SPARQL constraint on a property shape, or on a shape another reaches by `sh:node` or `sh:or`5 ms
- passed throws Refusal for a query that reads `$shapesGraph`, has `VALUES`, assigns `?this`, or reads `$this` in a sub-select that does not return it2 ms
- passed throws Refusal for a query that does not parse, or whose string is unterminated5 ms
Reporting a conformance run npm run conformance -- --report <file> 6 passed
The conformance command runs every feature file and every kit of the vocabulary beside the runtime, and writes the outcomes as an EARL report that says which commits the run used. The site's conformance page is made from that file, so an example the run skipped would be missing there and nowhere else. That every example and every kit check passes is check 1 of a kit, run.
Rule runtime/the-kit.feature Check 1 Source conformance.test.ts
given the report of one run over the vocabulary 6 passed
- passed holds one assertion for each example of every feature file, each check of every kit, each SQL function, and each `.sql` over each fixture under each lens, and no other37 ms
- passed reports every example, every kit check and every SQL check as passed32 ms
- passed lists the tools of `cascade-runtime/tools` to the run, for the examples that read them0 ms
- passed names the commit of the vocabulary it ran0 ms
- passed names cascade-bridge-rs and each adapter repository of `cascade-runtime.json`, and no other4 ms
- passed names the Bridge by a commit, or by a release built from one0 ms
Writing a kit's saved output again npm run kit:bridge 5 passed
`npm run kit:bridge` converts every document a kit's story imports with the Bridge and writes the results as the kit saves them, into a folder of the caller's. A vocabulary maintainer runs it when an adapter changes, and compares that folder with the kit.
Source kit-bridge.test.ts
given the command run on `conformance/tamsin-vale` 2 passed
given the command run on `conformance/alex-rivera` 1 passed
given a folder inside the vocabulary 2 passed
- passed exits with code 1, saying the folder is outside the vocabulary1 ms
- passed writes nothing there5 ms
Keeping one build of a pod across steps CorePodOptions.build, CorePod.select() 52 passed
With `build.incremental`, a pod keeps its dataset and what it derived from one step to the next, rebuilds only the records a step reached, and lends the dataset to the matcher for the length of a run. What it then reads, derives and writes is what a pod built whole after every step would. `select(query)` takes a SPARQL SELECT and returns the rows it gives over the pod's dataset.
Rule runtime/currency.feature C8 Source kept-build-kits.test.ts, kept-build-random.test.ts, kept-build.test.ts, pod-build.test.ts
given every kit replayed with `build.verify` 2 passed
`build.verify` (`PodBuildOption.verify`) makes a pod that rebuilt a step in part build itself whole as well, and read its build back from the files the step wrote and the derived state as kept beside a pod (blank nodes and all, through N-Triples), and throw where either differs from the whole one: in a graph of derived state, or in a file the build writes. A replay that does not throw is one in which they never differed. Each kit's story is replayed once, with a count of the steps that were rebuilt in part.
given stories drawn from seeds, replayed with `build.verify` 2 passed
Stories of 20 steps drawn from the seeds 1 to 8 (`CASCADE_RANDOM_SEEDS`, `CASCADE_RANDOM_FIRST_SEED` and `CASCADE_RANDOM_STEPS` change them), each replayed once with `build.verify`: after a step rebuilt in part the pod builds itself whole as well, and reads its build back from the files the step wrote and the derived state as kept beside a pod, and throws where either differs from the whole one, or a built file written from kept lines is not the bytes of one written from nothing. A drawn story reaches step orders no kit does: a judgment over records a later import names, a sync after a newer table.
given the seeds CI draws (tripwire) 1 passed
Red means that no drawn story any longer judges the unnamed import's records alone before the lower-case import names them, the order in which a judgment's label once stayed stale. The weights in `story()` need raising; the runtime is not at fault. It needs the 8 seeds CI draws.
given a pod replayed with its build kept 2 passed
given a pod whose build is kept beside it · CorePod.buildInputsHash() 2 passed
The hash a manifest names (`cascade:buildInputsHash`) changes with each thing a build reads, and with nothing else: one row a thing, each a pod opened over its files with one input changed, its hash compared with the pod's own.
when a match runs and nothing reads the pod after it 1 passed
when lending the matcher its view fails part way through taking the files the build writes out 1 passed
when a match is refused, or fails, after it changed the matcher's view 2 passed
Layout.loads() 1 passed
CorePod.select() 2 passed
when a step puts quads in the kept build, and the pod moves the build to a store of its own after enough of them replace others 2 passed
- passed does not move the build when the only step is an import into a pod that held nothing, though it adds more quads than the threshold, for little is there to replace198 ms
- passed moves the build once imports revise records, for each revision replaces what the views and the derived state held340 ms
boundValues() 6 passed
- passed asks once, and runs no batch, when more IRIs than one batch binds can match nothing1 ms
- passed returns each IRI the patterns match, from every batch, after the one ask4 ms
- passed runs the batches when the ask is answered by something the bound IRIs do not reach1 ms
- passed asks nothing when one batch holds every IRI1 ms
- passed runs the batches, with no ask, for a path that may be no step long, and finds the bound IRI the union holds and none it lacks5 ms
- passed runs the batches, with no ask, for a pattern that meets ?bound only in a FILTER, which is true for the bound IRI and not unbound1 ms
when the kept store fails to renew 2 passed
- passed rejects the next `dataset()` with the failure1 ms
- passed returns from the next `dataset()` the quads a pod read whole holds1 ms
Revisions.of() 1 passed
given a built file written again from its kept lines · ntriples() 3 passed
A built file is written from the lines kept for it: each triple's line by the triple (a rebuild hands back, as the same object, each triple that did not change), and the lines last written, sorted. A rebuild writes a line only for a triple it was not given before, and sorts only the lines it adds, and the file is the bytes a write from nothing gives.
- passed writes and sorts only the lines of the triples a rebuild changed, and gives the bytes a write from nothing gives1 ms
- passed writes a blank node's line again as the bytes a write from nothing gives, whether the node is kept or replaced0 ms
- passed forgets the lines of a file a rebuild no longer builds0 ms
given a pod replayed with its build kept, each step counted by built lines 1 passed
The sync story replayed with `build.verify`, which throws where a file written from the kept lines is not the bytes of one written from nothing; and with each step counted by the lines its built files hold, write and sort.
given a pod opened with `build.incremental` over files that already hold records 5 passed
- passed reads each file the pod held at most once over its first two steps0 ms
- passed loads the records the pod held into one store for its first entry session0 ms
- passed reads the pod's own files into one store for its stated reads and a judgment's filing, and into another for the build the judgment calls for0 ms
- passed reads the pod's own files again for a stated read after a step, and finds what the step wrote0 ms
- passed writes for its first entry session the files a build of the whole pod writes2 ms
given a step that enters a record into a pod whose build is kept across steps 1 passed
given files loaded into a scope, some of them held by the kept store 1 passed
given a pod opened over files that hold a counting About, read with `CorePod.selectKept()` 3 passed
- passed builds the pod whole for the first read and builds nothing for the second390 ms
- passed reads a pod whose manifest names no build's hash, opened to keep its build beside it, though the tables cannot load371 ms
- passed finds the profiles the matcher's view finds, the read the import's claim was made over before it read the kept build465 ms
given two judgments filed inside `CorePod.deferring()`, whose steps leave their rebuild 8 passed
- passed rebuilds once for both, as a build of the whole pod writes412 ms
- passed rebuilds before the first read inside `deferring()`, which finds the judgment counting422 ms
- passed rebuilds before it throws what the run threw, leaving the judgment counting for the next read341 ms
- passed throws an AggregateError of what the run threw and the failure of the rebuild after it, when both fail327 ms
- passed keeps a frozen error the run threw, when the rebuild after it fails too247 ms
- passed keeps what the run threw when it is no Error, when the rebuild after it fails too346 ms
- passed refuses to close, leaving the rebuild to the end of the run275 ms
- passed refuses a judgment that names a finding the pod holds, and leaves the rebuild to the end of the run183 ms
given a pod whose matcher filed a finding for review, outside any step 1 passed
- passed refuses a judgment that names the finding1.44 s
Keeping a writer's set hash between sessions Head.set 8 passed
A set hash is a product over every file of the set, so a writer that kept the product multiplies in only the files an act adds and does not read the whole pod again. `Head.set` is what a writer keeps of the set it hashed; it is taken up only while the pod lists exactly those files.
Rule runtime/naming.feature N14 Source snapshots.test.ts
given a writer handed the head without the set 1 passed
The same, with the head the first session kept handed back without its `set`.
- passed reads every document the pod keeps1 ms
HashedSet.of(files), HashedSet.ofKept(kept, paths) 3 passed
`HashedSet` is not exported from the package: it is the class a writer's `Head.set` is made from, tested here where it is refused as well as where it is taken up. Each leaf draws five sets of 60 files from the seeds 1 to 5.
- passed returns the whole set's hash after its files were added a few at a time, in a drawn order4 ms
- passed returns the same hash from the set kept and taken up again with the same paths5 ms
- passed returns undefined from `HashedSet.ofKept()` and from `missing()` once one path is swapped for another3 ms
given a person's Same of records the pod does not hold 1 passed
A person's Same of two records the pod does not hold, filed through `judge()` and arriving from another writer.
Rule runtime/naming.feature N10
Reading and writing files by path Files, MemoryFiles, FolderFiles, ExportedFiles 32 passed
The runtime reaches everything it reads or writes, a pod, the vocabulary, an export, through `Files`: bytes by a path under one root, or by the IRI that path has. The same calls work over memory, over a folder on disk and over the files an app holds, and none reaches outside its root.
Source files.test.ts, folder-links.test.ts
given files in memory, and given a folder on disk 7 passed
Each leaf runs over both kinds, naming the kind in the message. Each holds `subject/7c/a.ttl`, written by path, `records/b.ttl`, written by IRI, and `records/long.ttl` (`0123456789`); no leaf writes a file.
- passed reads what was written, by its path and by its IRI5 ms
- passed returns undefined for a file that is not there, for a folder, and for a path below a file3 ms
- passed lists the files under a folder by path, in order, and none for a file or for a folder that is not there7 ms
- passed lists a folder's files sorted by code unit, under a folder by its path and its IRI, with no file being written and nothing for an empty folder, whether or not it refuses links20 ms
- passed returns from `readRange()` the bytes asked for, counted from the end for a negative start, and never more than the file holds2 ms
- passed rejects a read of a path outside its root1 ms
- passed rejects a write, a `list()` and a ranged read outside its root0 ms
folderOf(path) 1 passed
given a folder on disk whose file is written 40 times while eight readers read it and list the folder 3 passed
A reader of `held.json` must see a whole version of it while it is written again. Eight readers read it and list the folder as it is written 40 times, with versions of 50 kB and 100 kB. Another program's file, `held.json.notmine.writing`, is in the folder from the start.
ExportedFiles 1 passed
given a folder that refuses links, with a link in the pod to a file or a folder outside it 3 passed
given a folder that refuses links, with the pod behind a link and hard links in it 2 passed
given a folder that refuses no link 1 passed
given a folder that refuses links, and the calls it makes to look at a path 2 passed
given a folder that refuses links, and forty files written at once 4 passed
`writeMany` writes the files of a folder several at once, never more than sixteen, and returns, or throws, with none still being written. Each file's lstat takes 5 ms, and the one named `bad.txt` is refused by it at once.
- passed writes every file, with more than one being written at a time and no more than sixteen173 ms
- passed throws the first failure with no file still being written, none half written and the failing one not there127 ms
- passed throws what the files given throw, once those begun have settled, and not as a success27 ms
- passed makes a folder another write looked at before it was made, and writes both files166 ms
given a path with a backslash or a colon in it 3 passed
- passed throws for a read, a range, a write and a new write of it, refusing links, and touches nothing14 ms
- passed throws for a read, a range, a write and a new write of it, following links, and touches nothing12 ms
- passed throws for a backslash behind a junction, which the platform reads as a separator, and writes nothing outside10 ms
given a folder that refuses links, and a folder of the pod swapped for a link after it was looked at 1 passed
given a folder that refuses links, and a pod folder that does not exist yet 1 passed
given a folder that refuses links on a platform that cannot open a file without following a link, and a listing 1 passed
given a folder that refuses links, on a platform that cannot open a file without following a link 2 passed
Fetching a folder of files in a web page FetchedFiles, packFolder(), unpackFolder() 12 passed
In a browser the vocabulary and a sample's pod are folders on a web server. `FetchedFiles` reads one over HTTP, and in one request where the server also holds the folder's pack: one JSON file that holds every file of the folder.
Source files.test.ts
packFolder(paths, files), unpackFolder(pack) 2 passed
given a `FetchedFiles` with a pack's address 6 passed
One `FetchedFiles` reads the folder `c/` of `https://site.example/components/`, whose pack is `c.json`. The pack's address answers 500 the first time it is asked. It is read once with the pack served and once with the address answering 404, and the server is asked every question the reads cause. Each read changes what the next fetches, so the leaves read what the reads left.
- passed fetches the first file read on its own, before the pack0 ms
- passed rejects a read that needs the pack while the pack's address responds 5000 ms
- passed fetches the pack again after that failure, and each file once however often it is read0 ms
- passed reads files, and lists folders, from the pack where one is served, with no request for `files.json`1 ms
- passed reads the folder itself, and `files.json` to list it, where the pack's address responds 4040 ms
- passed rejects, saying it is no pack of a folder, a pack's address that serves other JSON0 ms
given a server that sends its app's own page for a missing file 4 passed
Vite and most hosts answer a missing path with the app's own page, status 200 and `text/html`, so a file that is not there reads as a page. The server here does so, answers 503 for `down.ttl`, and serves `queries/a.rq` as text and lists it with the page `about.html` in `files.json`.
Sealing a pod's files newHeader(), openHeader(), EncryptedFiles 33 passed
A sealed pod keeps every file encrypted under a key derived from its owner's secret; only its header, `settings/encryption.json`, stays readable, and says how the key is derived. `openHeader()` gives the key for a header and a secret or throws `Unopened` with the reason, and `EncryptedFiles` reads and writes the pod's files under that key.
Source encryption-limits.test.ts, encryption.test.ts
given a header whose passphrase wraps ask for Argon2 work in total 2 passed
newHeader(secret, derive) 2 passed
- passed zeroes each copy it makes of the pod's data key7 ms
- passed writes a header of version 1.3 that states `resourceFormat` 318 ms
argon2id(secret, salt, params) 1 passed
given the pod encryption vectors (`pod-encryption/vectors.json`) 5 passed
The pod encryption vectors of the conformance repository, `pod-encryption/vectors.json` (`test/pod-encryption.ts`): headers other implementations wrote that must open or be refused with an outcome, and fixtures, whole pods and envelopes sealed elsewhere together with the secrets that open them. Key derivation is the real Argon2id where a vector must open, and a stand-in where it must not.
- passed throws Unopened with the outcome each of the vectors to refuse states179 ms
- passed derives no key for a header it refuses47 ms
- passed returns a 256-bit key for each of the vectors to accept4.06 s
- passed reads, with each secret of each fixture sealed by another implementation, the files that fixture holds1.99 s
- passed throws Unopened, `incorrect secret`, for a secret a fixture must not open with1.01 s
given a 32-byte key in place of a passphrase 6 passed
A key is 32 random bytes an app holds, so its wrap derives the wrapping key with HKDF, not Argon2id.
- passed writes a 1.4 header whose one wrap is a key wrap, and opens the pod with the key, deriving nothing with Argon2id22 ms
- passed throws Unopened, `incorrect secret`, deriving nothing, for another key, for a passphrase, and for a key given a passphrase's pod10 ms
- passed throws Unopened, `malformed`, deriving nothing, for a key wrap in a header of version 1.3, alone or beside a passphrase wrap, and for one whose kdf is not hkdf-sha2567 ms
- passed throws a TypeError, deriving nothing, for a key that is not 32 random bytes2 ms
- passed accepts a key made in another realm, a Node `vm` context, as one it opens the pod with17 ms
- passed throws Unopened, `malformed`, deriving nothing, for a 1.4 header that holds no key wrap, with a passphrase wrap or only a wrap of a kind it does not know3 ms
newPodKey() 2 passed
given a 1.3 header whose `resourceFormat` was edited 1 passed
EncryptedFiles 10 passed
Each leaf seals its own pod in memory, under a header made with a stand-in for Argon2id.
- passed reads back what `writeAll()` sealed6 ms
- passed throws Unopened, `changed outside the runtime`, naming the path, for two sealed files swapped5 ms
- passed throws Refusal for a 1.2 pod's file read under the same header restated as version 1.12 ms
- passed lists the pod's files without its header, and reads none of them to do so9 ms
- passed reads from the pod only the file whose path it is asked for12 ms
- passed rejects a write to the header, as its path is spelled and in another letter case4 ms
- passed rejects a write and a read of a path that is not canonical4 ms
- passed seals nothing for a write it rejects5 ms
- passed rejects a read of a file whose bytes changed after it was sealed7 ms
- passed rejects a write, and a read of a file that no longer opens, once the header in the pod has changed, saying to open the pod again6 ms
given files beneath that write several at once (`Files.writeMany`) 3 passed
- passed has the sealed index write the files it names in one `writeMany`, and reads each back10 ms
- passed seals the files of a pod with no index and gives them to `writeMany` beneath, each read back, and none for a path refused40 ms
- passed has no `writeMany` of its own where the files beneath have none4 ms
given a step that writes a file larger than the sealing limit (`maxBytes`) 1 passed
`CorePod.create()` writes the pod's first files; a file over `maxBytes` cannot be sealed as one file.
Matching a 1.2 pod's sealing against known answers newHeader(), openHeader(), EncryptedFiles 6 passed
The 1.2 sealing of a pod, checked against what other code computed: known-answer pods that must open to their stated plaintext, and what `newHeader()` and `EncryptedFiles` write, taken apart here with WebCrypto and a hand-built additional data, so that a fault on both sides of a round trip is no longer a pass.
Source encryption-vectors.test.ts
newHeader(secret, derive) 2 passed
given EncryptedFiles under a 1.2 key 1 passed
A 1.2 key's files are sealed as a 1.2 pod seals them: an upgrade's claim is one, for a 1.2 runtime to read.
Matching a 1.3 pod's sealing against known answers SealedIndex.open(), EncryptedFiles 3 passed
The 1.3 sealing of a pod, checked against what other code computed: known-answer pods whose resources are stored under keyed names and listed by a sealed index, and what `EncryptedFiles` writes, taken apart with WebCrypto and Node's own HKDF and HMAC.
Source encryption-vectors.test.ts
given the known-answer 1.3 pods (`pod-encryption-1.3.json`) 2 passed
`test/vectors/pod-encryption-1.3.json`: pods computed with libargon2 (argon2-cffi) and `cryptography`, as plain JSON.
given EncryptedFiles over a new header's sealed index 1 passed
Matching a 1.4 pod's key wrap against known answers newHeader(), openHeader(), SealedIndex.open() 2 passed
The 1.4 key wrap, checked against what other code computed: a known-answer pod whose data key is wrapped under HKDF of a 32-byte key, and what `newHeader()` writes for a key, taken apart with Node's own HKDF and WebCrypto.
Source encryption-vectors.test.ts
given the known-answer 1.4 pod (`pod-encryption-1.4.json`) 1 passed
`test/vectors/pod-encryption-1.4.json`: a pod computed with `cryptography`, as plain JSON, its keys in base64.
newHeader(key, derive) 1 passed
Keeping a pod's sealed files under keyed names SealedIndex.open(), EncryptedFiles 23 passed
A 1.3 pod stores each sealed file under a name keyed by its pod's data key, so its folder shows no path, kind or hash of what it holds; a sealed index names each file with its keyed name and the tag it was sealed with, so a file deleted, restored from an older copy, or swapped with another refuses with `changed outside the runtime`. A 1.2 pod is upgraded to 1.3 in place on its first open with the secret.
Source sealed-index.test.ts
when a 1.3 pod's files are written 3 passed
- passed stores each sealed file under a name that holds no part of its path and no hash of its bytes, and reads it back38 ms
- passed writes the index once for a `writeAll` of 10 files and once for one of 10,0001.39 s
- passed ignores a file the index does not name; at the next write removes one under `sealed/`, and the earlier copy of a file written again, and leaves one outside it143 ms
given a path the pod's own files are stored at 1 passed
when a new 1.3 pod is made 1 passed
given a folder that cannot hold a 1.3 pod 2 passed
when a 1.3 pod was changed outside the runtime 3 passed
- passed refuses with `changed outside the runtime`: at open, a named file or the index gone or cut short, or an earlier header beside the index; on read, an older copy at a file's name; on write, an older index74 ms
- passed reads the latest copy of a file whose older copy was put back at its earlier name, and removes that copy at the next write18 ms
- passed refuses with `changed outside the runtime`, removing nothing, a 1.3 pod whose index is gone beside an upgrade's claim held too long35 ms
when two openings write one pod 5 passed
- passed refuses the later writer's write, saying to open the pod again, and its read of a file the other wrote again, and leaves the pod as the first wrote it39 ms
- passed writes one of two writes whose looks at the stored index meet, as two processes' do, and refuses the other29 ms
- passed opens a pod that another opening writes while it opens, and leaves the other's write in it168 ms
- passed tells a writer its write was written, though another opening wrote the next index before it looked, when that index names every file the writer wrote; refuses it when it does not59 ms
- passed ends, when two processes write one pod again and again, with a pod that opens and holds every write either was told was written630 ms
when a write stops part way 1 passed
given a 1.2 pod 7 passed
- passed upgrades it to 1.3 in place on its first open: the same files and bytes, none stored under its own path, and no claim left39 ms
- passed leaves a pod that opens with the same files, as 1.2 until the 1.3 header is written, wherever the upgrade stopped, and wherever the upgrade that resumed it stopped again2.95 s
- passed states the file count in the claim a stop before the index leaves, though a renewal that began before the count was set lands after it135 ms
- passed upgrades it once when two openings race, and opens it for both23 ms
- passed waits on another opening's claim while it holds, and takes over one it has held too long233 ms
- passed upgrades a pod holding files at no path the layout uses that do not open, and leaves them where they are36 ms
- passed refuses with `changed outside the runtime` a pod holding a file at a path the layout uses that does not open, and leaves it a whole 1.2 pod with no claim23 ms
Reading a pod's files from archives ArchivedFiles, archivedFiles() 17 passed
A pod's host may keep the files that never change in ZIP archives, in the folder the layout gives `cascade:holdsFilesInArchivesOfMediaType` (X1). Over any host, `ArchivedFiles` is the pod's one listing of every file at its own path and every entry of every archive, an archive's directory read once when it is opened and an entry by one ranged read; an archive that is torn, or outside the profile, is refused, naming it, and so is a file held twice with other bytes.
Source archives.test.ts
given files at their own paths and in an archive, in memory and in a folder on disk 2 passed
- passed opens an archive by its directory alone, reads each entry by one ranged read, and counts both3 ms
- passed lists once a file held at its own path and in an archive with the same bytes7 ms
- passed refuses the pod, naming the path, when a file is held in two places with other bytes2 ms
- passed refuses, naming the archive and reading nothing from it, an archive that is torn or outside the profile4 ms
- passed refuses an archive that holds any entry that is no file N9 names to keep in one, naming the archive and the path3 ms
- passed refuses at the directory an entry declaring more than deflate gives for its bytes, or an archive declaring more than it may in all, before any allocation by what it declares85 ms
- passed reads an entry by one ranged read of its header, its data and no more, however much lies between it and the next7 ms
- passed refuses an entry whose bytes are not those its directory says, naming it and its archive0 ms
- passed takes an entry for a folder as no file and an archive of none as one holding nothing, and finds an archive's end past its comment0 ms
- passed writes a file no archive holds through to the host; refuses one an archive holds with other bytes, and removes none an archive holds1 ms
- passed with the vocabulary's layout, reads the archives in the folder it gives them; with none, is the host as it is1 ms
- passed leaves no handle open on an archive in a folder once its reads, one or several at once, have ended, so it can be renamed8 ms
given an encrypted pod whose sealed files are held in an archive 1 passed
cat and unpack, the commands that look inside 2 passed
Writing a pod's files into archives ArchivedFiles, StepWrites.commit(), archivesOf() 16 passed
A host that keeps a pod's files that never change in ZIP archives writes each step's new files as one archive, in the folder the layout gives them, after the file that says a runtime must be able to read archives to read the pod (X1, W1, O4): the step's stored documents first at their paths, its other files an archive may hold as one archive, flushed and renamed, and the files the layout gives by themselves after it. A pod that held its files loose first has its subject's file in its first archive, so that no runtime that cannot read archives opens it to see part of it.
Source archive-writer.test.ts
- passed writes a step as its stored documents and the files the layout gives by themselves loose and every other file as one archive named by its bytes, after the requirement's file, both flushed31 ms
- passed keeps a pod made loose a pod: the first archive written into it holds the subject's file too, and its loose copy goes, after the archive is in place13 ms
- passed leaves the pod as it was when the archive fails to land, the subject's loose copy still in place and no archive at a name4 ms
- passed removes the subject's loose copy an archive holds with the same bytes at the next step, as a step stopped before the removal left it22 ms
- passed keeps the step it wrote whole when the removal of the subject's loose copy throws after the archive is in place, and removes the copy at the next step9 ms
- passed backs out its own archive when another opening's, landed while it wrote, holds a file with other bytes, so that the pod does not stay refused6 ms
- passed keeps the archive another opening committed when this opening's step is the same step, written at the same name, and a third opening's archive clashes with them19 ms
- passed refuses the step, saying its own archive could not be removed, when the removal of an archive it backs out throws, after trying it again69 ms
- passed backs out the archive at the second try when the first removal of it throws30 ms
- passed writes a file of a snapshot's set that no archive may hold before the archive that holds the act's file820 ms
- passed finds an archive another opening wrote since it opened: a listing lists its files, and a step writes none of them, refusing one it holds with other bytes34 ms
- passed writes no file of an encrypted pod into an archive: its files are sealed one by one at their keyed names, and no archive nor requirement's file is made23 ms
- passed checks a file taken from an archive by the CRC-32 zlib gives, for every length across the eight bytes it reads at a time1 ms
- passed starts another archive where a step's files pass what one may hold, the act's file in the last, and leaves a file no archive may hold alone0 ms
given a pod that requires what the runtime cannot do 2 passed
- passed refuses at the first read, naming each requirement it does not meet or else the file; reads no file of a requirement it meets; ignores a name no requirement has5 ms
- passed keeps the requirements' folder out of a snapshot's set, out of what a build loads and out of what an upgrade refuses as changed0 ms
Holding graphs and querying them OxigraphStore, Union, RestorableUnion 35 passed
A store holds named graphs and runs SPARQL over them. A `Union` is a store read with some of its graphs as the default graph, which is how a pod is read under a lens; a `RestorableUnion` is one that can be changed for a while and then put back exactly.
Source store.test.ts
OxigraphStore 10 passed
- passed returns to `GRAPH ?g` the triples of every graph, whichever graphs the query names1 ms
- passed resolves a relative IRI against the graph it is loaded into3 ms
- passed keeps a literal's language and its datatype0 ms
- passed reads the union of the graphs a query names, and no graph when it names none0 ms
- passed joins a blank node between the default graph and a `GRAPH` of the same graph0 ms
- passed keeps two graphs' blank nodes apart, though one label names both0 ms
- passed returns the same terms when asked again, having freed what it read the first time0 ms
- passed rejects every query after `free()`1 ms
- passed returns from a CONSTRUCT each term as a parse of the same Turtle gives it2 ms
- passed returns as many blank nodes from a CONSTRUCT as the parse has1 ms
OxigraphStore.loadFiles() 4 passed
- passed holds each file's triples in its graph as loading each file alone does, the blank nodes of two files apart0 ms
- passed parses the files of the shape a runtime writes in one load, and each other file alone0 ms
- passed loads alone a file that has a directive right after a statement's dot, as `.PREFIX` or `.BASE`, with no failed block load first1 ms
- passed refuses a file that is no Turtle alone, naming its graph, the files before it loaded once, and lets no file write into another's graph7 ms
nTriples(text) 1 passed
Union 6 passed
- passed adds to its graphs each graph it adds triples to0 ms
- passed reads a blank node a CONSTRUCT returned as the node the store holds0 ms
- passed leaves out a graph that another union of the same store added0 ms
- passed returns how many quads `removeSubjects()` took out: the subjects' in the graph, none for a subject or a graph it does not hold6 ms
- passed removes the same quads without counting them, and gives 01 ms
- passed counts each quad once when a subject is given twice, and when there are more subjects than one removal binds29 ms
RestorableUnion 6 passed
- passed puts back every quad of each graph it dropped, added to or took subjects from, each blank node the node it was0 ms
- passed drops each graph it added0 ms
- passed tells the store the empty graph's name again when it restores, once, for that graph only0 ms
- passed counts in `moved` each quad it added and each quad a changed graph held0 ms
- passed returns how many quads `removeSubjects()` took out, as a union does1 ms
- passed rejects every use after `restore()`0 ms
store.renewed() 3 passed
- passed frees the store it is called on0 ms
- passed returns a store that holds every quad0 ms
- passed keeps in the new store each blank node the node it was0 ms
store.dump(), store.restore() 5 passed
- passed restores every quad into a store of its own0 ms
- passed keeps each blank node one node across the graphs it is in0 ms
- passed names every graph the store lists, one that holds nothing too0 ms
- passed restores from a store restored what it held0 ms
- passed refuses bytes cut short, and a store that holds something0 ms
Choosing and fetching Oxigraph's native or WebAssembly build chooseOxigraph(), nativeOxigraph(), fetchNativeOxigraph(), OxigraphStore 15 passed
Source oxigraph-engine.test.ts
- passed uses the native build where it loads, unless asked for the WebAssembly build1 ms
- passed uses the WebAssembly build where no native build loads, unless asked for the native one, and then throws why3 ms
- passed uses the WebAssembly build where looking for the native one throws, as under Node's permission model0 ms
- passed refuses a value of CASCADE_OXIGRAPH other than native, wasm or auto0 ms
- passed refuses a native build of another Oxigraph than the WebAssembly build's, naming both1 ms
- passed says why a native build that is not there, or does not load, is not used3 ms
- passed loads a kept build only where its sha256 is the one committed for this platform, and a file CASCADE_OXIGRAPH_NATIVE names unchecked1 ms
- passed makes each store on the engine it is given, and its renewal on the same0 ms
- passed makes every other store of the run on the engine CASCADE_OXIGRAPH asks for, which the suite names, wasm unless told0 ms
- passed sets up a compatibility run on Linux x64 by fetching the published native build, and has its conformance command use it4 ms
- passed leaves a compatibility run on the engine it was told to use, and fetches nothing it will not read0 ms
- passed changes nothing of a compatibility run where no published build is relied on, which is every platform but Linux x643 ms
- passed fetches nothing for a platform whose sha256 is not committed, and says so0 ms
- passed keeps no file whose sha256 is not the committed one, and names both7 ms
- passed keeps a file whose sha256 is the committed one, and fetches it again only once it is not42 ms
Opening a pod's SQLite database openDatabase() 6 passed
The runtime keeps a pod's answers in a SQLite database beside it. The core sees only a `Database` of prepared statements; the opener makes one on a file, sealed with a key when it is given one.
Source sqlite.test.ts
- passed opens in write-ahead mode with temporary tables in memory, and runs prepared statements and a transaction28 ms
- passed keeps none of what a transaction wrote when its work throws, and throws what the work threw33 ms
- passed registers each function it is given on the connection, for SQL to call with any number of arguments11 ms
- passed seals the file, its write-ahead log and its shared memory with ChaCha20-Poly1305 under the key as it is, and reopens it with that key45 ms
- passed throws DatabaseKeyRefused, no Refusal, carrying the engine's error, for a sealed file without its key or with another, and for a plain file given a key2 ms
- passed refuses a key that is not 32 bytes0 ms
Building a pod's database whole beside it databaseAt() 6 passed
A pod's database is built whole from a store's dump when it names no build of the pod's files. The build is long for a large pod, so it runs on a thread of its own, into a file of its own put in place once the build is whole.
Source sqlite.test.ts
- passed builds it on another thread, sealed under the key, and puts it in place: the event loop never waits half as long as the build1.21 s
- passed draws each step the worker timed, when the run is traced, on a track of its own as a child of the span that waited for the worker353 ms
- passed leaves the database it had in place, and no file of the build, when the build fails part way704 ms
- passed plans every statement of a whole build and of a keyed refill by the statistics the vocabulary ships, taking none of the pod's: a build leaves its rows as shipped, and none scans quad or term from end to end or searches a predicate's whole range of quad in a loop649 ms
- passed reports a scan of term or quad under whatever alias a statement names it by, and a search of either or a scan of another table by none2 ms
- passed leaves no file of the build when the database it would replace cannot be removed191 ms
Answering the vocabulary's SQL from a pod's statements loadStatements(), sqlFunctions(), sqlCheckAssertions() 25 passed
The vocabulary keeps a `.sql` beside each question's `.rq`, over its schema of a pod's statements in SQLite, calling six functions where SQLite has no answer of its own. The runtime loads a pod into that schema, registers the functions, and checks each `.sql` gives its `.rq`'s rows on every fixture, under each lens, as EARL assertions.
Source statements.test.ts
- passed gives each vector's output from its input, and refuses each input a vector marks refused131 ms
- passed registers the six on a connection, each taking as many arguments as it is given, a whole number given back as an integer1 ms
- passed loads a store's graphs, each term once with its kind, lexical form, datatype and calendar keys, every record in scope7 ms
- passed asserts failed, naming the fixture, the query and the row, a .sql that drops a value from a row the fixture's manifest pins5.88 s
- passed gives a list question's rows without its trailing page_key, and the key of each row as it was written1 ms
- passed gives a question in the parts prepare and answer the rows of its answer, after running its prepare statements each time it is asked, and a question in no part as before1 ms
- passed asks a pod's database a question in the parts prepare and answer, its statements compiled once on the connection, as it asks a question in no part1 ms
- passed drops what a question's prepare part made by its cleanup part, once its answer has given its rows and when it fails1 ms
- passed drops what a question's prepare part made from a pod's database by its cleanup part, each time it is asked, also when the answer fails1 ms
- passed refuses a question's parts in another order than prepare, answer and cleanup0 ms
- passed splits a part into its statements at each ; outside a string, a quoted name and a comment, so each is compiled once and run again0 ms
- passed gives no SQL assertion, and throws nothing, for a vocabulary with no SQL0 ms
- passed asks a question bound to records through asked, leaving scope to the build, and says when the pod holds none of them6 ms
- passed fails only the screen whose part throws, naming it and the part, and the questions that read it6 ms
- passed makes the labels file's labels from labels.sql after every view's fill and before any finish, and takes it for no screen5 ms
- passed writes the labels file's labels back in one transaction with statements prepared once, however many rows labels.sql gives12 ms
- passed reports a screen whose fill, keyed to a record, does not give the tables a whole fill gives13 ms
- passed reports a finish whose rows of shown_in_entry, which no screen makes, a keyed run does not give as a whole fill does13 ms
- passed asserts failed a manifest entry that runs the query and pins no result5 ms
- passed writes each literal the runtime made as Oxigraph's store holds it, and one Oxigraph cannot read as it was written18 ms
- passed loads Oxigraph's own N-Triples of each literal, a calendar value it keeps as written among them12 ms
- passed refuses to load a literal Oxigraph would hold in another, canonical, form7 ms
- passed gives null, as the vocabulary's Python does, for a decimal operand SQLite gives as the integer 02 ms
- passed names a .sql's assertion with the .sql in its fragment, so a report that shows only the fragment names the query0 ms
- passed judges an ORDER BY's ties on a STR or a SUBSTR of it by that text, and on a term by SPARQL's <1 ms
Finding the vocabulary and adapters a run uses resolve(), siblingsOf(), packed() 22 passed
The runtime reads the vocabulary, the adapters and the reference tables from repositories of their own, its components. `resolve` picks the folder each is read from and logs in one line which commit a run used, so a result can be traced to the rules it was run against.
Source resolver.test.ts
given a sibling checkout of the component 3 passed
given a process that lives on while a sibling checkout moves 5 passed
- passed resolves it again at the commit it is at now231 ms
- passed sees a branch's ref move with no change of the index300 ms
- passed sees a commit in a linked worktree, where the ref lives in the main repository351 ms
- passed sees a commit on a detached HEAD305 ms
- passed keys the folders handed in without regard to their order1 ms
given no sibling, and a folder handed in 2 passed
given a repository holding a path past 260 characters, fetched into a long cache folder 1 passed
- passed checks out every file, as Windows needs git's `core.longpaths` for164 ms
given neither 3 passed
given a sibling the compatibility tooling merged a pull request's head into 2 passed
siblingsOf(root) 3 passed
packed(folder) 3 passed
Build and packaging 53 passed
Tripwire: a code system's IRI stem typed into code 1 passed
Red means a TypeScript file under a package's `src` writes the stem of a code system's IRIs: a code system's URI space, or one of the five stems above. A typed stem works until the vocabulary moves the URI space, and then joins nothing. Read the URI space from the vocabulary (`tableTerms()`), or from `codeStems`, which `terms.test.ts` holds to the vocabulary. The package is not at fault; the file that writes the stem is.
Source stems.test.ts
The developer story's scripts, run from a fresh folder developer-story/allergies.mjs, developer-story/medications.mjs 4 passed
The two scripts the README walks a developer through, run as that developer runs them: from a folder outside the repository, on a kit's downloads, with the real Bridge.
Source developer-story.test.ts
when `medications.mjs` is run on Priya's export and her health summary 3 passed
The lisinopril of Priya's FHIR export and of her C-CDA summary is one entry: a README script reaches rule P2.
Rule conformance/priya-natarajan/priya-natarajan.feature P2
The Bridge package a run from a checkout uses findBridgePackage() 11 passed
A run from a checkout of this repository loads the Bridge from a package compiled in a checkout of cascade-bridge-rs beside it, or in one handed in, when that package was compiled from the checkout's files as they are; otherwise it downloads the package published for the checkout's commit. It logs which one it took and why it passed another over, so a result can be traced to the Bridge it ran on.
An installed app loads the Bridge its package carries (`packed()`), and runs none of this.
Source bridge-package.test.ts, bridge-record.test.ts
given a sibling checkout whose package was compiled from its files as they are 2 passed
given a sibling checkout whose package was compiled from other files than it holds now, and a checkout handed in whose package was compiled from its files as they are 2 passed
given a sibling checkout with no package and nothing uncommitted 2 passed
given a sibling checkout with no package and an uncommitted file 1 passed
- passed records a sibling checkout's build with its folder, so a developer with no cached release is pinned to it1 ms
- passed stops, saying to run npm run bridge, when a sibling's build is gone0 ms
- passed pins a release to its commit, which must be in the cache0 ms
- passed stops when nothing is recorded0 ms
Picking the Bridge package for a CI run pickBuild(), latestBuild(), keptPick(), runOf(), readerOf() 27 passed
cascade-bridge-rs publishes a package, tagged `build-<commit>`, for every commit of its default branch and for the latest commit of each PR from itself. A CI run of the runtime picks one: the Bridge PR its own PR names on a `Depends-On:` line, else the Bridge's branch named like the run's, else the newest on the default branch.
Source bridge-package.test.ts
latestBuild(repository, at) 3 passed
- passed returns the nearest commit before the default branch's latest that has a published package, while the latest has none0 ms
- passed returns the same commit for the rest of the process, though the latest commit's package is published since0 ms
- passed returns the default branch's latest commit when it has a published package0 ms
pickBuild(repository, at, run, read) 8 passed
- passed picks the default branch's newest published package outside CI60 ms
- passed picks the latest commit of the open Bridge PR that `Depends-On:` lines reach from the run's PR through a PR of another repository9 ms
- passed matches the repository on a `Depends-On:` line whatever its case11 ms
- passed passes over a named PR of another repository that cannot be read, and follows a later one that can13 ms
- passed picks the Bridge's branch named like the run's target branch when the named Bridge PR is merged34 ms
- passed picks the Bridge's branch named like the branch a push is on28 ms
- passed picks the default branch's newest published package when the run's PR targets the default branch16 ms
- passed picks the default branch's newest published package when the Bridge has no branch named like the target6 ms
when the pick cannot be used 7 passed
- passed rejects a branch whose latest commit has no published package, naming the branch13 ms
- passed rejects a named Bridge PR whose latest commit has no published package, naming the PR9 ms
- passed rejects a named Bridge PR closed without merging0 ms
- passed rejects a named Bridge PR from a fork, naming the fork0 ms
- passed rejects two Bridge PRs named at once, naming both0 ms
- passed rejects a named Bridge PR that cannot be read0 ms
- passed rejects a `Depends-On:` line that names no PR0 ms
keptPick(repository, at, run, env, read) 3 passed
runOf(env) 3 passed
given readerOf(env) with neither `GITHUB_TOKEN` nor `GH_TOKEN` set 3 passed
- passed reads the PR under test from the run's event, so a PR that names nothing asks GitHub's API nothing19 ms
- passed reads every other PR from the file `CASCADE_PULL_REQUESTS` names, matching repositories whatever their case18 ms
- passed rejects a named Bridge PR that the file `CASCADE_PULL_REQUESTS` marks as not read11 ms
The Bridge build a release publishes releasedBuild() 10 passed
Source bridge-package.test.ts
given a release that holds the package under its fixed name 2 passed
- passed downloads it without asking the API8 ms
- passed rejects a package that records another commit2 ms
given a release made before the fixed name, which answers 404 for it 1 passed
given a repository URL ending in `.git` or `/` 3 passed
- passed downloads from the plain URL, as .git leaves it3 ms
- passed downloads from the plain URL, as / leaves it3 ms
- passed downloads from the plain URL, as .git/ leaves it2 ms
given a fixed-name download refused with 403 or 429 3 passed
given a fixed-name download that fails for another reason than 404 1 passed
- passed rejects without asking the API1 ms
evals 387 passed
evals 387 passedcascade-evals 0.0.0 · commit 326fc39 · unreleased: what main does today, not a compatibility promise
The eval harness: it asks a synthetic person's questions of one model twice, once reaching her pod only through `cascade-mcp` (the pod arm) and once reading every download (the records arm), checks each answer by program, has blind judges grade the rest against a key written before any run, and writes the results and a report. It is run on demand by `cascade-evals`; no app calls it.
Glossary
- absence (absences)
- what a reply says the records lack: the codes and words a record of it would carry (`match`), what was looked through (`coverage`), and the tool call (`query`) or the files (`sources`) that looked.
- answer (answers, answered)
- here, the reply a subject writes to one question, saved as `<question>.json` in the job's folder under the run's `answers/`.
- arm (arms)
- one of the two ways a model is given a person's records: the pod arm or the records arm.
- backed (backs)
- of an absence, borne out by what was looked through; an absence that is not comes back with `backed: false` and a `reason`.
- beyond the key
- of a point in an answer, matching no key item; a judge gives each a verdict of its own: fair, true but not planted, speculative, or contradicted by the records.
- cap (caps)
- the most tokens and dollars a config lets a run spend; a job that would pass it is not started.
- cascade-mcp
- the MCP server of the runtime through which the pod arm reaches a pod; the harness starts one for each job.
- case (cases)
- a synthetic person the harness asks about: her downloads, her questions in sessions, and the key, in a folder of `cases/`.
- checkout (checkouts)
- one copy of a repository on disk; a job can be reused from a run made in another checkout, such as a worktree.
- child (children)
- the `claude -p` process the runner starts for one job.
- citation (citations, cite, cites, cited)
- where a fact points (`cite`): a view entry, a FHIR resource in a download, or a line of one. In a reply about downloads it also gives, field by field, what the fact says the record there holds.
- compact read (compact reads)
- the whole pod as tab-separated text, which the `ask` tool returns a part at a time when called with `format: "compact"`; each line is one row of a view, its cells separated by tabs.
- config (configs)
- a file of `configs/` that says which cases, models, repeats and judges a run has, and its cap; `smoke`, `standard` and `full` are the tiers.
- doctor card (doctor cards)
- the part of the report that shows one answer as a person could hand it to a doctor: the question, the short answer, each dated fact with its source.
- download (downloads)
- a file of a person's records as a hospital's server or portal gave it, before any import: FHIR resources in JSON, or a C-CDA document.
- fact (facts)
- one record an item rests on: what the model says of it, and where it is.
- feed (feeds)
- a published list of the versions of reference tables, which an app reads to find newer ones.
- FHIR
- Fast Healthcare Interoperability Resources: HL7's standard for health records as JSON.
https://hl7.org/fhir/R4/ - field (fields)
- one kind of thing a record says: its `value`, `unit`, `status`, `code`, `name` or `id`, a date (`date`, `start`, `end`, `recorded`), or its text (`text`, from which a `quote` is taken).
- give back (given back, gives back, giving back)
- to return a job a child left unfinished to `pending`, with what the child wrote removed, so the next `--go` runs it again from the start.
- hand-out (hand-outs, handed out, hands out)
- the moment `ask` gives a session its next question; also said of a job the runner has given to a child.
- handle (handles)
- a compact read's short name for a view entry: a letter for its view, then the first eight or more hexadecimal digits of the view entry's name, such as `L41e35923`. `ask` takes a list of them in `entries` to return only those view entries' rows.
- held tables (held, whole)
- the reference tables the harness keeps once in its work folder, `work/reference-tables`, and copies into each case's pods folder; a fetch is whole when every feed came, none refused or unread, and `.whole` marks it.
- inputs hash (hash)
- a digest of everything a session's answers depend on; a recorded session with the same hash is reused, not run again.
- instance (instances)
- one case, model and repeat, with both arms' sessions and their judging: the unit the report counts.
- item (items)
- one point of a reply, with what it rests on.
- job (jobs)
- one unit of work the runner hands out: a subject's session on one arm, or one judge's sitting.
- judge (judges, judged)
- here, a model that grades both arms' answers against the key without being told which arm wrote which.
- kept clone (kept clones)
- a pinned clone left on disk by an earlier run and reused while its files are unchanged; `checkKept()` checks it.
- key (keys)
- what a case's author wrote, before any run, that a good answer to each question finds: `key.json` for programs and `key.md` for the judges.
- key item (key items)
- one thing the key expects of one question: a fact or an absence to find, a planted gap to raise, or a trap to avoid.
- letters (letter)
- the names, A and B, under which a packet shows the two arms' answers, in an order drawn for each judge's sitting.
- model (models)
- a language model that an app lets answer a person's questions about their records.
- packet (packets)
- the one file a judge reads: the questions, both arms' blinded answers under letters, and the key's prose.
- passage (passages)
- the lines of a download a citation points at, as the harness read them, at most `PASSAGE_CAP` characters.
- pinned run (pins, pinned)
- a run whose config names a commit for each repository the pod arm depends on; the runtime of those commits builds the pods and serves them.
- plan (plans, planned)
- here, a run's `plan.json`: its config, cases and jobs, each job with its status.
- pod (pods)
- one person's records, and what that person has said about them, kept as files in one folder.
- pod arm
- the arm in which the model reaches the person's pod only through `cascade-mcp`'s tools.
- print view (print views)
- a page of the report that holds every doctor card of one arm of one run, laid out for paper.
- prompt version
- a digest of every part of an arm's prompt; it is one of a session's inputs.
- provenance
- of a view entry, what the pod's own files say it came from: its records, each record's versions, and the documents those were read from.
- record (records)
- one thing said about a person's health, such as an allergy, a medication or a lab result.
cascade:Record - records arm
- the arm in which the model is given every download as a file and reads them itself.
- reference tables (reference table)
- public code lists, such as RxNorm for medicines, that tell a runtime when two codes mean one thing.
cascade:ReferenceSeries - refuse (refuses, refused)
- here, of a function, to throw an Error whose message says why, naming what it refused; it returns nothing.
- reply (replies)
- a model's answer to a person's question about their records, as JSON.
- reply contract (contract, contracts)
- the form a reply must take: an `answer`, a `short` form of it, and `items`. `replySchema` is its JSON Schema, and `replyErrors()` lists where a reply departs from it.
- resource (resources)
- one record in FHIR, named by its type and its id, such as `Observation/ldl-1`.
- run (runs)
- one execution of a config, in a folder of `runs/`: its plan, prompts, answers, verdicts and, once finished, `results.json` and the report.
- runtime
- here, cascade-runtime-js, the code that builds a pod and serves its tools; a pinned run builds and serves the runtime of its pinned commit.
- scrubber (scrubbed, scrubs)
- the function that replaces, with `[record]`, text only one arm writes: a resource reference, a file name with a line, a handle, an IRI.
- session (sessions)
- one chat: the questions a case asks in it, asked in order of one model on one arm. A subject's job is one session.
- session id (session ids)
- the identifier a job's child is started with (`--session-id`), which names the session's transcript file.
- starter copies (starter)
- the reference tables as the package carries them, which a new app uses until it has read a feed.
- subject (subjects)
- here, the model being evaluated, as it answers a session. The person a pod is about is written "the person" on this page.
- tag (tags)
- the first line of a job's prompt, `eval-tag: <run>/<job>`, by which a Workflow agent's transcript is known as the job's.
- tell (tells)
- wording the scrubber cannot remove that could let a judge guess the arm, such as "the pod" or "line 211"; each is recorded with its arm and question.
- tie
- codes, words, a day and a kind of record that the caller holds an absence to as well as the absence's own, passed as `tied`; the evals take them from their answer key.
- tool (tools)
- a function a model may call: a name, a description, a JSON Schema for its input, and the code that runs it.
- tool call (tool calls)
- one run of a tool by a model: the tool's name, the input it was given, whether it succeeded, and what it returned.
- transcript (transcripts)
- the `.jsonl` file Claude Code writes of one session: every model call with its tokens, and every tool use.
- trap (traps)
- a key item that names something a good answer does not say; it is graded avoided or raised, and counted apart from the key items an answer should find.
- Turtle
- a W3C text format for writing statements in the vocabulary's terms; `pod.enter()` and `pod.judge()` take it.
https://www.w3.org/TR/turtle/ - verdict (verdicts)
- here, what one judge wrote of one packet: a grade for each key item under each letter, and a grade for each point beyond the key.
- view entry (view entries, entry, entries)
- one thing in a view, such as one medication or one lab result: the records that are one thing, shown as one. A row names it in `entry`, by an IRI that ends in `#` and 64 hexadecimal digits.
cascade:inEntry - violation (violations)
- one tool use of a job outside what it was allowed: a file read, a command run or a file written that is not its own.
- wave (waves)
- the jobs the runner starts together; the cap is checked between waves.
No entry matches.
Giving every case's pod the reference tables referenceTables(), giveTables() 12 passed
The harness holds the reference tables once, in its work folder, and copies them beside each case's pods, as an app holds them. A fetch that did not finish whole is never taken for the tables.
Source tables-fetch.test.ts, tables-given.test.ts, tables.test.ts
with `CASCADE_EVALS_WORK` set 1 passed
refuseIncomplete(reports, held) 4 passed
holdsWholeTables(folder) 2 passed
with `CASCADE_EVALS_TABLES` naming a folder that holds no tables 2 passed
- passed refuses, naming the variable and the folder1 ms
- passed copies no starter tables into it0 ms
giveTables(pods, held) 3 passed
Running the pod arm at pinned commits resolvePins(), cloneAt(), checkKept(), pinnedPod(), askerOf() 12 passed
A config's `pins` names a commit for each repository the pod arm depends on, so an eval can be run again on the code of an earlier day. The pinned runtime is cloned and built apart, and everything it does runs in its own checkout. `cloneAt()` clones `source`, the folder or address of a repository, into `folder/name` at `pin`.
Source pinned.test.ts
resolvePins(pins) 3 passed
- passed returns each repository's pin2 ms
- passed refuses pins that leave out cascade-runtime-js0 ms
- passed refuses a repository that no run pins, naming it0 ms
cloneAt(folder, name, source, pin) 1 passed
checkKept(folder, commits) 3 passed
- passed turns `core.longpaths` back on in a kept clone that lost it0 ms
- passed refuses a kept clone whose files were changed, naming it0 ms
- passed leaves the changed clone at its commit0 ms
pinnedPod(environment, command, pod, questions) 1 passed
mcpServer({ mcp, pods }) 2 passed
given a pinned run (`askerOf()`) 2 passed
Reusing a session whose inputs are unchanged sessionInputsHash(), versionOf(), reusesPreparedPod() 18 passed
A session is not run again when a recorded one had the same inputs, and its inputs hash is how the harness tells. What follows is what that hash and a prompt's version cover, since anything left out is a change that reruns nothing. In `sessionInputsHash()`, `found` is the case and `session` one of its sessions.
Source sessions.test.ts, tables.test.ts
sessionInputsHash({ found, session, … }) 8 passed
- passed returns the same hash for the same inputs1 ms
- passed changes for the session that asks a reworded question0 ms
- passed keeps the hash of a session that does not ask it0 ms
- passed changes with the tools a child is allowed0 ms
- passed changes with the runner's version0 ms
- passed changes with the downloads0 ms
- passed changes with the pod's commits on the pod arm0 ms
- passed keeps a records-arm session's hash when the pod's commits change0 ms
versionOf(arm, parts) 4 passed
- passed changes when the arm's example changes0 ms
- passed changes when the records arm's citing instructions change0 ms
- passed differs between the two arms0 ms
- passed changes with the pronouns a prompt is written with0 ms
reusesPreparedPod(kept, downloadsSha256, components, tables) 4 passed
sessionInputsHash() 2 passed
Running a whole eval with one command showRun(), runEval() 10 passed
`showRun()` is `run --config <tier>`: it shows a run's jobs and their estimate against the cap. `runEval()` is the same with `--go`: it runs them, in waves, through the judges to `finish`.
Source run.test.ts
showRun({ run }) 4 passed
- passed returns every job of the plan with its status, each `pending` before any `--go`1 ms
- passed returns the run's estimate beside its cap, and whether it fits0 ms
- passed starts no child0 ms
- passed throws for a `config` other than the one the run was planned from0 ms
runEval({ run }) 4 passed
- passed starts one child for each subject's job and one for the judge0 ms
- passed takes every job to `done`0 ms
- passed writes `results.json` with every job in it, each with its model calls counted0 ms
- passed starts no child for a run that is finished0 ms
when the next job would pass the cap 2 passed
One child at a time, each spending about 6,200 tokens against an estimate of 1,000: the second would pass 7,000.
- passed starts no child for that job0 ms
- passed marks that job `skipped`, with the cap as its reason1 ms
Confining a child to its job childOf(), resolveClaude() 18 passed
Each job runs as one `claude -p` child that is given only the tools its prompt names and none of the machine's own setup, so neither arm is helped by where it ran. These tests run `runEval()` against a stand-in `claude` that logs how each child is started.
Source run.test.ts
given the children `runEval()` starts for a subject on each arm and a judge 13 passed
- passed starts each as `claude -p` with its job's model0 ms
- passed gives each only the tools of its kind: Read, Write and Bash on the records arm, Bash and Write on the pod arm, Read and Write for a judge0 ms
- passed allows the tools it gives, and no other1 ms
- passed passes every flag that keeps the machine's setup out0 ms
- passed sets the permission mode `dontAsk`0 ms
- passed turns Claude Code's own memory off0 ms
- passed denies the tools no child may use, each by name0 ms
- passed names no tool that this `claude` does not know0 ms
- passed hands each child its prompt as the run holds it, opening with its tag7 ms
- passed runs each in a folder of its own under the harness's work folder1 ms
- passed allows one Bash rule for each command the child's prompt names, and no other0 ms
- passed allows a subject its `ask` command, and a pod-arm subject its `pod` command with whatever follows0 ms
- passed writes no rule as wide as `Bash(node *)`, and none with a backslash0 ms
childOf(plan, job, prompt) 1 passed
with `CASCADE_EVALS_CHILD_MINUTES` set to something that is not a number 2 passed
- passed throws, naming the variable0 ms
- passed starts no child0 ms
resolveClaude(name, platform, path) 2 passed
Giving a job back when its child leaves it unfinished runEval(), giveBack() 20 passed
A child can end without its answers: a usage limit, a lost login, Ctrl-C. Its job is given back, to be run again from the start by the next `--go`, and a wave in which every child fails stops the run.
Source run.test.ts
when `claude` cannot be started 2 passed
- passed throws, saying it could not start0 ms
- passed leaves every job `pending`0 ms
when one child of a wave exits in an error with nothing answered 2 passed
- passed starts that job's child again in the same `--go`0 ms
- passed takes every job to `done`0 ms
when one child of a wave exits 0 with nothing answered and a refused tool call in its transcript 2 passed
- passed starts that job's child again in the same `--go`0 ms
- passed takes every job to `done`0 ms
when every child of a wave fails 3 passed
- passed throws, saying every child of the wave failed1 ms
- passed leaves the wave's jobs `pending`0 ms
- passed takes them to `done` on the next `--go`0 ms
when a child leaves a session part answered 3 passed
when a run was interrupted with jobs handed out 1 passed
- passed takes each to `done` on the next `--go`0 ms
when removing one job's answers throws (`giveBack(folder, which)`) 3 passed
- passed rejects0 ms
- passed leaves the job given back before it `pending`, with its answer removed0 ms
- passed records what that job's attempt spent under `abandoned`0 ms
Keeping one runner on a run run.lock 5 passed
`run.lock` in the run's folder names the process running it, so two `--go` never start the same job.
Source run.test.ts
given a lock that names a live process 1 passed
- passed throws, saying the run is being run0 ms
given a lock whose process is gone 2 passed
- passed takes the run over, to `done`0 ms
- passed removes the lock when the run ends0 ms
given a lock whose process is gone and whose recorded child is alive 2 passed
- passed throws, saying a child is still running0 ms
- passed starts no child0 ms
Asking a session its questions one at a time sessionPrompt(), ask() 15 passed
A subject's prompt tells it to run `ask` for its next question, and `ask` hands one out only once the last is answered by a reply that keeps the reply contract. So no later question shapes an earlier answer, and a broken answer is mended while the session can still mend it. What the contract is, is "Checking a model's reply against a person's records · checkReply(), replyErrors(), replySchema, numberedReply()" on cascade-runtime's page.
Source ask.test.ts
given the pod arm's prompt (`sessionPrompt()`) 3 passed
- passed shows one command that reads the whole pod1 ms
- passed writes that command's input as the `ask` tool's schema accepts it, with `format: "compact"`52 ms
- passed names the job's own pod in that input0 ms
ask(run, job) 5 passed
- passed returns the session's first question, in the person's words0 ms
- passed returns, while the last question has no answer, where to write the answer0 ms
- passed returns the next question once the last is answered0 ms
- passed returns that there are no more questions once every one is answered0 ms
- passed logs each hand-out, with its job and question, to `asked.jsonl`1 ms
when the last answer breaks the reply contract 5 passed
- passed names the answer's file and says it is not JSON5 ms
- passed names the property the reply lacks18 ms
- passed quotes the contract's sentence for two items with one `n`5 ms
- passed returns no new question9 ms
- passed returns the next question once the answer is mended9 ms
given a run planned with a prompt whose facts point 1 passed
- passed refuses the same answer, naming the missing `field`25 ms
Calling a job's pod server callLogged(), stopPodServer() 4 passed
A pod-arm session reaches its pod through one `cascade-mcp` server per job. A call through it takes the next number and is logged, with its error when it throws, so that an absence can name the call that looked.
Source pod-client.test.ts
callLogged(client, folder, job, args, counter) 3 passed
given a server that takes `--stop` and never answers (`stopPodServer()`) 1 passed
Finding the transcript of a job readTranscript(), transcriptsSince() 9 passed
What a job cost is read from the transcript Claude Code wrote of it. A transcript is a job's only by the session id the job was started with, or by the tag a Workflow agent's task carries.
Source run.test.ts, transcripts.test.ts
given children started by `runEval()` 2 passed
given a Workflow agent's transcript (`readTranscript()`) 2 passed
transcriptsSince(since, wanted, root, sessions) 5 passed
- passed finds a `claude -p` session by the session id its job was started with0 ms
- passed returns that session's model calls, each with its input and output tokens1 ms
- passed finds a Workflow agent's transcript by its tag0 ms
- passed takes no session for a job whose session file carries another job's tag0 ms
- passed takes no session that no job was started with, whatever tag its prompt carries0 ms
Charging each question its own cost splitSession() 8 passed
A session's model calls are split at each hand-out, so a question's tokens and time stand apart from what the session spent before its first question. On the records arm the files a session read before its first question are read again, as cache, by every later call, and `recordsTokens` says how much of a question's cost that is.
Source sessions.test.ts
splitSession(calls, asked, ended, arm) 5 passed
- passed returns a part for each question, in the order they were handed out1 ms
- passed charges the calls before the first hand-out to the session, not to a question0 ms
- passed charges each later call to the question handed out last before it0 ms
- passed times each question from its hand-out to the next, the last to the session's end0 ms
- passed charges every token of the session once, across the session's part and the questions'0 ms
splitSession(…, "records") 2 passed
splitSession(…, "pod") 1 passed
- passed returns no records' context0 ms
Holding a job to its own downloads and run folder checkAnswer() 8 passed
A subject may read only its case's downloads, and its commands and answer file may name only its own run's folder. `checkAnswer()` reads the job's tool uses and lists each one that went outside as a violation.
Source checks.test.ts
checkAnswer(options) 2 passed
given a job reused from an earlier run 1 passed
given a job reused from another checkout 5 passed
- passed holds its commands and answer file to that checkout2 ms
- passed counts a download read in that checkout as read1 ms
- passed returns a violation, naming the case and the checkout, for a read of another case's downloads there1 ms
- passed counts nothing as read for a read of another case's downloads there1 ms
- passed returns a violation, naming it, for a read in a second checkout1 ms
Resolving a citation to what it cites passageOf(), podProvenance(), evidenceOf() 22 passed
For the report, each citation is looked up by program: a file's passage and the download it came from, or a view entry's records, their versions and documents. Nothing here is the model's word. Whether an absence is backed is decided by "Checking what a reply says a pod lacks · checkAbsence()" on cascade-runtime's page; here is only which call the report shows.
Source evidence.test.ts
passageOf(downloads, cite) 7 passed
- passed returns the resource a citation names, as the file writes it, with its JSON pointer3 ms
- passed returns the line a citation names, with the line's number as `from` and `to`0 ms
- passed returns, with the passage, the source and retrieval time of the download the file is in0 ms
- passed cuts a passage at `PASSAGE_CAP` characters and marks it `truncated`0 ms
- passed leaves a passage within the cap whole and not marked `truncated`0 ms
- passed returns undefined for a line past the file's last0 ms
- passed returns undefined for a resource the file does not hold0 ms
given a FHIR bundle written on one line 1 passed
podProvenance(pod) 5 passed
- passed returns the view entry's type1 ms
- passed returns each record of the view entry with its id at its source and its address there0 ms
- passed returns each version of a record with the time it was observed and where in its document it stood0 ms
- passed returns the documents the versions were read from, with their server0 ms
- passed returns undefined for a view entry the pod does not hold0 ms
unescaped(text) 2 passed
given an absence of the pod arm (`evidenceOf()`) 5 passed
- passed returns the tool call the absence names by number1 ms
- passed returns the call though it did not succeed0 ms
- passed returns null when the number is no call's, or is a call of another input0 ms
- passed returns the first call of the absence's tool and input that succeeded when it names no number0 ms
- passed returns the first call of the absence's tool and input when it names no number and none succeeded0 ms
given an absence of the records arm (`evidenceOf()`) 2 passed
Blinding the answers a judge reads judgePackets(), blinded(), scrubbed(), tellsOf() 27 passed
A judge grades both arms' answers without knowing which arm wrote which. Its packet holds the answers under letters, stripped of what only one arm writes, and what cannot be stripped is recorded as a tell. What an answer must be to be shown is decided by "Checking a model's reply against a person's records · checkReply(), replyErrors(), replySchema, numberedReply()" on cascade-runtime's page.
Source judging.test.ts
judgePackets(run) 6 passed
- passed gives each judge a folder outside the run that holds only its packet and its prompt3 ms
- passed leaves each answer's citations and coverage out of the packet1 ms
- passed draws the letters in more than one order across runs508 ms
- passed reuses a recorded verdict with the letters it was written to90 ms
- passed carries the key's prose without a section of scoring rules0 ms
- passed shows each item of an answer under its number, by its place when the answer gives none851 ms
given an answer that breaks the reply contract 1 passed
blinded(reply) 6 passed
- passed shows every item, also one with no fact and no absence1 ms
- passed shows an item's own knowledge on a line of its own0 ms
- passed shows an absence by what it says is absent, and nothing of how it was looked for0 ms
- passed shows a link between facts of two items1 ms
- passed removes every token the scrubber removes, from every part of a reply1 ms
- passed keeps a sentence that names no record byte for byte0 ms
given a fact that points at a view entry (`blinded(reply, filled)`) 2 passed
given a fact that copies what its record says (`blinded(reply)`) 1 passed
scrubbed(text) 7 passed
- passed replaces a FHIR resource reference or element path with `[record]`0 ms
- passed replaces a file's name and line with `[record]`0 ms
- passed replaces an IRI, an id, a path that names a view or an id, or a name only the pod holds with `[record]`0 ms
- passed replaces several in one sentence, each once0 ms
- passed removes every unambiguous token, a placeholder in its place0 ms
- passed leaves no doubled placeholder, doubled space or empty brackets0 ms
- passed returns a sentence that names no record unchanged0 ms
tellsOf(text) 3 passed
- passed lists each wording of a fixed list that the text holds0 ms
- passed returns none for a sentence that holds none0 ms
- passed leaves the tell in the text0 ms
tellsIn(at, reply) 1 passed
- passed records each tell with its arm and question0 ms
Reading a judge's verdict gradesOf(), verdictProblems() 4 passed
A verdict grades each key item and each point an answer makes beyond the key. One that breaks its schema grades nothing and is reported, never half read.
Source judging.test.ts
gradesOf(plan) 3 passed
verdictProblems(plan) 1 passed
Counting what each arm found countsOf(), instancesOf() 11 passed
An arm's count of a key item is the verdict its judges share; where they differ it is counted split, and a question the arm never answered is counted unanswered, so both arms are counted out of the same total.
Source sessions.test.ts
countsOf(items, grades, answered) 6 passed
- passed counts a key item by the verdict its judges share0 ms
- passed counts a key item its judges grade differently as split0 ms
- passed counts the key items of an answered question no judge graded as ungraded0 ms
- passed counts a key item that is a trap apart, out of the traps' own total0 ms
- passed counts a point beyond the key by the verdict its judges share0 ms
- passed counts a point beyond the key its judges grade differently as split0 ms
given a question the arm never answered 2 passed
- passed counts that question's key items as unanswered, a trap among them too0 ms
- passed keeps them in the total0 ms
Finishing a run into results.json finish() 24 passed
`finish` checks every answer again, reads the verdicts, and writes `results.json`, the one file the report is rendered from, and the report beside it.
Source finish.test.ts
given a run of two cases 7 passed
- passed records each case of the run, in its order2 ms
- passed records each case's person, the day it is asked on, and its description0 ms
- passed records each subject job's opening prompt0 ms
- passed reports each verdict that breaks its schema, naming its judge0 ms
- passed marks a judge whose verdict breaks its schema `failed`, with the reason0 ms
- passed logs a verdict that breaks its schema, naming its judge, while it runs0 ms
- passed writes the report's pages beside `results.json`0 ms
given an answer whose items carry no `n` 2 passed
given a recorded run of one session on both arms, with one judge 15 passed
- passed writes results that hold to the results schema1 ms
- passed closes a handed-out job whose every answer is written as `done`0 ms
- passed splits each subject's calls at its hand-outs0 ms
- passed charges a records-arm question for the records it read again0 ms
- passed lists every hand-out of the run, in the order they were logged0 ms
- passed resolves a file citation to its passage, with the resource and the download it came from0 ms
- passed gives an absence the logged call that looked, with its rows and its time0 ms
- passed carries the case's pod build time, its sessions and its key0 ms
- passed links the key's prose at the harness's commit0 ms
- passed names the instance by its case, model and repeat0 ms
- passed counts each arm out of every key item of the case, those of questions the run never asked as unanswered0 ms
- passed counts a point beyond the key under the arm that made it0 ms
- passed counts a fact that points at a view entry by its field, held or failed0 ms
- passed counts a fact that copies its record with no field0 ms
- passed charges the judge's cost to the instance's judging, and each subject's to its arm0 ms
Reading the report's front page renderSite() 23 passed
One row per model, with what each arm found as counts, and one per instance, which opens its run.
Source site.test.ts
given two runs of two models 16 passed
- passed shows one row for each model2 ms
- passed shows what each arm got right as a count out of its key items1 ms
- passed shows a cost in dollars in each model's row0 ms
- passed shows no percentage0 ms
- passed totals each arm's cited facts borne out over every run, from the runs1 ms
- passed counts an answer a later run reused once, in the run that gave it, in whatever order the runs come29 ms
- passed counts an answer in full when the run that gave it is not on the page7 ms
- passed counts an answer in full when a job reuses from its own run5 ms
- passed marks on each run's row, for each arm, the cited facts it adds to the total, so the rows add up to the total6 ms
- passed marks the share of an arm only some of whose sessions a later run reused, and the rows still add up to the total9 ms
- passed marks nothing as left out when the run that gave an answer is not on the page4 ms
- passed states the totals' limit and that runs vary0 ms
- passed shows one row for each instance, each a link to that run's page0 ms
- passed states an instance's judging cost in its row, as charged to neither arm0 ms
- passed keeps judging out of both arms' blocks0 ms
- passed links to how the test works0 ms
given one run 6 passed
- passed draws a filled dot for each key item an arm got right0 ms
- passed draws an open dot for each key item the judges split on or the arm never answered0 ms
- passed draws no miss dot where the arm missed nothing0 ms
- passed explains the open dot and the `!` in its legend0 ms
- passed shows an arm's points beyond the key that are possibly good as `+N beyond the key`0 ms
- passed says apart how many points beyond the key the judges split on0 ms
given a point a judge found contradicted by the records 1 passed
Reading one run's page renderSite() 29 passed
Each question as the person asked it, both arms' answers as they were written, what each cost, and what the test itself cost, charged to neither arm.
Source site.test.ts
with each question 8 passed
- passed shows the question in the person's own words1 ms
- passed shows each arm's answer as it was written0 ms
- passed shows what an answer cost in tokens, dollars and time0 ms
- passed says how many of a records-arm answer's tokens were its files, read again0 ms
- passed shows the question as it was put to the model0 ms
- passed shows the whole opening prompt of each session under that session's first question0 ms
- passed shows a prompt's text, never the path of its file0 ms
- passed says what could have told a judge the arms apart, by the tell and the arm0 ms
with the test's overhead 5 passed
- passed names each judge's model, as charged to neither arm0 ms
- passed keeps every judge and the word judging out of each answer's cost0 ms
- passed says no pod build time1 ms
- passed lists the letters each judge saw the answers under0 ms
- passed shows `unknown arm` for a letter whose job the results do not hold3 ms
with the key under each question 7 passed
- passed starts closed0 ms
- passed calls itself a reference, not a verdict0 ms
- passed lists the question's key items0 ms
- passed shows a point beyond the key as possibly good, with what the answer said0 ms
- passed shows each judge's own verdict on a point they split on0 ms
- passed says that the records contradict a point a judge found contradicted, with the judge's name0 ms
- passed shows a judge's point that is outside every numbered item, with the judge's reason10 ms
with the layout of each question 5 passed
- passed keeps each arm's reasoning, evidence graph and doctor's card off the run's page0 ms
- passed links each arm's answer to its reasoning page and its doctor's card page4 ms
- passed writes each linked page0 ms
- passed links back to the question on the run's page from each linked page0 ms
- passed draws no graph wider than 1000 px1 ms
given a run's page that holds the reasoning links of the questions `flu` and `flu-shot` 4 passed
- passed sends `?open=` a point of `flu` to the `flu` link only4 ms
- passed sends `?open=` a point of `flu-shot` to the `flu-shot` link only1 ms
- passed sends a `#point` hash as it sends `?open=`1 ms
- passed sends nothing, and throws nothing, for a hash with a malformed escape1 ms
Seeing what an answer's citations cite renderSite() 17 passed
Under each answer, a graph from the model's citations to what the harness resolved them to. It shows only what `results.json` holds.
Source site.test.ts
with the pod arm's graph 5 passed
- passed shows a cited view entry's provenance: its record, how many versions, the source and its dates1 ms
- passed shows the rows and the time of a logged call an answer points at1 ms
- passed says `no such record` for a citation that resolves to nothing, and marks it failed0 ms
- passed draws nothing beyond a citation that failed0 ms
- passed shows the model's own knowledge, marked as not from the records1 ms
with the pod arm's graph of a fact that points at a view entry 2 passed
with the records arm's graph 6 passed
- passed ends at the passage a citation names: its file and lines, its resource, the day it was retrieved0 ms
- passed shows the passage's own text0 ms
- passed shows a link between two files where the answer wrote one0 ms
- passed shows no link where the answer wrote none0 ms
- passed names a file that an absence's `sources` leave out0 ms
- passed says how many files an absence covers when the answer did not name its `sources`0 ms
with the evidence removed from `results.json` 4 passed
- passed shows no record, no count of versions, no passage and no resource0 ms
- passed shows no download date0 ms
- passed shows each fact as the answer wrote it0 ms
- passed says that whether the records arm's files were read whole is not recorded0 ms
Printing what to show a doctor renderSite() 14 passed
A doctor card is an answer cut down to what a doctor can check: the question, the short answer, and each dated fact with its source.
Source site.test.ts
with the doctor card of an answer 6 passed
- passed opens with the question the person asked0 ms
- passed shows the answer's short form0 ms
- passed shows each dated fact with its source and the download it came from0 ms
- passed shows an absence as looked for and not found0 ms
- passed leaves out the model's own knowledge0 ms
- passed dates the card the case's day, not the day the run finished0 ms
with the print view of one arm 7 passed
- passed holds one card for each question of the case0 ms
- passed lists a question the arm never answered as not answered0 ms
- passed links to the other arm's print view0 ms
- passed carries its own print styles0 ms
- passed shows each question and each fact's source0 ms
- passed leaves out the model's own knowledge, every judge and every cost0 ms
- passed dates each card the case's day0 ms
with the run's page 1 passed
- passed links to the print view of each arm0 ms
Reading about a case's person, and how the test works renderSite() 14 passed
A page per synthetic person, and one page that explains the test and what it cost to build each pod.
Source site.test.ts
with the person's page 2 passed
with the front page 1 passed
with each run's page 1 passed
- passed links to the person's page0 ms
given a case recorded with another name and pronoun 5 passed
- passed names that person on the run's page: its lead, its asker line, its initial and its title0 ms
- passed writes the lead with the recorded pronoun0 ms
- passed names that person on the front page, and no other0 ms
- passed names that person on how the test works, with no "her" and no "she"0 ms
- passed names that person on the person's page0 ms
with how the test works 4 passed
- passed says each pod's build time, whole and per question0 ms
- passed says that the build made no model calls0 ms
- passed says `not timed` for a pod whose build time was not recorded2 ms
- passed counts the tells: how many terms, in how many answers0 ms
given results with no tells recorded 1 passed
- passed says nothing of tells on any page5 ms
Publishing the report renderSite(), buildSite() 7 passed
`renderSite()` returns every page by its path, and `buildSite()` writes them.
Source site.test.ts
renderSite(runs) 1 passed
given a case with no questions 1 passed
- passed renders no `NaN` and no `Infinity`, on any page1 ms
buildSite({ run }, out) 3 passed
renderSite(runs, history, home) 1 passed
with no `home` 1 passed
- passed gives no page that breadcrumb0 ms
Comparing the recorded runs, and reading the judges' calibration renderSite() 14 passed
One page sets every recorded run side by side, and one renders the judge calibration.
Source site.test.ts
given every run in the history 10 passed
- passed has one row per run, each arm's figure the sum of what the run's own instance rows show401 ms
- passed links every run to its instances' pages, each a page of the site0 ms
- passed gives the difference as the pod's count minus the grab bag's0 ms
- passed notes the recorded runs whose grab-bag answers repeat an earlier run's, from the answers0 ms
- passed notes an arm whose every answer repeats an earlier run's, naming that run and linking the issue, and no arm whose answers differ14 ms
- passed puts each run's instance links in a details, summarised by their count, and sets each figure's own counts beside it3 ms
- passed counts a run's questions by how many its sessions list3 ms
- passed links the comparison only when it is written0 ms
- passed breaks the figures down by model and by person across the runs0 ms
- passed is linked from the front page and how the test works, and shows no percentage0 ms
given calibration.md and calibration.json 3 passed
given one run and no calibration 1 passed
- passed writes no calibration page and links none0 ms
Keeping the hub's pages to builders speaksToPatient() 25 passed
The hub's pages are about a person's records, for the builders and adopters of a protocol; none speaks to a patient.
Source audience.test.ts
given a sentence 18 passed
- passed flags "Ask your health records a question."3 ms
- passed flags "your doctor brings that"1 ms
- passed flags "List the medicines you take."0 ms
- passed flags "Own your own health data."0 ms
- passed flags "See <b>your</b> <em>health</em> story."0 ms
- passed flags "We’re here for you."0 ms
- passed flags "<b>You asked</b> <q>What do I take?</q>"0 ms
- passed flags "Show my doctor, on paper"0 ms
- passed flags "Ask your health records"0 ms
- passed flags "Your medications are listed."0 ms
- passed flags "See your records."0 ms
- passed passes "puts the patient at the center"1 ms
- passed passes "A patient's doctor reads the records."0 ms
- passed passes "Your health app imports FHIR; your runtime files it."0 ms
- passed passes "The person's records stay on the person's device."0 ms
- passed passes "<style>.your-health { color: red }</style><p>Fine.</p>"0 ms
- passed passes "The question the person asked, and a card for the person's doctor."0 ms
- passed passes "<div class="reply" data-recorded><p>Your conditions <div>are</div> stable.</p></div><p>Fine.</p>"0 ms
given an element marked `data-recorded` 5 passed
- passed still reads the hub's own wording in <div class="bubble"><span class="from">Ask your health records</span><span data-recorded>Fine.</span></div>0 ms
- passed still reads the hub's own wording in <details data-recorded-x><summary>Fine.</summary>Ask your health records a question.</details>0 ms
- passed still reads the hub's own wording in <p title=" data-recorded">Ask your health records a question.</p>0 ms
- passed still reads the hub's own wording in <p title='a data-recorded b' class="x">Ask your health records a question.</p>0 ms
- passed leaves out the marked element and keeps its siblings0 ms
- passed finds no patient-addressed sentence in the hub's sources24 ms
- passed finds none on a rendered evals page50 ms
Recording a run in the history recordHistory() 2 passed
`recordHistory()` copies a finished run into `history/`, which is committed and published.
Source history.test.ts
given a run planned from uncommitted work 2 passed
- passed refuses, saying how many files were uncommitted1 ms
- passed writes nothing to `history/`1 ms
Build and packaging 15 passed
The cases in `cases/`, as checked in 8 passed
Source judging.test.ts, sessions.test.ts
given the packets of priya-natarajan and priya-natarajan-at-scale 2 passed
given every case 4 passed
- passed asks each question once across its sessions0 ms
- passed asks the check-up question0 ms
- passed holds a key item for every question it asks0 ms
- passed holds no key item for a question it does not ask0 ms
given `tamsin-vale` 1 passed
- passed asks four to six questions0 ms
The tiers in `configs/`, against `calibration.json` 2 passed
A judge nobody calibrated makes the grades unknowable: every tier's judges are ones whose agreement with the reference was measured.
Source calibration.test.ts
given every config 1 passed
- passed judges only with a model that calibration measured1 ms
given a config of the standard tier 1 passed
The recorded run the report's tests read 5 passed
Source site.test.ts
given the recorded run's `results.json` 5 passed
- passed holds to the results schema1 ms
- passed holds the instances `instancesOf()` gives of its own jobs, grades, checks and answers1 ms
- passed holds every subject job with as many calls as its stats count, and its opening prompt0 ms
- passed holds a question that both arms were asked and charged for and neither answered0 ms
- passed holds the case's person, day and description0 ms
site 787 passed
site 787 passed@cascade-runtime/site 0.0.0 · commit 326fc39 · unreleased: what main does today, not a compatibility promise
The generator of Cascade's documentation site: the pages of a sample pod, the specification, the term reference, and the unit-test pages, of which this is one. Nothing installs it: it runs when the site is built, and this page is for whoever changes the site or sends it a test report.
Glossary
- about line
- the one sentence, under a package's name on its tests page, that says what the package is and who calls it; it is the `about` of the package's `spec.json`.
- accounting
- an adapter's own list of every source path of its format, each with a verdict: carried into a record, and as which vocabulary term, or not carried, and why.
- adapter (adapters)
- the program that converts an export into records; `import` loads it on first use.
- anchor (anchors)
- the part of a web address after `#`, which takes a reader to one place on a page: the `id` of a heading, a rule or an entry.
- build section (build check, build checks)
- the closed section at the end of a package on a tests page, headed "Build and packaging", for the cases of a file or capability that a package's `spec.json` lists under `build`, checks of how the package is built; it is not part of the specification.
- C-CDA
- Consolidated Clinical Document Architecture: HL7's standard for the XML summary documents patient portals hand out.
- capability (capabilities)
- one thing a package does for whoever calls it, named as a developer would search for it, with its API after a dot: the top level of a tests page, and the outermost `describe` of a test file.
- case (cases, leaf)
- one test as a report records it: its name, whether it passed, failed or was skipped, and how long it took. On a tests page a case is a leaf: it completes the sentence "it …".
- Choice row (Choice rows)
- one line of the Choice table of a decision note: a thing that was decided, the prior art, and what the vocabulary does, which names the rule the decision led to.
- code system (code systems)
- a published list of codes for one kind of thing, such as RxNorm for medicines, LOINC for lab tests and SNOMED CT for clinical findings.
- conformance results
- what one run of the vocabulary's features against a runtime found: for each example, passed, failed or not run. The run writes them in EARL.
- crosswalk (crosswalks)
- what an adapter's accounting says each source path becomes: the vocabulary term it is carried as, and the source paths that are not carried. The adapter's explorer shows it.
- CTRF
- Common Test Report Format, an open JSON format for test results (ctrf.io); the site writes each suite's results in it beside the page, for an agent, and reads it from a suite no test runner runs.
- decision note (decision notes)
- a Markdown file in the vocabulary's `decisions/` folder that settles one design question: a Choice table of what was decided, and a Why section whose paragraphs each give the reason for a Choice row. A rule names the note and the Choice row that ruled it.
- digest
- the SHA-256 hash of a text, written in hexadecimal; a few of its first digits tell apart two things of one name.
- doc comment (doc comments, description, descriptions)
- a `/** … */` comment directly above a `describe` or a test; the tests page shows it as that level's description.
- Docs block (Docs blocks)
- the `## Docs` section a repository's README opens with: links into the site, the front page first.
- EARL
- Evaluation and Report Language, a W3C format for test results as Turtle; conformance results are written in it.
https://www.w3.org/TR/EARL10-Schema/ - example (examples)
- under a rule in a feature, one worked scenario: a pod made a certain way, and what must then be true of it. A conformance run passes or fails each.
- feature (features)
- a file of the vocabulary that states its rules on one subject, each with examples, in Gherkin, such as `runtime/arrivals.feature`; a kit has one of its own.
- FHIR
- Fast Healthcare Interoperability Resources: HL7's standard for health records as JSON.
https://hl7.org/fhir/R4/ - finisher (finishers)
- a function the site's build calls last, with every file the sections wrote, which returns more files made from them, such as an index.
- front page
- the site's `index.html`: a "Find your way" table of what a reader may have come for, and a list of the project's repositories.
- gap (gaps)
- a named reason a source path is not carried, or is carried in part, such as "only the first note is carried"; an adapter lists its gaps in a file of its own.
- glossary (term, terms, alias, aliases)
- the words a package's tests use in one sense, each with a one-sentence definition, listed in the package's `spec.json` and shown under its about line; a term may have aliases, other forms of the word that link to the same definition.
- guide
- `guide/AGENTS.md` of the cascade-runtime package: the document for a developer, or a coding agent, who is building an app on a pod. The site shows it as the API page and copies it as `AGENTS.md`.
- IRI (IRIs)
- a web-style identifier, such as `https://ns.cascadeprotocol.org/cascade#allergenName`; every vocabulary term, record and view entry is named by one.
- JUnit
- an XML format for test results that most test runners can write; each runner fills it in its own way.
- kit (kits)
- a story and the exports it uses, which the vocabulary carries for testing, such as `alex-rivera`.
- kit check (kit checks)
- one of the five things `runtime/the-kit.feature` requires of a replay of a kit's story, numbered 2 to 6, such as check 3, "every file conforms to the shapes". Check 1 is that every example passes.
- lens (lenses)
- a choice of which judgments count when a question is answered: `everyday` is the default, and `export` is stricter, for records sent elsewhere.
- level (levels)
- a heading of a tests page that holds cases or other levels: a capability, or a situation under it. In a test file it is a `describe`.
- llms.txt
- a Markdown file at a site's root, in the form llmstxt.org proposes, that lists the site's main links in groups for a language model to read.
- matcher (matchers)
- the part of a runtime that compares a pod's records and writes a Same for those its rules find to be one thing, such as one allergy reported by two sources.
cascade:CascadeMatcher - named question (named questions)
- a query the vocabulary carries under a name, such as `pod/My active allergies`.
- namespace (namespaces, prefix, prefixes)
- the shared start of the IRIs of one vocabulary, such as `http://xmlns.com/foaf/0.1/`, which a prefix such as `foaf:` stands for.
- package (packages)
- one folder `packages/<name>/` of a repository, with its own `test/` and `spec.json`: a tests page shows each as one top-level group of capabilities; a repository with no `packages/` is one package named for it.
- pod (pods)
- one person's records, and what that person has said about them, kept as files in one folder.
- record (records)
- one thing said about a person's health, such as an allergy, a medication or a lab result.
cascade:Record - report
- the file one run of a repository's tests wrote, in JUnit or, for a suite no test runner runs, in CTRF; the site reads the newest from `main`.
- resource (resources)
- one record in FHIR, named by its type and its id, such as `Observation/ldl-1`.
- row (rows)
- a line of the front page's "Find your way" table: one thing a reader may have come for, such as "build an app", and the links that serve it. Each section says which row its links go in.
- rule (rules)
- a numbered requirement in the vocabulary that every runtime must meet, such as A14 in `runtime/arrivals.feature`; a heading on this page links the rules its API reaches.
- runner (runners, test runner)
- the program that runs a repository's tests and writes the report: node:test, pytest, vitest or nextest; `ctrf` for a suite no runner runs, whose report is already in CTRF.
- runtime (runtimes)
- software that reads and writes pods as the vocabulary requires; this package is one.
- section (sections)
- one part of the site, such as the term reference or the specification: the files it writes, among them its entry page, and the links it lists for the front page.
- shapes (shape)
- 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/ - situation (situations)
- the second level of a tests page: the function under test, written as code, or a circumstance beginning "when", "given" or "with".
- slug (slugs)
- a name made fit for an address: lowercase letters and digits, with one hyphen for each run of anything else.
- source path (source paths)
- where a value sits in a record of a source format, written as a path such as `/code/coding/code` in FHIR.
- spec.json
- the file `test/spec.json` of a package: its about line, its capabilities in the order the page shows them, its glossary, and the files and capabilities it lists under `build`, which are build checks.
- specification
- the vocabulary's features, read as the rules a pod and a runtime must meet; the site shows them under `spec/`.
- starter kit
- cascade-starter-kit: the app template that `create-cascade-app` makes, and the `try/` page that runs one in a browser.
- suite (suites, suite list)
- one repository's tests, as `packages/site/test-suites.json` lists them: where its newest report is found and which runner wrote it.
- summary bar
- the strip that stays at the top of a tests page: the package, the commit, the counts of passed, failed and skipped cases, the run time and three buttons.
- term reference
- the page of the site, at `terms/`, that has an entry for every vocabulary term.
- test folder (test folders)
- where a repository's test files sit when that is not `test/` or `tests/`, as `test-suites.json` gives it in `tests`, ending in "/"; the page leaves it off the names of the files.
- tests page (tests pages)
- the page of one repository's test results, read as a specification.
- Turtle
- a W3C text format for writing statements in the vocabulary's terms; `pod.enter()` and `pod.judge()` take it.
https://www.w3.org/TR/turtle/ - verdict (verdicts)
- what an accounting says an adapter does with a source path: carried, carried in part, no home in the vocabulary, ignored, consumed in reading the record, or redundant with another source path.
- view (views)
- a pod's records of one kind, such as medications, as its judgments leave them: one line for each thing however many sources reported it. A named question such as `pod/My medication history` returns a view's rows.
cascade:View - view entry (view entries)
- one thing in a view, such as one medication or one lab result: the records that are one thing, shown as one. A row names it in `entry`, by an IRI that ends in `#` and 64 hexadecimal digits.
cascade:inEntry - 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# - vocabulary term (vocabulary terms, terms of the vocabulary)
- one word the vocabulary defines, such as `cascade:allergenName`: a class, a property or a named value, named by an IRI.
No entry matches.
Building a site from sections buildTree() 15 passed
A section is one part of the site: the files it writes and the links it lists for the front page. `buildTree()` builds each section, then the front page from their links, then the finishers, and refuses a site in which a file is written twice or a listed link reaches nothing.
Source sections.test.ts
with two sections 3 passed
with a section the `skip` option names 1 passed
- passed leaves out its files and its link1 ms
with sections that cannot make one site 6 passed
- passed refuses two sections that write one file, naming the file1 ms
- passed refuses a section that does not write its own entry page0 ms
- passed refuses a link to a file nothing writes0 ms
- passed leaves a link for agents off the front page4 ms
- passed refuses a second link to a file nothing writes0 ms
- passed refuses a file outside the site: a `..` part, a `.` part or a drive path0 ms
with a finisher 5 passed
- passed hands it the site as written, the front page included0 ms
- passed hands it each section's entry page, the files it wrote and its links0 ms
- passed adds the files it returns to the site0 ms
- passed refuses a file it returns that a section already wrote0 ms
- passed accepts a section's link to a file only a finisher writes3 ms
The front page hubFiles() 16 passed
The front page is where a reader starts: a "Find your way" table with a row for each thing a reader came for, and a list of the project's repositories. `hubFiles()` writes it from the links every section lists, and refuses to link one address twice, so that each page has one place a reader finds it.
Source find-your-way.test.ts, first-pages.test.ts
given the site's own sections 7 passed
- passed is titled and headed Cascade Protocol reference1 ms
- passed leads "see it work" with the example pods, and links the in-browser try page after them1 ms
- passed lists a row for each thing a reader came for, in the table's order, each with its links1 ms
- passed links no address twice1 ms
- passed lists each live repository in order, linked, beside what it is for1 ms
- passed links the reference tables' own site beside their repository0 ms
- passed leaves out the archived and the private repositories0 ms
given links that reach one address twice 4 passed
given links for one row only 1 passed
given the titles of a pod's views 4 passed
- passed names each kind of record a pod holds, in the views' order0 ms
- passed names the two formats a pod is built from, FHIR R4 and C-CDA0 ms
- passed shows no command0 ms
- passed links no file the site lacks0 ms
A newcomer's first pages startSection, examplesSection, trySection 12 passed
Three sections carry a newcomer's first minutes: the quick start (`start.html`) gives one command, `examples.html` lists each kit's pod, and `try/`, which moved to the starter kit, sends its old visitors on.
Source first-pages.test.ts
with `start.html` 4 passed
- passed gives the starter kit's command at the commit built, then the prompt for a coding agent1 ms
- passed links the front page and the starter kit's `try/`3 ms
- passed links no file the site lacks0 ms
- passed refuses a kit name the vocabulary lacks0 ms
with `examples.html` 3 passed
- passed links each kit of the vocabulary, by its name, to its site0 ms
- passed links no file the site lacks0 ms
- passed links the vocabulary at the commit it was built from1 ms
with a kit's pod on the site 2 passed
- passed lists in `files.json` exactly the pod's files the site holds3 ms
- passed holds the same files in `pod.pack.json`0 ms
with `try/index.html` 3 passed
The API page apiSection 17 passed
The API page shows the guide and the README of the `cascade-runtime` package as pages, so a developer reads on the site what a coding agent reads as `AGENTS.md`.
Source api-page.test.ts
with `api/index.html` 7 passed
- passed shows the guide under the guide's own title1 ms
- passed shows every `##` heading of the guide1 ms
- passed keeps code as code0 ms
- passed links `AGENTS.md` and the page of the package's README0 ms
- passed opens with a contents list that links each `##` heading once, at a heading of that id1 ms
- passed links only files the site holds2 ms
- passed opens a pod in a section a screen or two long, with the reference tables and the browser build after the last call's section1 ms
with `search.json` 4 passed
- passed has a row for each call the page names bare, at an anchor the page holds once0 ms
- passed has a row for a call the page names only as an argument of another0 ms
- passed has no row for a helper of an example, so the query `text` finds no call1 ms
- passed lands the rows on more than one place of the page, each at the first mention0 ms
given the package as it stands, `callNames()` 1 passed
given calls named in code spans, `apiPages()` 2 passed
with `api/package.html` 3 passed
- passed shows the package's README, without its install marker or any comment0 ms
- passed links only files the site holds0 ms
- passed has no contents list0 ms
The term reference termReference(), termsSection 69 passed
The term reference is an index and a page for every vocabulary term: what it is, the shapes that check it, and each query and rule that names it. Every other page's link to a vocabulary term lands on its page.
Source term-reference.test.ts
`termPages()` 19 passed
- passed gives each vocabulary term a page at the address `termHref()` links, one copied from elsewhere too2 ms
- passed gives the vocabulary's own namespace no page0 ms
- passed gives each page the id of its term on its heading, so a search row lands on it0 ms
- passed shows a vocabulary term's name, its type and its domain as a link, and no row for a range it lacks0 ms
- passed says none stated nowhere0 ms
- passed says "No definition yet" of its own term with no comment, and of no term copied from another vocabulary0 ms
- passed shows a vocabulary term's comment, its see-also link, its source and its licence0 ms
- passed shows the shape that checks a vocabulary term: its name, its limits and its message0 ms
- passed links a shape that another shape sends a value to, at an anchor of its own on the page of the shapes other shapes use0 ms
- passed shows a class's shape as a table of each property, its value type, how many and what it says when it is not met1 ms
- passed labels each cell of a shape's table with its column, which the stylesheet shows on a narrow screen1 ms
- passed leaves out what a term has none of, so a term with no query, rule or source has no closed section0 ms
- passed puts the rules, what a class is a subclass of, its source and its licence in a section that is closed0 ms
- passed lists the other members of the scheme a named thing is in, and the members on the scheme's own page1 ms
- passed links each query that names the vocabulary term, by prefix or by whole IRI0 ms
- passed leaves out a query that names only a longer name, or names it in a comment0 ms
- passed links each rule whose text names the vocabulary term, by prefix or by whole IRI0 ms
- passed shows an IRI on `ns.cascadeprotocol.org` as text, never as a link2 ms
- passed names the commit of the vocabulary it was read at0 ms
with its index of classes 9 passed
- passed opens the page's lists, before the properties1 ms
- passed lists under what a pod holds each class the pod layout says holds records, with its label, its name and its first sentence0 ms
- passed lists the subclasses of prov:Activity under acts, with only the first sentence of their comment0 ms
- passed cuts a gloss at the first colon or semicolon, or at a word before the limit, and ends a cut with an ellipsis0 ms
- passed does not end a gloss's sentence at an abbreviation's full stop0 ms
- passed lists the other classes of the vocabulary's own under other classes, and none copied from elsewhere0 ms
- passed gives a class with no comment the line that it has no definition yet4 ms
- passed links every name of a list to the page of a term0 ms
- passed gives every term a row with the id its anchor had, so an old link to `terms/#cascade:Name` lands on the row0 ms
with the old anchors of the shapes 1 passed
with the shapes other shapes use, on a page of their own 4 passed
- passed holds no shape definition on the index, which links the page with its count1 ms
- passed lists on the page every shape the index used to, each by the id its anchor had, and `#shapes` on its heading0 ms
- passed sends a link to a moved shape's old anchor, and to no other missing one, to that page0 ms
- passed links back to the index0 ms
with the lists of properties, named things and copied terms 6 passed
- passed groups the properties by the class they are said of, each group folded and closed with its count0 ms
- passed groups the named things by their scheme, else by their class0 ms
- passed groups the terms from other vocabularies by prefix0 ms
- passed keeps each term's row, with its id, inside its group0 ms
- passed puts a property with no domain, or with two, under `Said of many kinds` after the groups of a class5 ms
- passed writes a group for a single term3 ms
with two terms whose names differ only by the case of the first letter 1 passed
with the neighbours of a named thing 3 passed
with a shape that checks the subjects of a property, and no class 2 passed
with more than ten queries that name one vocabulary term 1 passed
- passed folds them under their count0 ms
with two queries that name one vocabulary term 1 passed
- passed lists them unfolded0 ms
`termsSection` 5 passed
- passed writes the term reference at `terms/index.html`0 ms
- passed writes a page for each term under `terms/<prefix>/<Name>.html`0 ms
- passed writes `terms/terms.json` with every term's fields, and the vocabulary's two files beside it0 ms
- passed writes no JSON for a term of its own0 ms
- passed links it from the front page as `terms/`0 ms
given the vocabulary itself 17 passed
- passed keeps the index under 200 KB on disk1 ms
- passed holds no shape definition on the index, and lists on the shapes' page as many as the index counts5 ms
- passed lands every link to a shape other shapes use on the shapes' page on one of its ids57 ms
- passed folds each long list into closed groups, which hold every term it listed2 ms
- passed gives every term a page of its own, and every link to one lands on a page96 ms
- passed keeps on the index the id of every shape a term's page shows whole, and `#classes`2 ms
- passed gives every named thing neighbours but the sole instance of its class: the other values of a list that holds it, the other instances of its class, or the other members of its scheme127 ms
- passed writes no two pages at paths that differ only by case1 ms
- passed lists in `terms.json` each term that has a page, and names its page45 ms
- passed shows no gloss over the limit, and a cut gloss with its whole sentence on hover1 ms
- passed names no vocabulary by its address where a copied term says where it is from3 ms
- passed gives every vocabulary term of `cascade#` an entry38 ms
- passed lists under what a pod holds every class the pod layout says holds records3 ms
- passed says none stated nowhere, and of no term copied from PROV-O that it has no definition yet0 ms
- passed links a query from the page of `cascade:vaccineCode`0 ms
- passed lands every rule link on a rule of the specification's pages596 ms
- passed lands every link within the page on an id of the page1 ms
The Bridge's terms bridgeTermReference(), bridgeTermsSection 24 passed
The Bridge's own vocabulary has a page beside the term reference, and a page for each term `vocab/bridge.ttl` of cascade-bridge-spec declares, with the shapes that use it, made with the component the term reference is made with.
Source bridge-terms.test.ts
`bridgeTermPages()` 10 passed
- passed gives each term of `bridge.ttl` a page, and a row of the index at its old anchor, a term copied from elsewhere too8 ms
- passed leaves out the terms it is told another page describes11 ms
- passed links back to the Bridge's index, not the term reference's0 ms
- passed shows a term's label, comment, domain and range, the domain and range as links to their entries1 ms
- passed shows the shapes of any of the Bridge's shape files that use a term, with their messages0 ms
- passed shows a class no shape checks with no shape0 ms
- passed lists the terms of other vocabularies the Bridge declares apart from its own0 ms
- passed names no query and no rule, which the Bridge's vocabulary has none of0 ms
- passed links the source files at the commit it was read at3 ms
- passed links the term reference, which links it back7 ms
given shapes named with relative IRIs in two files 4 passed
- passed names each by its file and its own name, at an anchor of that name on the page of the class it checks1 ms
- passed keeps each shape's anchor on the index, on the row of the class it is at home on3 ms
- passed puts the one no class has a row for on the shapes' page, which the index links, and not on the index1 ms
- passed shows no address of the repository's tree for a shape, nor for `sh:prefixes <>`1 ms
given an unhomed shape named with an absolute IRI 1 passed
- passed keeps its full IRI under its heading4 ms
`bridgeTermsSection` 7 passed
- passed writes the page at `terms/bridge.html`, beside the term reference's0 ms
- passed writes the page of the shapes other shapes use at `terms/bridge-shapes/`, beside the term reference's own0 ms
- passed links it from the front page0 ms
- passed writes a page for each of its terms, and lists each in `search.json` as a term at its page0 ms
- passed lists a term's name and its label in `search.json`0 ms
- passed lists the page itself in `llms.txt`0 ms
- passed writes no page for a term the term reference describes, so that page is the one answer for it5 ms
given the Bridge's vocabulary itself 2 passed
The MCP page mcpPage(), mcpSection 10 passed
The MCP server has a page of its own: how to install and start it, what a hosted client sends to its provider, and one row for each tool it registers, read from the tool definitions in code, not copied.
Source mcp-page.test.ts
given the tools the server registers 5 passed
- passed has a row with an anchor for each one2 ms
- passed marks each tool that proposes a write as needing the person's yes, and no other0 ms
- passed shows each tool's inputs, with the pod's name where it takes one, and which are required0 ms
- passed has a row for no tool the server does not list1 ms
- passed shows each tool's description as the server sends it, the tools that propose a write too1 ms
given the package's README 2 passed
`mcpSection` 3 passed
Every query of the vocabulary has a page queryPages(), queriesSection 30 passed
Every query the vocabulary publishes has a page under `queries/`, and an index of them by kind: its purpose as its file states it, its text, the terms it reads, the rules and notes that name it, and for a question or a view its rows on Alex Rivera's pod.
Source query-pages.test.ts
given a small vocabulary and Alex Rivera's answers 11 passed
- passed writes the index and one page for each query, a name with spaces given a slug5 ms
- passed gives two names that slug alike each a page, told apart by a digest1 ms
- passed lists each query on the index under its kind, with the first sentence of its leading comment1 ms
- passed says a query with no comment by its filename as a phrase, and nothing more3 ms
- passed shows the query's text, with each term it reads linked to the term reference0 ms
- passed names the rules and decision notes whose text gives its path, one that wraps a line included0 ms
- passed shows a question's rows on Alex Rivera's pod as a table, a label in place of the IRI it labels0 ms
- passed shows a view's entries on Alex Rivera's pod, each linked to its page in that pod0 ms
- passed says a question with no row has none, in place of the table0 ms
- passed ends each page with its source on GitHub, at the commit read1 ms
- passed lists the section's one row, `queries/`, under what a reader models9 ms
given a question with more rows than a page shows 2 passed
given a view of more entries than a page shows 1 passed
given answer rows of which the first lacks a column a later row has 1 passed
given answer rows with a list column, kept as an array 1 passed
given a wide table of answer rows 2 passed
given a query with a leading comment 2 passed
given a query whose comment numbers its steps 1 passed
given matcher rules whose rule list says the class each applies to 2 passed
given no pod of Alex Rivera 1 passed
given the vocabulary beside this checkout 4 passed
- passed has exactly one page for each .rq under queries/, and no other page but the index45 ms
- passed shows every named question's and every view's page a rows table or the text for no rows5 ms
- passed finds a real question's rows by its path under queries/questions/, and shows them as a table719 ms
- passed links each index anchor the website links: questions, views, matcher, derivations, lenses and tables2 ms
given the hub's sections 2 passed
The specification's pages specPages() 26 passed
The specification is the vocabulary's features. `specPages()` writes a page for each feature and each kit: every rule with the decision note that ruled it, and every example with its latest conformance result.
Source spec-pages.test.ts
with a feature 2 passed
with a feature's list of its rules 3 passed
with a feature that opens on a scenario 2 passed
with a feature file, for a tool 2 passed
with a rule that names its decision note and Choice row 6 passed
- passed names the note and the Choice row that ruled it0 ms
- passed quotes the Why paragraph that names the Choice row, and no other0 ms
- passed quotes the paragraph of a Choice row whose name holds parentheses0 ms
- passed links the note's Why, and each link of the paragraph from where the note is0 ms
- passed shows a link whose scheme is not http as its text alone0 ms
- passed links the note's Why alone when no paragraph names the Choice row0 ms
with a rule that says no note rules it 2 passed
with a rule whose description holds paragraphs and a list 2 passed
with a Choice row that names the issue that will write its rule 2 passed
with a kit 4 passed
- passed shows the kit's name and its story0 ms
- passed links the input its story runs on and its expected views on GitHub0 ms
- passed shows each check's result, with why for one that failed0 ms
- passed shows each example's result0 ms
`index.html` 1 passed
- passed links every feature's page and every kit's0 ms
Decision notes as pages specSection 27 passed
The vocabulary records each design question as a decision note. The site writes each as a page, so that a rule links the Choice row that ruled it and the Choice row lists the rules that cite it.
Source decision-notes.test.ts
with a decision note 7 passed
- passed writes a page for each note, and an index of them4 ms
- passed links, from a rule, the note's page at the Choice row the rule names, and at its Why0 ms
- passed links, from a rule's quoted paragraph, another note as its page0 ms
- passed gives each heading of the note an id0 ms
- passed links the note's own file on GitHub0 ms
- passed sends the note's links to other notes to their pages, and to other files to GitHub0 ms
- passed shows raw HTML in a note as text0 ms
with a Choice row 5 passed
- passed lists the rules that cite it, in the feature's order1 ms
- passed says when no rule cites it2 ms
- passed gives two Choice rows of one name two anchors0 ms
- passed keeps an escaped pipe in its name0 ms
- passed links a rule that has no number by its page alone0 ms
with a rule that names a note the vocabulary lacks 1 passed
- passed links the note's path on GitHub2 ms
with `decisions/index.html` 4 passed
with a note of unusual layout 6 passed
- passed gives no anchor to a Choice row the rendered table lacks, and links its rule to the note alone0 ms
- passed keeps one anchor for a Choice row that a heading is also named for0 ms
- passed anchors a Choice row whose name is a code span with an escaped pipe0 ms
- passed takes an earlier table of the note for no Choice table0 ms
- passed keeps a link to a note that is gone on GitHub, and one to a note that exists as its page0 ms
- passed lists the note and its waiting Choice row on the specification's index, linking no note on GitHub0 ms
with a note over 30 000 characters 4 passed
- passed folds what others do and each table of over 12 rows but the Choice table, each under a summary that says what it holds0 ms
- passed counts the entries of what others do by its top-level items, and says no count when it has none3 ms
- passed keeps the headings and the Choice table, with its row anchors, open0 ms
- passed folds nothing in a note under it1 ms
Warnings about rules and decision notes specPages().warnings, numberOf(), rulesNamedIn(), filesNamed() 19 passed
A rule should name the decision note that ruled it, and a note's Choice row the rule it led to. `specPages()` returns a warning for each that does not, and the specification's index lists them, so a decision with no rule, or a rule with no reason, shows.
Source spec-pages.test.ts
`specPages()` 7 passed
- passed warns about a rule that names no note1 ms
- passed warns about a Choice row a rule names that no Why paragraph names0 ms
- passed warns about a Choice row that names a file the vocabulary lacks0 ms
- passed warns about a Choice row that names no rule, run of rules, file or issue0 ms
- passed returns no other warning2 ms
- passed takes no bare code that another list uses for a rule6 ms
- passed warns about a Choice row the rendered table lacks23 ms
`numberOf()` 1 passed
`rulesNamedIn()` 8 passed
- passed finds a rule named in parentheses, and each rule of a run such as `M1 to M3`0 ms
- passed finds the rule after the word "rule"3 ms
- passed finds a rule named by a possessive0 ms
- passed finds the rule beside a `.feature` pointer, and not a code further off0 ms
- passed finds a rule whose number ends in a lower-case letter, as `M4a`, beside the plain ones0 ms
- passed finds none in a lettered code after an item, or in a letter with no number before it0 ms
- passed finds none among bare codes0 ms
- passed finds none in a code after "item" or "conformance-review"0 ms
`filesNamed()` 3 passed
Conformance results on the specification readSpecReport(), specSection 17 passed
A conformance run writes each example's result in EARL. `readSpecReport()` reads them, each example's page shows its own, and the conformance page counts them for each feature, so a reader sees how much of the specification the runtime passes.
Source conformance.test.ts
`readSpecReport()` 5 passed
- passed shows a fail where one test has two results, whatever their order240 ms
- passed warns that the test has more than one result21 ms
- passed matches results that give the vocabulary's GitHub `tree/<commit>/` address without its final `/`12 ms
- passed matches results of another commit of the vocabulary by path, with a warning16 ms
- passed warns when the results name no vocabulary, and when none matches an example15 ms
`specSection` 8 passed
- passed writes the specification under `spec/`, and the conformance page, its JSON, the EARL file and the table under `conformance/`0 ms
- passed writes each feature file beside its page, and lists it in `index.json` and `llms.txt` with the other files for an agent30 ms
- passed copies the table it is given byte for byte0 ms
- passed links both from the front page0 ms
- passed counts for a feature its rules, its rules with no example, and its examples passed, failed and not run0 ms
- passed shows the same counts of rules on the specification's index0 ms
- passed links each feature's page, the EARL file, the table and each repository's tests page0 ms
- passed writes the same counts as `conformance/results.json`3 ms
with no conformance results 4 passed
- passed writes both pages still0 ms
- passed shows every example as not run0 ms
- passed leaves out the EARL file and the table, and links neither0 ms
- passed says `"ran": false` in `results.json`0 ms
The hub publishes each adapter's explorer as it is adaptersSection 15 passed
An adapter's explorer is generated over the adapter by cascade-bridge-spec's tooling, and the hub publishes it as it is: the adapter's folder holds the explorer's files, and the hub keeps no page of its own for the adapter.
Source adapters.test.ts
with an adapter whose explorer is made 1 passed
when the generator is run over an adapter 1 passed
with an explorer whose stylesheet names the site's tokens 6 passed
- passed names no token when each fallback is the value site.css gives it1 ms
- passed names each token whose fallback site.css gives another value0 ms
- passed names each token the explorer names that site.css no longer defines, but not the explorer's own0 ms
- passed names the page when no style of it names a token of the site0 ms
- passed fails the build when the explorer falls back to a value site.css does not give2 ms
- passed fails the build when the explorer has no style naming the site's tokens0 ms
with an adapter whose explorer cannot be made 3 passed
with the build told to leave the explorers out 1 passed
with an adapter that could not be read 1 passed
with an adapter the site cannot name a folder for 2 passed
The adapters page says what an adapter is on one screen adaptersIndex() 15 passed
A builder with one more source format to bring in asks whether that means one more engine. The adapters page answers on one screen, before any adapter's detail: the problem, one allergy followed through three source forms to one record, four reasons, and a card for each adapter.
Source adapters.test.ts
with the builder's problem 1 passed
with one fact in three forms 9 passed
- passed holds the aspirin allergy from a FHIR resource and two C-CDAs, joined to the one record it becomes0 ms
- passed reads each value from the vocabulary's files, never from the page's own text1 ms
- passed links each source file and the record's file on GitHub at the vocabulary's commit0 ms
- passed fails the build when one of its files is missing0 ms
- passed fails the build when a file has no code to read0 ms
- passed reads a C-CDA's values from the entry whose substance is the FHIR resource's, however many allergies come first1 ms
- passed fails the build when that entry has no reaction, though another allergy's has one0 ms
- passed labels each value with the adapter's own source path, a break allowed only after a slash0 ms
- passed builds from the vocabulary's real conformance files170 ms
with the reasons 1 passed
with a card for each adapter 2 passed
with figures 1 passed
- passed gives no exact count of paths, cases or passes0 ms
The pages of a pod Site.build(), Site.files() 25 passed
A pod's site shows what one pod holds, for a person learning the format: a home page, a page for each view, view entry and record, and every named question of the vocabulary with its query and its answer. It is built from the pod alone, so each page is what the runtime reads, not a drawing of it.
Source pod-site.test.ts
given a pod in which the matcher found two records to be one thing 4 passed
- passed shows every named question of the vocabulary with its query's text less the comment its section prints as prose, or in one line when it has no rows27 ms
- passed shows a section whose question returns no row as one line, its title, none and a link to the question's page, with neither its prose nor its query5 ms
- passed keeps a section that has rows whole, with its prose and its query3 ms
- passed leaves a query's leading comment out of the query shown under its prose23 ms
with `layout.html` 3 passed
with a view's page 2 passed
with a view entry's page 1 passed
with the page of anything the pod holds 1 passed
with `pipeline.html` 9 passed
- passed shows each query of the lens in the order it ran0 ms
- passed folds the steps under one closed phase for each section of the vocabulary's crate that holds a step, in the order they ran, each saying how many steps it holds4 ms
- passed is not built when a step it shows sits in no section of the crate704 ms
- passed folds the files it writes under one closed line that counts them0 ms
- passed leaves what everything is called to a page of its own, linked here with its count0 ms
- passed carries the script that opens a fold for the address the reader came by0 ms
- passed shows each other lens beside it0 ms
- passed links a class, wherever a page shows it, to the query that first wrote it0 ms
- passed links no page from an answer under another lens0 ms
with `not-shown.html` 2 passed
- passed lists each record no view shows, with why0 ms
- passed links each such record to its page0 ms
with a lens other than the default 2 passed
with the default lens 1 passed
- passed names no lens in a command0 ms
Where a pod's pages link Site.files(), Site.page(), viewRules() 13 passed
From an answer a reader can reach the query that gave it, each rule that governs it and each vocabulary term it names; this holds every link of a pod's site to an address that exists.
Source pod-site.test.ts
`Site.files()` 7 passed
- passed resolves every local link to a file it wrote, and every anchor to an id on that page2 ms
- passed links out of its own folder only to the term reference, the specification and the question pages1 ms
- passed links no address on `ns.cascadeprotocol.org` and no code's own IRI5 ms
- passed names a vocabulary term in every link to the term reference5 ms
- passed links each query's file on GitHub at the commit built1 ms
- passed links, from a named question, a vocabulary term its query names0 ms
- passed links, from a view's page, a rule that names the view3 ms
`Site.page()` 3 passed
with things that share a name 1 passed
`viewRules()` 2 passed
The pod explorer's data explorerData(), Site.files() 32 passed
A pod's explorer is one fixed app over one data object, so every part of the object is computed from what the site already holds for the pod, never from its pages: its files and what wrote each, its log, its kit, its views and the queries that define them. The object leaves out the bodies of files, the text of queries and the rows of answers, which the app fetches when a node opens.
Source explorer.test.ts
given a pod built from a kit 14 passed
- passed lists a `.DS_Store` beside the pod's files as a file that is no RDF, and lists every other file827 ms
- passed is written beside the page, and each query of the vocabulary under queries/, never as pod.json13 ms
- passed makes every file of the pod a node with a writer, and the files the build rewrites the build's1 ms
- passed walks the snapshot chain from the manifest, with a person's judgment placed by its own time0 ms
- passed copies the manifest into the site naming the snapshot the pod's own manifest names, with prov:used1 ms
- passed gives a person's judgment its verdict, its members and whether it counts0 ms
- passed puts the kit's steps on the rows they fall on and its cases after the step they read0 ms
- passed gives each example pod's kit its introduction, the first paragraph of its feature file as written, and a pod of no kit none1 ms
- passed gives each kit step the sentence its Background states, without the label that names it0 ms
- passed gives each kit case the steps of its example, with the tables they carry0 ms
- passed lists a record's arrivals in time order, each revision with the version it sets0 ms
- passed describes each term it uses with the label and comment the vocabulary gives it0 ms
- passed gives each file the terms its statements use, as indices into one list, and the prefixes that shorten them0 ms
- passed is listed in index.json beside the page, with the queries3 ms
given a pod built from the kit with every kind of handle 8 passed
- passed resolves every handle of the kit's records to the one record file the runtime names from its inputs1 ms
- passed keeps the members of an entry that are no file of the pod, and the judgments that name them0 ms
- passed labels a stored document's bytes with the label of the document that names them0 ms
- passed gives a materialized view the files its statements name, so that its card agrees with its Turtle2 ms
- passed has each stored document name the bytes whose hash is its subject0 ms
- passed names the manifest's thing as the manifest, so the pod has its creation time, and types the manifest and the card0 ms
- passed tells whether each kit step was performed, apart from whether its row wrote files0 ms
- passed tells whether a performed step wrote nothing or was refused, as the kit's own examples do11.01 s
given a pod built from no kit 1 passed
given a pod in which the matcher found records to be one thing 5 passed
- passed pairs each view's definition with the file it writes, and says where nothing is written0 ms
- passed gives an entry its members, its lead, the fields its members disagree on and the judgments within it0 ms
- passed finds the query a matcher judgment's rule runs, by the rule list's path or else by hash, and reports one that does not hash true2.11 s
- passed reports a rule list's queryPath that leaves matcher/ as the rule's problem, resolving it as the matcher does891 ms
- passed gives each lens's count of the judgments that count, and the order the build runs its derivations1 ms
given the check in scripts/explorer-check.mjs over a built pod 4 passed
- passed passes a pod as built158 ms
- passed fails a file in the pod that the object does not list179 ms
- passed fails a file the object lists that the pod does not hold213 ms
- passed fails a record given the build as its writer, which only the files the build rewrites have160 ms
The pod explorer's page explorerPage(), Site.files() 5 passed
A pod's index page is the explorer: a page that holds no data of the pod, the one app every pod shares, and its stylesheet. The page that said how the pod is laid out is still there, as `layout.html`.
Source explorer.test.ts
- passed loads the app and its stylesheet and names the data object it reads0 ms
- passed holds no statement of the pod, so that one app serves every pod0 ms
- passed keeps the pod's layout page under its own name, linked from the explorer's header0 ms
- passed shows an answer's every column, though the first row lacks some a later row has1 ms
- passed writes an app that parses, with no template placeholder left in it5 ms
Text, times and codes as a page shows them markup, shown(), code(), codePage() 9 passed
Whatever a pod holds reaches a page through these: a pod is written by other software, so its text is never trusted as HTML, a time is shown in one zone, and a code is shown as a person would say it.
Source pod-site.test.ts, shown.test.ts
`Site.codeSystems` 1 passed
- passed holds the code systems the vocabulary's tables register0 ms
`markup` 1 passed
`shown()` 3 passed
- passed shows an `xsd:dateTime` in UTC to the minute, whatever its offset1 ms
- passed reads an `xsd:dateTime` with no offset as UTC0 ms
- passed shows an `xsd:date` and a plain literal as written0 ms
`code()` 2 passed
`codePage()` 2 passed
Files for an agent agentFiles(), llms.txt, index.json, AGENTS.md 42 passed
Three files at the site's root let an agent find its way without reading HTML: `llms.txt` lists the site's links in groups, `index.json` lists every file with its title, kind and source, and `AGENTS.md` is the guide. `agentFiles()` is a finisher: it writes them from what the sections wrote. A group is a `##` part of `llms.txt`.
Source agent-files.test.ts
given the site's own sections 8 passed
- passed writes `llms.txt`, `index.json` and `AGENTS.md` at the root1 ms
- passed copies the guide as `AGENTS.md`, byte for byte25 ms
- passed links the three, and the API page, from the front page1 ms
- passed links from `llms.txt` only files the site holds0 ms
- passed lists in `index.json` every file of the site but a stylesheet0 ms
- passed runs as a finisher of the site's build, with the API page among its sections0 ms
- passed names for every section what its files are built from0 ms
- passed marks the evals section as one an agent may skip0 ms
`llms.txt` 11 passed
- passed opens with a title, then a quoted summary, then groups of links0 ms
- passed writes each link as `- [text](address)`, then a colon and a line about it where it has one0 ms
- passed takes a section's links as the section lists them, a folder and its index page once0 ms
- passed lists a link meant for agents and leaves out one meant for people0 ms
- passed keeps a link to another site0 ms
- passed leaves itself out0 ms
- passed lists a section none of whose links is its entry page by its title and what it is0 ms
- passed lists no other page of a section0 ms
- passed leaves out a section that says nothing of itself0 ms
- passed escapes brackets in a link's text, and spaces and parentheses in an address0 ms
- passed lists nothing more than those links and the repositories0 ms
with a link for the contribute row 2 passed
with the guide and the conformance results among the site's files 3 passed
- passed points an agent at `AGENTS.md`0 ms
- passed points an agent at `conformance/results.json`, naming its `at` and `ranWith`0 ms
- passed calls the results by feature, which is how they are0 ms
with neither among the site's files 1 passed
- passed points an agent at `index.json` and at neither0 ms
with a section marked optional 2 passed
- passed lists it last, under `## Optional`0 ms
- passed writes no heading for a group it leaves empty0 ms
`index.json` 8 passed
- passed gives a page its title, decoded, its kind and its section's source0 ms
- passed names any other file data, a document or a file, by its extension0 ms
- passed takes a Markdown document's title from its first heading, and another file's from its name0 ms
- passed lists an adapter's explorer as one page and its data, and leaves out its test cases and the fragments of its places, which only the page reads0 ms
- passed leaves out every stylesheet0 ms
- passed gives a section's title as its source where the section names none0 ms
- passed lists the front page, `llms.txt` and itself0 ms
- passed lists the files in the order of their paths0 ms
with a section that lists its files in another order 1 passed
- passed writes the same `llms.txt` and `index.json`, byte for byte1 ms
with a base address 3 passed
with no base address 2 passed
- passed keeps the links of `llms.txt` relative, and says they are0 ms
- passed writes no `base` in `index.json`0 ms
with a base address that does not end in a slash 1 passed
- passed refuses it1 ms
Searching the hub search.json, search.js, the search box of shell() 32 passed
A reader who knows a name of the hub types it in the box on any hub page and goes to its page or anchor in one click. The rows the box searches are `search.json`, written by `agentFiles()` beside `index.json` from the tree the sections wrote; the ranking is the script `search.js`, which a page loads, and the box is the form `shell()` writes under the header.
Source search.test.ts
given a tree with a term page, a rule page, a decision note and a guide 15 passed
- passed lists in `search.json` every page that `index.json` lists4 ms
- passed lists each term's page, of any namespace, as a term by name and by label, and the index and a node that is no term as none4 ms
- passed finds a term of another namespace by its local name and by its prefixed name, and a prefix only the same namespace's terms have1 ms
- passed lands a bare name that terms of two namespaces hold on the cascade term, and the other by its prefixed name0 ms
- passed lists each rule of a rules page as an anchor of it, titled by its heading0 ms
- passed lists a decision note by its title, without the site's name after it0 ms
- passed lists no stylesheet and no data file as a row, and no row twice0 ms
- passed writes the script beside `search.json`, and `index.json` lists both3 ms
- passed lands a term's name on its anchor first, whatever the case or a `cascade:` before it0 ms
- passed lands a rule's number on the rule, and a decision's title words on the note1 ms
- passed ranks a name before a name that begins with it, and that before a title that holds it0 ms
- passed finds a term by a word of its label, every word of the query having to be found0 ms
- passed answers nothing to an empty query, a blank one and a name nothing holds0 ms
- passed puts the name typed in its own case before the same name in another case0 ms
- passed reads a query as text, so a pattern's characters match themselves0 ms
given a tree with no term page and no rules page 1 passed
- passed lists the pages alone1 ms
given pages that hold a word in their file's name, a redirect and eval pages 5 passed
- passed puts a page whose file is named by the query before the terms and rules that hold it in their titles0 ms
- passed matches a rule by its heading, never by its page's file name, so a file's name lists no rule of it0 ms
- passed finds nothing for a word that only the files' extension holds, such as html0 ms
- passed titles every page without the site's name after it, and tells an evals page by its kind2 ms
- passed lists no page that only redirects0 ms
given an API page that anchors the calls it names 2 passed
with the build-pages command, over the hub's own sections 7 passed
- passed answers the words a reader tries as the notes and terms they mean7 ms
- passed tells every eval page by its kind, titles no page with the site's name and lists no redirect1 ms
- passed puts the box on every page of the hub, but the evals' own frame, an adapter's explorer with the places it reads, and a page that only redirects126 ms
- passed lands the name of a term of the vocabulary on its page, first31 ms
- passed lands the name of a call of the API page on that page, first1 ms
- passed lands every row on a file of the tree, and on an id of it when the row is an anchor9 ms
- passed stays under 300 KB0 ms
Linking a vocabulary term, a rule or a decision note termHref(), ruleHref(), noteHref(), noteLinkOf() 20 passed
Every page of the site links what it names through these four, so a vocabulary term, a rule and a decision note each have one address. None of them links `ns.cascadeprotocol.org`, the host of the vocabulary's names, which serves no page.
Source links.test.ts
`termHref()` 6 passed
- passed keeps the namespace's prefix in the folder of a term's page, as in `terms/foaf/name.html`2 ms
- passed gives two vocabulary terms of one name two pages, one for each namespace1 ms
- passed writes a vocabulary term of a namespace it does not know as a slug of its IRI under `other/`1 ms
- passed puts a property's page in `properties/` of its prefix's folder, so `cascade:Subject` and `cascade:subject` are two files on a disk that ignores case0 ms
- passed takes the folder of the term pages as its base0 ms
- passed refuses `ns.cascadeprotocol.org` as a base, on either scheme, however it is capitalised1 ms
`ruleHref()` 4 passed
`noteHref()` 5 passed
- passed links a note's file on GitHub when the base is GitHub's address, with or without slashes3 ms
- passed links a note's page when the base is the folder that holds `decisions/`0 ms
- passed links `decisions/README.md` as the folder's index page0 ms
- passed refuses a path that is no decision note, when asked for a page0 ms
- passed refuses `ns.cascadeprotocol.org` as a base0 ms
`noteLinkOf()` 5 passed
- passed sends a link to another note to that note's page, keeping its anchor0 ms
- passed keeps a link to another note on GitHub when the notes have no pages0 ms
- passed sends a link to another file of the vocabulary to GitHub, and one to a folder to its listing there0 ms
- passed leaves an `https:` link as written0 ms
- passed gives no address for a `javascript:` or `data:` link, however it is spaced0 ms
An address for each page of a pod's site addressesOf(), sharedPageOf() 10 passed
A pod's site gives every record, view and view entry its own page. `addressesOf()` names each page from what the thing is called, so an address can be read and does not change when the pod is built again in another order.
Source addresses.test.ts
`addressesOf()` 8 passed
- passed names a page by its kind's folder and its name as a slug of plain letters and digits8 ms
- passed adds the start of the IRI's digest to each thing that shares a slug with another in its folder1 ms
- passed leaves a name alone that only a thing of another folder shares0 ms
- passed falls back to the kind's own word for a name with no letter or digit0 ms
- passed adds the kind's word to a name Windows gives no file, such as `con` or `com1`0 ms
- passed cuts a slug at 120 characters, at a hyphen where there is one0 ms
- passed keeps a slug whole where the cut would leave two things one address0 ms
- passed gives each thing the same address whatever order the things come in10 ms
`sharedPageOf()` 2 passed
Rendering Markdown as a page renderMarkdown() 9 passed
The decision notes, the guide and the format notes are Markdown written elsewhere; this is the one place the site turns Markdown into HTML. Only what the Markdown itself makes is a tag: raw HTML and script links are shown as text.
Source markdown.test.ts
`renderMarkdown()` 4 passed
- passed renders a heading, a code span, a link, a table and a fenced block with its language46 ms
- passed shows raw HTML as text2 ms
- passed shows a `javascript:` or `data:` link as its text alone3 ms
- passed keeps a relative link and an `http:` link7 ms
with `ids` 4 passed
- passed gives each heading GitHub's slug of its text as its id4 ms
- passed numbers a slug taken twice, skipping an id a heading already has4 ms
- passed names a heading with no letter or digit `section`0 ms
- passed changes nothing else in the page7 ms
with no `ids` 1 passed
- passed gives no heading an id0 ms
Checking a site's links scripts/link-check.mjs 37 passed
`node scripts/link-check.mjs` follows every link of a built or published site: to a file, an anchor, another site, or a file of a repository on GitHub. It exits 1 naming each dead link and the page that holds it, so that a change cannot publish one. Each level runs the script once, over its own site, and its tests read what it said.
Source link-check.test.ts
with a built site whose every link resolves 5 passed
- passed exits 01 ms
- passed asks with GET an address that refuses HEAD0 ms
- passed asks again an address whose host fails at first0 ms
- passed warns about a host that stays down, and does not fail0 ms
- passed never asks a host it is told to skip by name0 ms
with dead links 4 passed
- passed exits 11 ms
- passed names each dead file, anchor, image and outside address1 ms
- passed names the page that holds each0 ms
- passed leaves a link that resolves unnamed1 ms
with a GitHub link into a repository given as `--checkout` 3 passed
with an anchor 2 passed
- passed accepts an `id` and the `name` of an `<a>`1 ms
- passed names a link to the `name` of a `<meta>` tag as dead0 ms
with a page that links no way back to the front page 3 passed
with an adapter's explorer, which the hub publishes as the generator wrote it 2 passed
with the fragments of an adapter's explorer, which a reader's script reads and a reader without it opens alone 2 passed
with the `.txt` and `.md` files a site serves 2 passed
with `--readmes` 7 passed
- passed accepts a README whose Docs block opens with the front page and whose links resolve1 ms
- passed names a README with no Docs block0 ms
- passed names a README whose Docs block is not its first `##` section0 ms
- passed names a README whose first Docs link is not the front page0 ms
- passed names each dead link of a Docs block, those under its sub-headings too0 ms
- passed names a repository with no README0 ms
- passed warns about a README its host fails to serve, and does not fail for it0 ms
with `--no-external --save-external`, then `--only-external` 3 passed
with `--crawl`, over a published site 4 passed
A page of test results for each repository testsSection 20 passed
The site shows the newest run on `main` of each repository whose tests it lists, a page for each at `conformance/tests/<repository>/`. A suite whose report is missing or cannot be read still gets its page, which says so.
Source tests-page.test.ts
testsSection.build(ctx) 3 passed
- passed writes each suite's page at `conformance/tests/<repository's name>/index.html`4 ms
- passed writes no index above the pages0 ms
- passed lists each suite's page on the front page0 ms
with a run's report 4 passed
- passed names the run's commit, linked to it on GitHub1 ms
- passed says when the run was made0 ms
- passed links the run0 ms
- passed counts the cases that passed, failed and were skipped0 ms
with skipped cases 2 passed
when the build was given no report for a suite 1 passed
- passed says the results are not available5 ms
with a report that is not XML 1 passed
with a report cut short 1 passed
- passed says the report is cut short5 ms
with a suite whose report is CTRF 7 passed
- passed shows no time for a report whose cases were not timed and that gives no run time8 ms
- passed shows the run time between its start and stop, not the cases' unmeasured zeros8 ms
- passed shows each case's time and, with no start and stop, their sum as the run time7 ms
- passed shows the producer's run time in the bar, not the sum of its cases, when it gives start and stop2 ms
- passed shows the same bar and keeps the producer's case durations when its republished CTRF is read back11 ms
- passed shows no time on a case of a report marked unmeasured2 ms
- passed shows its cases under the levels the report names2 ms
with a report that holds no cases 1 passed
- passed says no cases ran1 ms
Listing the repositories whose tests are shown suitesOf(), test-suites.json 9 passed
`packages/site/test-suites.json` lists each repository whose tests get a page: where the site's build finds its newest report, which runner wrote it, and in what order its packages are shown. `suitesOf()` reads the list and refuses an entry the build could not use.
Source tests-page.test.ts
suitesOf(list) 9 passed
- passed keeps the test folder a suite names4 ms
- passed keeps the order of the packages a suite lists0 ms
- passed throws, naming the field, for a suite that lacks one0 ms
- passed reads a suite whose runner is `ctrf`0 ms
- passed throws for a runner it cannot read0 ms
- passed throws for a test folder that is not text ending in "/"0 ms
- passed throws for a repository that is not `owner/name`0 ms
- passed throws for `packages` that is not a list of names0 ms
- passed throws for a list that is not a list0 ms
Packages, capabilities and situations as a tree testsSection, spec.json 48 passed
A page reads top to bottom as a specification: each package, its capabilities in the order its `test/spec.json` gives, the situations under each, and the cases. Build checks come last, closed, since they are not part of the specification.
Source tests-tree.test.ts
with cases in several packages 3 passed
with several packages: the table that opens the page 9 passed
- passed has one row for each package, the one holding a failure first0 ms
- passed turns the row of a package holding a failure red and says how many failed3 ms
- passed says what each package is for, and its case count0 ms
- passed links each capability, in the order the package's spec gives, to its id on the page0 ms
- passed links each package to its section, which starts open only where a case failed0 ms
- passed does not list the build capabilities among a package's0 ms
- passed heads the table with what each package promises, and how many packages and capabilities there are0 ms
- passed labels each cell, so that the table stacked on a narrow screen says what a number is3 ms
- passed turns red the link of the capability that failed, and no other0 ms
with a package of more capabilities than a row shows 3 passed
with one package 1 passed
with a package's `spec.json` 6 passed
- passed shows the package's `about` line0 ms
- passed groups a capability's cases from several files under one heading0 ms
- passed orders the capabilities as `capabilities` lists them0 ms
- passed puts a capability the list lacks after the listed ones, by name0 ms
- passed puts the capabilities `build` names last, in a section that starts closed0 ms
- passed opens the build section when a case in it failed2 ms
with a package's version 4 passed
- passed names the package, its version and the commit1 ms
- passed says "unreleased" for 0.0.01 ms
- passed says "unreleased" for a prerelease2 ms
- passed says no more than the version for a release2 ms
with a capability 6 passed
- passed shows its description, paragraph by paragraph0 ms
- passed links each file it comes from, at the line it starts on there0 ms
- passed shows the API names after its dot as code2 ms
- passed names the capability once, not on each case0 ms
- passed counts the passed and failed cases under each level0 ms
- passed shows a situation's description0 ms
with a case 6 passed
- passed shows a failed case before a passed one2 ms
- passed links the case to its line at the commit run1 ms
- passed shows the case's own description2 ms
- passed shows its result as an icon and a word3 ms
- passed opens a situation only when a case in it failed2 ms
- passed orders passed cases as their file writes them1 ms
with more than 30 cases directly under one level 7 passed
- passed folds the cases of each test run with parameters under a level of that test's name4 ms
- passed leaves 30 cases as they are2 ms
- passed opens, and shows first, the folded level that holds a failed case4 ms
- passed marks a folded level that failed nothing, so that `failures only` hides it2 ms
- passed leaves a test that ran once outside every folded level3 ms
- passed folds the cases of different tests by their file when none is run with parameters2 ms
- passed leaves the cases of different tests of one file as they are4 ms
with a suite that names its test folder 1 passed
- passed shows its files without the folder2 ms
with a repository other than the runtime's 1 passed
with a test file outside `packages/<name>/test/` 1 passed
Linking a capability to the rules it bears on @rule 3 passed
A `@rule` tag in a describe's doc comment names a rule of the vocabulary that the API's behaviour bears on. The page shows it as a link to the rule, so a reader can go from what the package does to the requirement behind it.
Source tests-tree.test.ts
with a `@rule` tag that names a feature and a rule 1 passed
- passed links the rule on the feature's page1 ms
with a `@rule` tag that names a kit's feature and one of its checks 1 passed
- passed links the kit check on the kit's page1 ms
with a description that carries tags 1 passed
- passed leaves the tags out of the description3 ms
A package's glossary on its page glossaryOf(), Links 17 passed
A package's `spec.json` defines the words its tests use in one sense. The page lists them once under the package and links the first use of each in every capability, so a reader meets no word the page has not defined.
Source tests-glossary.test.ts
with a `glossary` in the package's `spec.json` 7 passed
- passed lists the glossary under the `about` line, closed1 ms
- passed anchors each definition by its package and its term0 ms
- passed shows a term's aliases beside it1 ms
- passed links a term to the term reference when it names a term of the vocabulary0 ms
- passed links any other address as it is given0 ms
- passed follows each term with its definition, one for one1 ms
- passed holds a filter and a "none match" line, hidden until script runs0 ms
with a term used in a capability 6 passed
- passed links only the first use in a capability to its definition1 ms
- passed links an alias as it is written4 ms
- passed leaves a term inside a code span or a longer word alone0 ms
- passed links the first use again in the next capability0 ms
- passed links a use in a level's name and in a leaf's name, the leaf keeping its link to the source4 ms
- passed puts no link inside a link0 ms
Links.pieces(text) 2 passed
with a term of the vocabulary that is a property 1 passed
with no `glossary` 1 passed
- passed shows none5 ms
The summary bar and its controls testsSection 22 passed
The bar stays at the top of a page while it scrolls: which run this is, how it went and how long it took. Its three buttons need script, so they are hidden until script runs and the page reads whole without them.
Source tests-tree.test.ts
with a run's cases 6 passed
- passed counts the passed, failed and skipped cases1 ms
- passed names the run's commit0 ms
- passed shows a failed count only when a case failed3 ms
- passed shows the run time the report declares2 ms
- passed adds up the cases' times for a report that declares none0 ms
- passed marks each case with its result and each capability with its count of failed cases2 ms
with a run's verdict 5 passed
- passed says in one line that all cases pass, with the commit, when it was run and how long it took2 ms
- passed links the run in that line, and says nothing of the run again below it2 ms
- passed says in red how many of the cases fail2 ms
- passed counts a single case in the singular1 ms
- passed gives the counts once: the verdict, and no sentence repeating them1 ms
with the packages a report names 2 passed
when the page's script has not run 2 passed
with a run that holds no failure 1 passed
- passed opens no capability, situation or glossary4 ms
with one failing case 1 passed
with capabilities 2 passed
with the page's script 3 passed
- passed opens every closed part around a link's target on load0 ms
- passed opens them again when the hash changes0 ms
- passed does nothing for a hash that names nothing0 ms
Reading a report from each test runner readJunit() 17 passed
Each runner writes JUnit XML its own way. `readJunit()` reads node:test's, pytest's, vitest's and nextest's into the same cases, so a repository's page reads as capability, situation and case whatever ran its tests.
Source junit.test.ts
with a node:test report 5 passed
- passed reads a describe as a level and a describe inside it as the level under5 ms
- passed reads a case with no describe under its file's name0 ms
- passed reads each case's result and time0 ms
- passed keeps what a failed case said, its markup shown as text0 ms
- passed keeps why a case was skipped, as a line and not a failure block1 ms
with a pytest report 4 passed
- passed reads each case under its module's file0 ms
- passed keeps why a case was skipped3 ms
- passed links the module's file at the commit run0 ms
- passed keeps the assertion's explanation0 ms
with a pytest report that carries the hook's properties 3 passed
readJunit(xml) 2 passed
with a vitest report 1 passed
with a nextest report 2 passed
Reading a report already in CTRF readCtrf() 12 passed
Some suites are not run by a test runner: an adapter's fixture cases are run by engines and judged by cascade-bridge-spec's start action, which writes CTRF itself. `readCtrf` reads such a report into the same cases a runner's report gives, so its page is the same tree.
Source read-ctrf.test.ts
`readCtrf(json)` 12 passed
- passed reads each test's `suite` as its levels, from the capability down5 ms
- passed reads a level's description from `extra.levels`0 ms
- passed reads a test's `extra.description` as its description0 ms
- passed reads `passed`, `failed` and `skipped` as they stand, and `other` and `pending` as skipped0 ms
- passed keeps what a failed test said0 ms
- passed reads `filePath` and `line` as the case's file and line3 ms
- passed reads the marker that no case was timed, and the run's start and stop0 ms
- passed reads no marker and no times from a report that holds none1 ms
- passed reads a timed test's `duration` in milliseconds as the case's seconds0 ms
- passed reads no time from a report marked unmeasured, whose `duration` of 0 is no time0 ms
- passed reads no time from a test with no `duration` or one that is not a number1 ms
- passed throws, naming what is missing, for a text that is not a CTRF report3 ms
Reading a suite's kept run from the tests folder readTestRun() 5 passed
The deploy keeps each suite's newest run in a folder of the tests folder, whatever runner wrote it: its report, its `run.json` and perhaps its `spec.json`. A page reads the folder through `readTestRun`.
Source test-runs.test.ts
- passed reads a CTRF report kept as `report`, with its run and spec5 ms
- passed reads a JUnit report kept as `report` the same way1 ms
- passed finds no run in a folder that holds the report under the old name `junit.xml`1 ms
- passed finds no run in a folder without `run.json`1 ms
- passed finds no run when `run.json` names no commit, time and url1 ms
Writing doc comments into a report scripts/junit-reporter.mjs 7 passed
`scripts/junit-reporter.mjs` is the node:test reporter the runtime's tests run with. It adds to JUnit what the page needs and node leaves out: each describe's and test's doc comment, its `@rule` tags, and the line it is declared on.
Source junit-reporter.test.ts
with a test file's doc comments 7 passed
- passed writes a describe's doc comment as its description, its lines joined4 ms
- passed writes each `@rule` tag as a rule of its describe1 ms
- passed writes the line of the TypeScript source a describe is declared on0 ms
- passed writes a test's doc comment as the case's description, markup kept as text0 ms
- passed names the file from the folder the tests ran in0 ms
- passed writes no description for a `//` comment, or for none0 ms
- passed leaves no marker in the report0 ms
Failures node:test leaves out of its report declaredFailures() 3 passed
node:test's JUnit drops a failure that belongs to no case: a hook that throws, or a test that fails after its subtests. The report's count still includes it, so the page compares the two and says when they differ.
Source junit.test.ts
with a report that counts more failures than it lists 2 passed
- passed says how many failures node counts and how many the report lists0 ms
- passed links the run's log1 ms
with a report whose count is its failed cases and the tests that hold them 1 passed
- passed says nothing6 ms
Test results for an agent <repository>.ctrf.json 11 passed
Beside each page the site writes the same results as CTRF, a JSON format for test reports, for an agent that would rather read data than a page. It holds what the page shows: levels, descriptions, rule links and the glossary.
Source ctrf.test.ts
with a run's report 5 passed
- passed writes the file beside the suite's page17 ms
- passed links the file once on the page16 ms
- passed holds every case with the names of the levels above it, its status and its duration10 ms
- passed counts as the page does8 ms
- passed counts a failure node reports outside the cases as failed13 ms
with a suite whose report is CTRF 4 passed
- passed names the tool the report names, not the suite's runner2 ms
- passed carries the marker that no case was timed, and the run's real start and stop6 ms
- passed writes the run's time as both start and stop, and no duration, when an unmeasured report gives none6 ms
- passed keeps what the report says of a case beyond its levels and description5 ms
with doc comments and rules 1 passed
with a glossary 1 passed
Checking that tests read as a specification checkShape() 31 passed
`checkShape()` reads a package's cases from a JUnit report and the `spec.json` beside its tests, and reports each case whose titles break the grammar of a tests page. It is the gate that keeps a page a specification as tests are added.
Source spec-shape.test.ts
with cases that read as a specification 1 passed
with a case outside every listed capability 2 passed
- passed names the case and the capability it sits under1 ms
- passed reports a case with no describe at all0 ms
with a case nested four levels deep 1 passed
- passed names the case0 ms
with a second level that is neither code nor a situation 4 passed
with a leaf that does not begin with a singular present-tense verb 8 passed
- passed reports one that begins with should8 ms
- passed reports a plural verb1 ms
- passed reports a past tense and a gerund0 ms
- passed reports the false friends of the -s rule0 ms
- passed reports a plural noun that leads a passive or a possessive leaf0 ms
- passed reports a word ending in -ous, and the false friends alias, canvas, lens, focus and versus0 ms
- passed reports a leaf that begins with a capital, a digit or a quote0 ms
- passed still reports a noun, a gerund or a past tense after an adverb0 ms
with a leaf the -s rule would misread 3 passed
with a file listed under build 3 passed
- passed does not require a capability0 ms
- passed still reads the second level's grammar, with no capability to name a bare word0 ms
- passed still reads the leaf's grammar0 ms
with a capability listed under build 1 passed
with a file the spec does not list as shaped 2 passed
- passed leaves its cases alone0 ms
- passed leaves the cases of another package alone0 ms
with a shaped file that has no case in the report 1 passed
- passed names the file0 ms
with no shaped list 1 passed
- passed checks every case of the package0 ms
with a glossary term defined twice 1 passed
- passed names the term, whatever its case0 ms
with a spec whose package has no case in the report 1 passed
with a spec that lists no capabilities 2 passed
- passed checks nothing and says why7 ms
- passed checks nothing when the spec is not an object0 ms
Checking a package's tests from the command line scripts/spec-shape.mjs 8 passed
`node scripts/spec-shape.mjs <junit>... <spec.json>` runs the check in CI on each package's `spec.json`. Its exit status says which of three things happened: the tests read as a specification (or the check was skipped), a title breaks a rule, or it could not check.
Source spec-shape.test.ts
with cases that read as a specification 1 passed
- passed exits 0, saying how many it checked268 ms
with a case that breaks a rule 1 passed
- passed exits 1, naming each case181 ms
with the suite run in two parts, a report of each 2 passed
- passed exits 0, checking the cases of both as one run180 ms
- passed exits 1 when a shaped file has a case in neither203 ms
with a spec outside every folder the report names 1 passed
with a spec that lists no capabilities 1 passed
- passed exits 0, saying it checked nothing132 ms
with a missing argument 1 passed
- passed exits 2370 ms
Choosing the files a suite runs scripts/test-files.mjs 2 passed
`scripts/test-files.mjs` names the compiled test files `scripts/test.mjs` runs. CI runs the files each package's `test/spec.json` lists as `randomOrder` in a random order and the rest as written, so the suite is run once, whole.
Source test-files.test.ts
with the suite in two parts, listed and unlisted 2 passed
Build and packaging 4 passed
The evals pages as a section of the site evalsSection 2 passed
The evals package writes its own pages; the site imports its compiled module by path and places them. This checks the wiring: a build that moved them would break the front page's link.
Source sections.test.ts
`evalsSection.build()` 2 passed
- passed writes `evals/index.html` as its entry page1 ms
- passed writes every file under `evals/`0 ms
The suite list as checked in test-suites.json 2 passed
The list as it is in the repository, which the site's build reads to find each repository's newest report: a refusal here would stop the site from building.
Source tests-page.test.ts
suitesOf(list) 2 passed