mirror of
https://github.com/jcreek/CosmicClash.git
synced 2026-09-16 00:52:10 +00:00
feat: classify match integrity separately from delivery
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user