DecaySweepPass

class DecaySweepPass constructor(collectorRunner: CollectorRunner, staleThresholdH: Double = 0.1, recoveryThresholdS: Double = 0.25) : ConsolidationPass

The decay pass in a consolidation cycle: a thin wrapper that delegates entirely to an injected CollectorRunner and translates its outcome into a ConsolidationPassResult.

This pass owns no sweep logic — the runner handles candidate selection, pinned-proposition exemption, staleness evaluation, persistence, and lifecycle events. The pass just drives the runner and reports what happened.

Soft STALE vs. hard-delete

The behavior depends on the SweepPolicy the runner was built with. The default policy retires propositions softly to STALE and never hard-deletes, so a DecaySweepPass over a default runner is non-destructive. For hard-delete, build the runner with a policy that returns SweepAction.HardDelete for stale marks — this pass surfaces those deletes in its summary but never puts ids in ConsolidationPassResult.Changed.propositionsToDelete.

Dual-threshold hysteresis

Decay transitions use a two-threshold band to avoid status flapping:

  • staleThresholdH (default 0.1): a proposition goes STALE only when effective confidence drops below H.

  • recoveryThresholdS (default 0.25): the upper edge of the hysteresis band [H, S). Revival out of STALE is reinforcement-driven (happens on ingest/reinforce), never sweep-driven. These thresholds are surfaced here for documentation and NoOp report text.

Write boundary

The CollectorRunner writes transitions itself inside CollectorRunner.run. To avoid a double-write, this pass is report-only: its ConsolidationPassResult.Changed always carries empty propositionsToSave and propositionsToDelete. The orchestrator gets nothing to re-persist from this pass.

Constructors

Link copied to clipboard
constructor(collectorRunner: CollectorRunner, staleThresholdH: Double = 0.1, recoveryThresholdS: Double = 0.25)

Properties

Link copied to clipboard
open override val name: String

Short, stable identifier used in reports and logging (e.g. "abstraction").

Functions

Link copied to clipboard
open override fun run(contextId: <Error class: unknown class>, propositions: List<Proposition>): ConsolidationPassResult

Runs the collector's full mark-and-sweep over contextId and reports the outcome.