Markdown for LLMs
LDC-E5201 — A fragment text that fails its pinned hash
The source Markdown for this article. Copy it into your assistant or download it as a text file.
# LDC-E5201 — A fragment text that fails its pinned hash
## What it means
A fragment may pin its official text with a content hash: the engine
hashes the exact bytes of the quoted text and compares. Any drift —
an edited word, a stray space, a re-wrapped line — breaks the match, and
the compiler refuses the fragment at the hash. The pin no longer
describes the text it travels with.
Recompute the hash from the current text after every edit, or drop the
pin while the text is still in flux.
## Example
```law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";
source S1 { kind statute; }
edition E1 of S1 { language en; officiality official; }
fragment F1 in E1 { text en official "Duty applies."; content_hash "sha256:0000000000000000000000000000000000000000000000000000000000000000"; }
```
## Fix
```law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";
source S1 { kind statute; }
edition E1 of S1 { language en; officiality official; }
fragment F1 in E1 { text en official "Duty applies."; content_hash "sha256:856b1e8e64a12ad81399ff2e9a415829921c3789ef6e5e1f2518c756ca607593"; }
```
## Engine message
The engine reports this in its own wording:
```text
example.law:7:68: error LDC-E5201: fragment "F1": text hash (en) does not match the declared content_hash — §194 formalization source text hash mismatch (declared sha256:0000000000000000000000000000000000000000000000000000000000000000, actual sha256:856b1e8e64a12ad81399ff2e9a415829921c3789ef6e5e1f2518c756ca607593)
```
## Related
- [Sources](/constructs/sources/) — how works, editions, and fragments are declared.
For source with multiple text items and one content_hash, E5209 owns the
ambiguity; the engine does not select a text or offer a hash replacement.
Direct CLIR may carry individual per-text hashes.