InMemoryProjectionRecordStore

Thread-safe in-memory implementation of ProjectionRecordStore.

Intended as a default/stub for demos and tests. Records are append-only and returned in insertion order. Backed by a CopyOnWriteArrayList so reads never block writes.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open override fun all(): List<ProjectionRecord>
Link copied to clipboard
open override fun findByContext(contextId: String): List<ProjectionRecord>

Find all records for propositions in a given context. Used to scope projection-health summaries so one context never sees another's lineage.

Link copied to clipboard
open override fun findByProposition(propositionId: String): List<ProjectionRecord>

Find all records for a given proposition.

Link copied to clipboard
open override fun findByRun(runId: String): List<ProjectionRecord>

Find all records produced by a given run.

Link copied to clipboard
open override fun findByTarget(target: String): List<ProjectionRecord>

Find all records for a given target.

Link copied to clipboard
open override fun findByTargetRef(targetRef: String): List<ProjectionRecord>

Trace from a produced/adopted artifact back to the projection records that reference it. Starting from a target artifact reference (e.g. a graph node ID), this returns every record whose ProjectionRecord.targetRef matches, across all lifecycles — so a reviewer can see whether the artifact was created (PROJECTED), adopted/aligned (ADOPTED), skipped, failed, or has gone stale.

Link copied to clipboard
open override fun findStale(): List<ProjectionRecord>

Find all records currently in the ProjectionLifecycle.STALE state.

Link copied to clipboard
open override fun markStaleByProposition(propositionId: String): Int

Marks every record for propositionId that isn't already STALE as ProjectionLifecycle.STALE, preserving insertion order and leaving all other records untouched.

Link copied to clipboard
open override fun record(record: ProjectionRecord)

Record a projection outcome.