Develop 2.1.0 proactive Astra intervention and rolling fleet scheduling
This commit is contained in:
+51
-4
@@ -44,12 +44,59 @@ class DecisionTests(unittest.TestCase):
|
||||
self.record["escalation"]["target"] = "astra"
|
||||
self.assertTrue(module.validate(self.record))
|
||||
|
||||
def test_extra_consultation_needs_basis(self):
|
||||
self.record["escalation"]["expert_consultations"] = 2
|
||||
self.assertTrue(module.validate(self.record))
|
||||
self.record["escalation"]["followup_basis"] = "new discriminator result"
|
||||
def test_zero_failure_proactive_astra_consultation(self):
|
||||
self.record["failure_class"] = "reasoning"
|
||||
self.record["status"] = "investigating"
|
||||
self.record["same_class_failures"] = 0
|
||||
self.record["reassessment"] = ""
|
||||
self.record["escalation"] = {
|
||||
"target": "astra",
|
||||
"reason": "Proactive review of a high-impact architectural choice.",
|
||||
"expert_consultations": 1,
|
||||
"followup_basis": "",
|
||||
}
|
||||
self.record["unresolved"] = ["expert consultation pending"]
|
||||
self.assertEqual(module.validate(self.record), [])
|
||||
|
||||
def test_more_than_three_progressive_consultations(self):
|
||||
self.record["escalation"]["expert_consultations"] = 4
|
||||
self.record["escalation"]["followup_basis"] = "new discriminator results across rounds"
|
||||
self.assertEqual(module.validate(self.record), [])
|
||||
|
||||
def test_multiple_consultations_need_basis(self):
|
||||
self.record["escalation"]["expert_consultations"] = 2
|
||||
self.assertIn(
|
||||
"additional consultation requires new evidence or a specific omission",
|
||||
module.validate(self.record),
|
||||
)
|
||||
|
||||
def test_consultation_counter_cannot_decrease_across_class_change(self):
|
||||
previous = copy.deepcopy(self.record)
|
||||
previous["escalation"]["expert_consultations"] = 4
|
||||
previous["escalation"]["followup_basis"] = "prior progressive rounds"
|
||||
self.record["failure_class"] = "reasoning"
|
||||
self.record["escalation"]["expert_consultations"] = 3
|
||||
self.record["escalation"]["followup_basis"] = "current evidence"
|
||||
self.assertIn(
|
||||
"expert consultation counter decreased across continuation",
|
||||
module.validate(self.record, previous),
|
||||
)
|
||||
|
||||
def test_consultation_counter_can_increase_with_basis(self):
|
||||
previous = copy.deepcopy(self.record)
|
||||
previous["escalation"]["expert_consultations"] = 1
|
||||
self.record["escalation"]["expert_consultations"] = 4
|
||||
self.record["escalation"]["followup_basis"] = "new discriminator results"
|
||||
self.assertEqual(module.validate(self.record, previous), [])
|
||||
|
||||
def test_malformed_previous_consultation_counter_is_rejected(self):
|
||||
previous = copy.deepcopy(self.record)
|
||||
previous["escalation"]["expert_consultations"] = True
|
||||
self.assertIn(
|
||||
"previous expert_consultations must be a nonnegative integer",
|
||||
module.validate(self.record, previous),
|
||||
)
|
||||
|
||||
def test_recovery_required(self):
|
||||
self.record["recovery_route"] = ""
|
||||
self.assertTrue(module.validate(self.record))
|
||||
|
||||
Reference in New Issue
Block a user