CollectorRecord

data class CollectorRecord constructor(val propositionId: String, val reason: MarkReason, val outcome: CollectorOutcome, val strategyName: String, val runId: String, val at: Instant = Instant.now(), val previousStatus: PropositionStatus? = null, val newStatus: PropositionStatus? = null, val mergedIntoId: String? = null, val undoneAt: Instant? = null)

A record of one proposition being acted upon by a collector during a run.

Collectively these records form an audit trail — "which propositions were marked or swept, why, and by which strategy" — so a reviewer can trace any retired or removed proposition back to the run and reason that produced the outcome.

The reason is a typed MarkReason rather than a free-form string, and the action is a typed CollectorOutcome rather than a lifecycle/magic value, so the collector audit trail stays semantically distinct from projection lineage.

Constructors

Link copied to clipboard
constructor(propositionId: String, reason: MarkReason, outcome: CollectorOutcome, strategyName: String, runId: String, at: Instant = Instant.now(), previousStatus: PropositionStatus? = null, newStatus: PropositionStatus? = null, mergedIntoId: String? = null, undoneAt: Instant? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val at: Instant

When this record was created

Link copied to clipboard
val mergedIntoId: String? = null

The survivor this proposition's evidence was folded into, when the sweep actually performed a merge. Null everywhere else — a plain status transition, a skip, a hard delete, and the fallback retirement a runner does when a merge target has vanished or is no longer active all leave it null, which is what separates them from a merge that ran. On a preview record from a dry run it names the target the run would have merged into; the run header's dryRun flag is what says nothing happened.

Link copied to clipboard

The proposition's status after the outcome, or null if not applicable

Link copied to clipboard

What the collector did to the proposition

Link copied to clipboard

The proposition's status before the outcome, or null if not applicable

Link copied to clipboard

ID of the proposition that was acted upon

Link copied to clipboard

Typed explanation of why the proposition was marked

Link copied to clipboard

ID of the collection run that produced this record

Link copied to clipboard

Name of the collector strategy that produced this record

Link copied to clipboard
val undoneAt: Instant? = null

When this run's merge was reversed, or null while it still stands. Written by collapse undo once it has finished, so a record cannot authorize the same undo twice. Without it the audit trail is immortal and says "applied" forever, and a member re-retired later by anything at all — a decay sweep, a second collector run — would re-arm the original undo and let it subtract that run's evidence a second time. A store that keeps one row per (proposition, run) updates that row in place; one that appends leaves both, so a reader should treat any record for the pair carrying this as the whole collapse being undone.