DefaultDreamLoopOrchestrator

data class DefaultDreamLoopOrchestrator(repository: PropositionRepository, passes: List<ConsolidationPass> = emptyList(), allowHardDelete: Boolean = false, changeVolumeThreshold: Int = 10) : DreamLoopOrchestrator

Default DreamLoopOrchestrator: runs a list of ConsolidationPasses as a single cycle.

Each cycle fetches the ACTIVE snapshot once, runs every pass over it in registration order, then aggregates all the saves into a single PropositionRepository.saveAll. Hard deletes are off by default — they only happen when allowHardDelete is explicitly enabled.

The consolidate trigger is best-effort: it tracks the ACTIVE count after each cycle and fires when the delta since the last cycle reaches changeVolumeThreshold. Use consolidateNow to bypass the threshold and run unconditionally.

Parameters

repository

Storage backend; the orchestrator is the sole writer per cycle.

passes

Passes executed in registration order.

allowHardDelete

When false (default), delete-intents from passes are silently ignored. When true, each aggregated delete id is removed from the repository.

changeVolumeThreshold

Minimum active-count delta since the last cycle for consolidate to fire.

Constructors

Link copied to clipboard
constructor(repository: PropositionRepository, passes: List<ConsolidationPass> = emptyList(), allowHardDelete: Boolean = false, changeVolumeThreshold: Int = 10)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun consolidate(contextId: <Error class: unknown class>): DreamLoopReport?

Run a consolidation cycle only if enough has changed since the last cycle.

Link copied to clipboard
open override fun consolidateNow(contextId: <Error class: unknown class>): DreamLoopReport

Run a consolidation cycle unconditionally, regardless of how much has changed.

Link copied to clipboard
open override fun maintain(contextId: <Error class: unknown class>, sessionPropositions: List<Proposition>): MaintenanceResult

Satisfies the MemoryMaintenanceOrchestrator contract by running a full cycle, but the result is always empty in the legacy-shaped MaintenanceResult — the real output is a DreamLoopReport from consolidateNow. For the full consolidation/abstraction/retire pipeline, use DefaultMemoryMaintenanceOrchestrator instead.

Link copied to clipboard

Enable or disable irreversible hard deletes (default disabled — soft STALE only).

Link copied to clipboard

Set the active-count delta required for the threshold-gated consolidate to run.

Link copied to clipboard

Add a pass and return a new orchestrator with it appended. Registration order is execution order.