QuarantineDecision

sealed interface QuarantineDecision

What a policy decided about one Proposition.

Four outcomes. AlreadyQuarantined covers a proposition an earlier sweep already quarantined: counting it as conforming would overstate how clean the set is, and it isn't newly quarantined either, because this sweep leaves it alone to preserve its original reason. Protected covers a pinned proposition that a lossy change would otherwise have caught: pinning is DICE's cross-cutting "must retain" promise, so this sweep leaves it alone too, and still says what the schema change would have done to it. Each keeps conforming.size accurate.

Sealed, so a when over the outcomes is exhaustive and the compiler speaks up if a fifth ever lands.

Inheritors

Types

Link copied to clipboard
data class AlreadyQuarantined(val proposition: Proposition, val originalReason: String?) : QuarantineDecision

An earlier sweep already quarantined this one: its status is PropositionStatus.QUARANTINED, so this sweep left it as it found it. Nothing needs persisting for these.

Link copied to clipboard
data class Conforming(val proposition: Proposition) : QuarantineDecision

Nothing in the schema change touches this proposition; it needs no action.

Link copied to clipboard
data class Protected(val proposition: Proposition, val reason: String, val affectedMentionTypes: Set<String>) : QuarantineDecision

A pinned proposition that a lossy schema change would otherwise have quarantined. Pinning promises cross-cutting immunity from reclamation (see PropositionStore.pin), so this sweep leaves it exactly as it was — an unpinned match on the same change gets flipped to QUARANTINED, this one doesn't — and reports it here so an operator reading the sweep can still see it was affected.

Link copied to clipboard
data class Quarantined(val proposition: Proposition, val reason: String, val affectedMentionTypes: Set<String>, val previousStatus: PropositionStatus) : QuarantineDecision

Schema drift stranded this proposition, and it has been flagged.