Skip to content
LITHOEN

Evidence platform and governance

Document

ADR-0026: SourceRecordMapping — bulk ingestion requires a semantic contract

Repository path
docs/decisions/ADR-0026-source-record-mapping.md
Size · SHA-256
2.4 KB · da596d18793bad9b4997946490ccca8c125e5be73e02113cd3d63878c83a52c1

Status: accepted (2026-09-07)

Context

A deposit dataset is a table, and the temptation is to treat one row as one record. Phase 5 read four datasets and found that the temptation is wrong in two different ways.

The USGS Mineral Resources Data System mixes occurrences, prospects, mines, shafts and districts in one table with no field that separates them. And even in a dataset that DOES define one row as one deposit, a row can turn out to be something else: the Viburnum Trend appears in the sediment-hosted zinc-lead database as one row, its own includes column lists separate named orebodies, and the USGS Mississippi Valley-type model states that districts of that class consist of several to as many as 400 deposits.

Decision

A new record type, mapping, and a rule that bulk ingestion without one is refused.

Each mapping records the dataset, the publisher's own row identifier, the name as the source spells it, what the source says one row is, what Lithoen took it to be, a confidence, and a reason in prose — required, because a mapping without a reason is an assumption. It also records the names the compiler itself merged into the row, and the fields Lithoen read and refused.

Validators enforce the identity properties: two mappings cannot claim the same row, one row cannot become two entities, a row Lithoen reinterprets away from what the source called it cannot claim the source stated it, and a row whose meaning is unknown cannot have produced an entity.

Consequences

  • The original source record stays traceable after reconciliation, and the reconciliation is visible on the public page rather than buried in a script.
  • Someone else's deduplication stays visible as theirs. The porphyry database merges everything within two kilometres into one deposit and 76 of its 690 rows say what was merged; Lithoen carries those names rather than inheriting the merge silently.
  • Deduplication is a scientific identity decision. No merge is performed by distance, by name similarity or by any automatic rule. Phase 5 performed none: Cerro Colorado appears in the porphyry database in Chile, Mexico, Panama and Peru, and Broken Hill in the sediment-hosted database in both Australia and South Africa. Same name, different deposits, and nothing in the pipeline is capable of merging them.