fix(healing): normalize history timestamps to UTC in heal flap gate

This commit is contained in:
patrick committed 2026-03-06 22:31:24 -05:00
1 parent 1013b05790
commit f5615faeae
2 files changed
+19 -3

No files matched your search

+10
View File
@@ -74,6 +74,16 @@ class HealGateTests(unittest.TestCase):
self.assertFalse(should_heal(path, "tail123", min_interval=900))
def test_should_heal_handles_timezone_aware_history_timestamp(self):
now_utc = datetime.now().astimezone().astimezone().isoformat()
with tempfile.NamedTemporaryFile(mode="w", delete=False) as tmp:
tmp.write(
f"{now_utc} - HEAL: drift_fingerprint=aware123 heal_result=success post_drift_fingerprint=\n"
)
path = tmp.name
self.assertFalse(should_heal(path, "aware123", min_interval=900))
class PostHealVerificationTests(unittest.TestCase):
@patch("healing.time.sleep", return_value=None)