LDC-E1363 — Snapshot in a test file
For LLMs5 sections
What it means
Section titled “What it means”Snapshots feed cases: a case composes external input through named
snapshot files. A test scene works the other way — it carries its own
input in the given block, and no snapshot is ever presented to it.
A snapshot declaration in a test file, or a use inside a test’s
given block, therefore points at machinery the test never runs. The
compiler stops at the declaration rather than keeping input that can
never arrive.
The repair is to move the snapshot to the case file it belongs to, or to inline the input into the test’s given block. Tests own their input; cases borrow theirs.
Example
Section titled “Example”{"argv": ["lower-test", "$ROOT/test.lawtest"], "files": {"test.lawtest": "language \"law.core\" version \"0.2\";\npackage demo.diagnostics version \"0.1.0\";\nnamespace \"urn:law:demo:diagnostics\";\n\nrelation sunny() kind institutional;\n\nsnapshot S1 \"export.json\";\n\ntest \"vacuous\" {\n given {\n context {\n legal_time @2026-08-26;\n }\n }\n\n evaluate truth(sunny());\n\n expect evaluation_status == COMPUTED;\n}\n"}, "expect": "LDC-E1363"}{"argv": ["lower-test", "$ROOT/test.lawtest"], "files": {"test.lawtest": "language \"law.core\" version \"0.2\";\npackage demo.diagnostics version \"0.1.0\";\nnamespace \"urn:law:demo:diagnostics\";\n\nrelation sunny() kind institutional;\n\ntest \"vacuous\" {\n given {\n context {\n legal_time @2026-08-26;\n }\n }\n\n evaluate truth(sunny());\n\n expect evaluation_status == COMPUTED;\n}\n"}, "expect": null}Documentation for Arxo. Writings — blog.arxo.io.
Anonymous visit counts on stats.arxo.io, no cookies.