Markdown for LLMs
LDC-E8704 — Pinned resource diverges from the lock
The source Markdown for this article. Copy it into your assistant or download it as a text file.
# LDC-E8704 — Pinned resource diverges from the lock
## What it means
Data sources shipped alongside a package are pinned in the lock: each
resource line records the bytes the build must see. Before anything
executes, the compiler reconciles the lock with the directory — a
missing lock, an unreadable one, a resource the lock does not know, or
bytes that no longer match the pin stop the run. The pin is the
trust anchor: silently running on different bytes is worse than not
running.
Restore the pinned bytes or re-pin the resource so the lock and the
directory agree again.
## Example
```run
{"argv": ["check", "$ROOT"], "files": {"law.toml": "[package]\nname = \"demo.diagnostics\"\nversion = \"0.1.0\"\nlanguage = \"0.2\"\nnamespace = \"urn:demo:diagnostics\"\n", "main.law": "language \"law.core\" version \"0.2\";\npackage demo.diagnostics version \"0.1.0\";\nnamespace \"urn:demo:diagnostics\";\n\nentity Person;\n", "mrp.lawparam.json": "{\"schemaVersion\": \"law.params/0.1\", \"kind\": \"parameter-dataset\", \"id\": \"urn:demo:diagnostics#mrp\", \"parameter\": \"urn:demo:diagnostics#MRP\", \"valueType\": {\"name\": \"urn:law:std#Money\"}, \"timeAxis\": \"legal_time\", \"granularity\": \"date\", \"coverage\": {\"start\": \"2025-01-01\", \"endExclusive\": null}, \"values\": [{\"id\": \"urn:demo:diagnostics#mrp#2025\", \"valid\": {\"start\": \"2025-01-01\", \"endExclusive\": \"2026-01-01\"}, \"value\": {\"kind\": \"value\", \"type\": {\"name\": \"urn:law:std#Money\"}, \"value\": \"3932\", \"currency\": \"KZT\"}, \"anchors\": [\"urn:demo:diagnostics#law#article-9\"]}, {\"id\": \"urn:demo:diagnostics#mrp#2026\", \"valid\": {\"start\": \"2026-01-01\", \"endExclusive\": null}, \"value\": {\"kind\": \"value\", \"type\": {\"name\": \"urn:law:std#Money\"}, \"value\": \"4325\", \"currency\": \"KZT\"}, \"anchors\": [\"urn:demo:diagnostics#law#article-9\"]}]}"}, "expect": "LDC-E8704"}
```
## Fix
```run
{"argv": ["check", "$ROOT"], "files": {"law.toml": "[package]\nname = \"demo.diagnostics\"\nversion = \"0.1.0\"\nlanguage = \"0.2\"\nnamespace = \"urn:demo:diagnostics\"\n", "main.law": "language \"law.core\" version \"0.2\";\npackage demo.diagnostics version \"0.1.0\";\nnamespace \"urn:demo:diagnostics\";\n\nentity Person;\n", "mrp.lawparam.json": "{\"schemaVersion\": \"law.params/0.1\", \"kind\": \"parameter-dataset\", \"id\": \"urn:demo:diagnostics#mrp\", \"parameter\": \"urn:demo:diagnostics#MRP\", \"valueType\": {\"name\": \"urn:law:std#Money\"}, \"timeAxis\": \"legal_time\", \"granularity\": \"date\", \"coverage\": {\"start\": \"2025-01-01\", \"endExclusive\": null}, \"values\": [{\"id\": \"urn:demo:diagnostics#mrp#2025\", \"valid\": {\"start\": \"2025-01-01\", \"endExclusive\": \"2026-01-01\"}, \"value\": {\"kind\": \"value\", \"type\": {\"name\": \"urn:law:std#Money\"}, \"value\": \"3932\", \"currency\": \"KZT\"}, \"anchors\": [\"urn:demo:diagnostics#law#article-9\"]}, {\"id\": \"urn:demo:diagnostics#mrp#2026\", \"valid\": {\"start\": \"2026-01-01\", \"endExclusive\": null}, \"value\": {\"kind\": \"value\", \"type\": {\"name\": \"urn:law:std#Money\"}, \"value\": \"4325\", \"currency\": \"KZT\"}, \"anchors\": [\"urn:demo:diagnostics#law#article-9\"]}]}", "law.lock": "{\"lockVersion\": \"0.2\", \"resources\": [{\"capability\": \"compile_time\", \"contentHash\": \"sha256:4e67c8dd00f9f81714dac9ebb458546f98ab9a868cda961b9f181d474bdcb33d\", \"id\": \"urn:demo:diagnostics#mrp\", \"kind\": \"parameter-dataset\", \"path\": \"mrp.lawparam.json\"}]}"}, "expect": null}
```
## Engine message
The engine reports this in its own wording:
```text
lawc: LDC-E8704 $ROOT/law.lock: No such file or directory (os error 2)
```
## Related
- [LDC-E8701](/diagnostics/LDC-E8701/) — the neighbouring data-source refusal.