Skip to main content

Module descriptions

Module descriptions 

Expand description

What a change did, as a sentence a model wrote on a member’s device.

A description is history metadata, kept where the change’s name is kept (groups): in the resource’s own document, one record per described change at the root, keyed by the change it describes:

ROOT
  "tilo:describe:<hex of the change>"
     text : "Moved the budget table under Costs"
     by   : "<the generator: provider and model>"

So one member’s device writes it, it syncs end to end with the content to everyone in the workspace, and no other device asks a model again. Writing one is a change, but neither a row of History nor a step of undo (super::is_history_metadata). The facts stay the change itself: a description is shown in place of the change’s own summary, never instead of its author, time or kind, and never decides grouping or counts.

Constants§

DESCRIPTIONS_KEY
Namespaced beside the names of runs, apart from any app’s own schema.
MAX_DESCRIPTION_LEN
A description is one short sentence; past this it is a paragraph that no row has workspace for.

Functions§

change_evidence
What each of ids wrote, quoted for a model to describe: the text it typed and the values it set, cut to a sentence’s worth. Changes the document does not hold are left out.
is_acceptable
Whether text may stand as a description: one non-empty line within MAX_DESCRIPTION_LEN.
is_description_marker
Whether a change only wrote descriptions.
read_descriptions
Every description the document carries, by the change it describes. A record that does not parse is skipped: no description is better than a wrong one.
write_description
Write the description of the change id, unless the document already carries one: the first member to describe a change describes it for everyone. false when nothing was written. The transaction is left open for the host to commit.