legislation

Legal screening receipts

Run node --test protections/test.mjs from the repository root. Replay the invented healthy record with node protections/screen.mjs protections/fixtures/healthy.json protections/fixtures. Each adverse mutation and its expected finding is recorded in fixtures/diseases.json.

A screening receipt tests consistency between an explicit question, a reviewer’s evidence declarations and archived bytes. It accepts either a supported documentary screening result or a reasoned unresolved outcome. A pass cannot establish an entitlement or the legal correctness of the review. The host allowlist for this first receipt covers www.legislation.gov.uk only. The synthetic URL in the tests never receives a request.

The input supplies a specific provision, date, territory, actor and land interest. Effective-date intervals include their start and exclude their end. A null end is open and a missing start is unknown. Commencement, amendments, exceptions, unresolved conflicts, authority and scope each have independent checks. The source’s recorded HTTP outcome describes a previous retrieval. The CLI checks the archive’s bytes against SHA-256. Give the CLI a previous receipt as a third argument to compare versions under the same source URL, provision and version start. Keep previous receipts outside the mutable review and use commit-pinned references when replaying. The tool does not verify the truth of a reviewer’s declarations or discover superseding regulations.

CVAA’s data-only antibody applies the same declaration checks to .cvaa/contracts/legal-evidence.json when present. The local CLI adds physical byte verification. Run the CLI on each new substantive receipt. Keep catalogue references with missing evidence at the unresolved stage.

CVAA regression study