package link.roadio.riff.config /** Fixed schema capacity; user model overrides must retain the adopted tail influence. */ object UserHistoryPolicy { const val CAPACITY = 382 const val ALIGNMENT = 4096 const val MAX_FILE_BYTES = 12 * 1024 const val DEFAULT_DECAY = 0.9892280131939755 const val DEFAULT_WEIGHT = 46.41669257526021 fun validateDecay(value: Double) { require(value.isFinite() && value > 0 && value < 1 && Math.pow(value, (CAPACITY - 1).toDouble()) >= 0.01) { "History decay must retain at least one percent at the adopted capacity" } } }