package work type EvolutionChangeLevel string const ( EvolutionKnowledge EvolutionChangeLevel = "KNOWLEDGE" EvolutionBehavior EvolutionChangeLevel = "BEHAVIOR" EvolutionCapability EvolutionChangeLevel = "CAPABILITY" EvolutionCore EvolutionChangeLevel = "CORE" ) type EvolutionCandidate struct { ID string ProposalRef string ChangeLevel EvolutionChangeLevel CreatorIdentity string BaseVersionRef string CandidateVersionRef string MustNotWorsen []string SandboxEvidenceRefs []EvidenceRef BenchmarkEvidenceRefs []EvidenceRef RollbackRef string State string } type EvolutionEvaluation struct { CandidateRef string EvaluatorIdentity string Approved bool EvidenceRefs []EvidenceRef MustNotWorsenPassed bool RecordedAtUnixMillis int64 } func (e EvolutionEvaluation) ValidFor(c EvolutionCandidate) bool { return e.CandidateRef == c.ID && e.EvaluatorIdentity != "" && e.EvaluatorIdentity != c.CreatorIdentity && e.Approved && e.MustNotWorsenPassed && len(e.EvidenceRefs) > 0 && e.RecordedAtUnixMillis > 0 }