feat: classify match integrity separately from delivery

This commit is contained in:
Josh Creek
2026-08-31 21:05:54 +01:00
parent 4e66c5758c
commit 63332435d2
3 changed files with 36 additions and 1 deletions
+18
View File
@@ -20,6 +20,24 @@ const (
IntegrityReview IntegrityState = "REVIEW"
)
type IntegrityEvidence struct {
RosterAuthoritative bool
SimulationAuthoritative bool
ResultAuthoritative bool
RegionalPlayFair bool
DeliveryAvailable bool
}
// ClassifyIntegrity deliberately ignores DeliveryAvailable when deciding
// rating eligibility: a healthy match remains rated while the control plane
// is temporarily unable to acknowledge its result.
func ClassifyIntegrity(evidence IntegrityEvidence) IntegrityState {
if !evidence.RosterAuthoritative || !evidence.SimulationAuthoritative || !evidence.ResultAuthoritative || !evidence.RegionalPlayFair {
return IntegritySuppressed
}
return IntegrityCertified
}
var (
ErrResultBinding = fmt.Errorf("result workload binding rejected")
ErrResultConflict = fmt.Errorf("conflicting result")