Markdown for LLMs
LDC-E1363 — Snapshot in a test file
The source Markdown for this article. Copy it into your assistant or download it as a text file.
# LDC-E1363 — Snapshot in a test file
## 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
```run
{"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"}
```
## Fix
```run
{"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}
```
## Engine message
The engine reports this in its own wording:
```text
$ROOT/test.lawtest:7:10: error LDC-E1363: snapshot S1 in a test file: a §267 scene carries its own input, no §168.5 snapshot is presented to it
```
## Related
- [LDC-E1362](/diagnostics/LDC-E1362/) — a case use with no declared snapshot.
- [LDC-E1316](/diagnostics/LDC-E1316/) — a test that asserts nothing at all.