From 9e2d7594eb7906f63a6f37b68d19988cb8f1dec0 Mon Sep 17 00:00:00 2001 From: Dom <168790843+firestar5683@users.noreply.github.com> Date: Sun, 1 Nov 2026 23:17:30 -0600 Subject: [PATCH] Model native receipt observation in selfdrived fixtures --- openpilot/starpilot/aol/tests/test_ordinary_axis.py | 2 +- openpilot/starpilot/aol/tests/test_runtime.py | 6 ++++-- prebuilt.json | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/openpilot/starpilot/aol/tests/test_ordinary_axis.py b/openpilot/starpilot/aol/tests/test_ordinary_axis.py index e85b1b8fba..4d4ea7cf05 100644 --- a/openpilot/starpilot/aol/tests/test_ordinary_axis.py +++ b/openpilot/starpilot/aol/tests/test_ordinary_axis.py @@ -63,7 +63,7 @@ class TestOrdinaryAxis(unittest.TestCase): from openpilot.selfdrive.selfdrived.alertmanager import AlertManager sd.AM = AlertManager() sd.pm = Mock() - vars(sd)['sm'] = SimpleNamespace(frame=1) + vars(sd)['sm'] = SimpleNamespace(frame=1, seen={'aolSafetyWire': True}) sd.experimental_mode = False sd.personality = 1 sd.conditional_replay = False diff --git a/openpilot/starpilot/aol/tests/test_runtime.py b/openpilot/starpilot/aol/tests/test_runtime.py index e93bad9ab2..20d7529a85 100644 --- a/openpilot/starpilot/aol/tests/test_runtime.py +++ b/openpilot/starpilot/aol/tests/test_runtime.py @@ -1233,7 +1233,7 @@ class IpcAxisContractTests(unittest.TestCase): def test_lateral_only_receipt_loss_keeps_take_control_alert(self): class SM: - seen = {'aolIntentWire': False} + seen = {'aolIntentWire': False, 'aolSafetyWire': False} frame = 0 def __getitem__(self, service): @@ -1293,6 +1293,7 @@ class IpcAxisContractTests(unittest.TestCase): self.assertNotIn(ET.IMMEDIATE_DISABLE, sd.state_machine.current_alert_types) self.assertNotEqual(sd.AM.current_alert.alert_text_1, 'TAKE CONTROL IMMEDIATELY') + sd.sm.seen['aolSafetyWire'] = True sd.sm.frame = 2 sd.step() self.assertEqual(sd.aol_axis_decision.mode, 'lateralOnly') @@ -1882,7 +1883,7 @@ class IpcAxisContractTests(unittest.TestCase): def test_native_receipt_gates_engagement_and_disables_on_loss(self): class SM: - seen = {'aolIntentWire': False} + seen = {'aolIntentWire': False, 'aolSafetyWire': False} def __getitem__(self, service): if service == 'deviceState': return SimpleNamespace(started=True, startedMonoTime=1) @@ -1944,6 +1945,7 @@ class IpcAxisContractTests(unittest.TestCase): self.assertTrue(sd.events.contains(ET.NO_ENTRY)) self.assertEqual(sd.aol_axis_decision.mode, 'off') sd.publish_selfdriveState.assert_called_once() # disabled bootstrap still publishes the zero-axis request + sd.sm.seen['aolSafetyWire'] = True sd.step() self.assertTrue(sd.enabled and sd.active) self.assertEqual(sd.aol_axis_decision.mode, 'combined') diff --git a/prebuilt.json b/prebuilt.json index 655ac906d1..ab22337699 100644 --- a/prebuilt.json +++ b/prebuilt.json @@ -1 +1 @@ -{"protected_inventory_sha256": "3c88c96a3d4067ed5c4cb263e809b67c05ac819dd274f40c42af5c974c0998d2", "schema_version": 1} +{"protected_inventory_sha256": "4ab96a0de5c3b4741be6c2723f4f24d5fb29619b722a6745fe1158eb13e6fe5b", "schema_version": 1}