bluememo

Settle

Turns pending notes into memories, one group at a time.

func (store *Store) Settle(ctx context.Context) (SettleReport, error)

For each group, settling claims the group with a lease so two workers never process it at once, asks the language model to decompose it into sentences, and then, for each sentence, shows the judge the five nearest live memories and applies its verdict:

relationeffect
unrelatedinserted
extendsinserted, and linked to the memory it adds detail to
updatesinserted, and the old memory goes cold as superseded
samethe higher-rated wording stays live and is reinforced; the other goes cold
noisedropped: the judge rated the sentence 1, nothing worth keeping

Embeddings only gather the candidates; the judge decides. When the store holds nothing close yet, there is nothing to relate to, and the sentence is kept unless it is noise. A sentence the judge rates 3 or higher is rehearsed: the model writes up to four trigger phrases a person might use when the memory matters, and a phrase is kept only if it sits at least 0.05 closer to its own memory than to the average live memory. A group whose settling fails keeps its lease until it runs out, then the next Settle takes it again.

The report counts groups, proposals, inserts, reinforcements, supersessions, extensions, drops, rejected sentences and failed rehearsals.