PropositionPersistenceResult

What a batch of propositions actually landed on: which stored proposition each one you handed in became.

Usually that is the same proposition you passed, with the same id. It is not the same when a backend deduplicates. DrivinePropositionRepository collapses a fresh insert onto an existing proposition with identical (contextId, text), unions the incoming evidence into it, and hands back the one that is stored — a different id from the one you minted. Anything that then writes an edge, a projection or a grounding link against the id it minted is pointing at a node that does not exist.

saveAll returns Unit, so that mapping used to be thrown away. This type is what carries it back.

Two views, and they are not interchangeable. canonicalPropositions is positional: one entry per input, in input order, so it lines up with the list you passed and can repeat a proposition when two inputs deduplicated onto one. canonicalIds is the distinct set, first-seen order, which is what you want for a write that should happen once per stored proposition.

Whichever view you read, every proposition in it is the store's final answer for that input — see of for what that means when one batch names an id twice.

EXPERIMENTAL. The shape may still change while extraction runs (DICE #67) land.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The id you handed in, mapped to the id it landed on

Link copied to clipboard

The distinct stored proposition ids, in the order they were first seen.

Link copied to clipboard

The stored proposition each input became, one per input, in input order

Link copied to clipboard

The inputs whose id is not the id they landed on — the ones a backend deduplicated.

Link copied to clipboard

The distinct stored propositions, first-seen order — canonicalIds with the objects attached.

Link copied to clipboard

True when nothing deduplicated: every input landed on its own id.

Functions

Link copied to clipboard
fun canonicalIdOf(inputId: String): String?

The id inputId landed on, or null if this batch did not carry it.

Link copied to clipboard
open override fun toString(): String