ExtractionRunSchema

The constraints, indexes and node labels DrivineExtractionRunStore needs, as plain data.

A host declares specs in a SchemaCatalog bean and Drivine's schema manager ensures them on startup; the module's TestApplication shows the shape. LABELS is every label the store writes, which is what a test teardown or an operator's audit sweep needs.

The three constraints are not optional tuning. Every write here is a MERGE or a CREATE on a natural key, and neither is race-free without a uniqueness constraint on that key: concurrent writers all miss the match, all take the create branch, and the store fills with copies of one run. The terminal-write constraint does more than that — see DrivineExtractionRunStore for why it is what makes compare-and-set hold across processes rather than only across threads.

Properties

Link copied to clipboard
const val ENDED_BY_REL: String

Header to the terminal write that ended it.

Link copied to clipboard

The (:ExtractionRunInvocation) child: one node per attempt at one planned model call.

Link copied to clipboard

Every node label the run store writes, for test cleanup and for an operator's audit sweep.

Link copied to clipboard
const val MAX_CONTEXT_ID_LENGTH: Int = 1024

The longest tenant id this store will write.

Link copied to clipboard

A claim to the run that produced it: (:Proposition)-[:PRODUCED_BY_RUN]->(:ExtractionRun).

Link copied to clipboard
const val RECORDED_REL: String

Header to invocation child.

Link copied to clipboard
const val RUN_LABEL: String

The (:ExtractionRun) header: one node per run, per tenant.

Link copied to clipboard

The (:ExtractionRunTerminalWrite) node: at most one per run, and the thing that says so.

Functions

Link copied to clipboard
fun requireStorableTenant(contextId: <Error class: unknown class>)

Rejects a tenant this store cannot key on, before anything is written.

Link copied to clipboard
fun specs(): List<<Error class: unknown class>>

Every constraint and index the store depends on.