Skip to main content
A change unit owns the evidence and relations it contributed, not the concepts. Within a unit, ownership is per passage, so re-extracting two changed passages leaves the evidence of the others alone.

Applying a contribution

Applying a Contribution is four steps, in one transaction:
  1. Remove. Remove the unit’s evidence for the passages in replaces (all of them when replaces is None), and the relations that lose all their evidence.
  2. Restamp. Restamp all of the unit’s evidence, kept and new, with the contribution’s access_labels and stale_after. A metadata change therefore reaches evidence whose text did not change.
  3. Merge. Merge in the new concepts, creating the ones that do not exist.
  4. Check. Check each concept left with no evidence. If a human verified it, mark it deprecated and log it. Otherwise delete it, leaving a redirect if it had been exported.

When two units disagree

When two units give a concept different text, content from a human actor wins. Otherwise the newest generated.at wins, and the vector travels with the winning text. Merging two concepts keeps the older id. The other becomes a redirect. Lesson 1 walks through these cases on one concept:

Versions make an update cheap

A unit’s DocVersion has three hashes: file, metadata and passages. Comparing them with the source’s manifest shows what changed, so only that is redone. New metadata re-opens context choices. Changed passages are re-extracted, and unchanged ones keep their pinned choices. A rebuild gives the same index because ids derive from fixed founding fields and context choices are pinned and replayed.

Invariants

The promises that ownership and merging keep, such as “removed sources leave no trace” and “a rebuild gives the same result”, are listed on the Invariants page.