From 7e00ee80c454d853e62fccc20ca4f40a31d5d1ee Mon Sep 17 00:00:00 2001 From: firestar5683 <168790843+firestar5683@users.noreply.github.com> Date: Fri, 30 Oct 2026 01:05:49 -0500 Subject: [PATCH] Align regression and settings coverage with current AOL contracts --- openpilot/starpilot/aol/tests/test_transition_diagnostic.py | 3 ++- openpilot/starpilot/car/subaru/tests/test_sng_callers.py | 4 +++- .../car/subaru/tests/test_software_cruise_callers.py | 3 ++- .../starpilot/car/toyota/tests/test_radar_filter_buttons.py | 5 ++++- openpilot/starpilot/galaxy/setting_descriptions.py | 1 + .../starpilot/galaxy/tests/description-key-inventory.json | 2 ++ prebuilt.json | 2 +- 7 files changed, 15 insertions(+), 5 deletions(-) diff --git a/openpilot/starpilot/aol/tests/test_transition_diagnostic.py b/openpilot/starpilot/aol/tests/test_transition_diagnostic.py index f54b364488..c21e65a291 100644 --- a/openpilot/starpilot/aol/tests/test_transition_diagnostic.py +++ b/openpilot/starpilot/aol/tests/test_transition_diagnostic.py @@ -215,7 +215,8 @@ def test_declared_proofs_with_controlled_schedule(schedule): expected = schedule in ('no_delay', 'expired_at_entry', 'cross_before_guard') assert bool(command.latActive) == expected and not command.longActive assert native_checks == [schedule != 'expired_invalid_native'] - assert len(updates) == int(schedule != 'no_delay') + expected_updates = 2 if schedule in ('cross_no_pending', 'expired_empty') else int(schedule != 'no_delay') + assert updates == [guard] * expected_updates assert axis_checks[0]['accepted'] == (schedule not in ('cross_no_pending', 'expired_empty')) diagnostic = controls.aol_transition_diagnostic assert (diagnostic.pending is None) == expected diff --git a/openpilot/starpilot/car/subaru/tests/test_sng_callers.py b/openpilot/starpilot/car/subaru/tests/test_sng_callers.py index 9b35ece0fa..905e2c9eac 100644 --- a/openpilot/starpilot/car/subaru/tests/test_sng_callers.py +++ b/openpilot/starpilot/car/subaru/tests/test_sng_callers.py @@ -8,6 +8,7 @@ import pytest from opendbc.can import CANParser from opendbc.car import Bus, gen_empty_fingerprint, structs from opendbc.car.subaru.values import CAR, DBC +from opendbc.car.subaru.stock_aol import IMPREZA_MAIN_AOL from opendbc.car.subaru.fingerprints import FW_VERSIONS from opendbc.safety.tests.libsafety import libsafety_py from openpilot.cereal import messaging @@ -71,7 +72,8 @@ def test_sng_actual_stock_callers(candidate, software, aol, subaru_native_pair, safety = libsafety_py.libsafety assert cp.pcmCruise and not cp.openpilotLongitudinalControl and not cp.alphaLongitudinalAvailable assert cp.alternativeExperience == (32 if aol else 0) and not cp.dashcamOnly - assert cp.safetyConfigs[0].safetyParam == (520 if software else 8) and cp.autoResumeSng + expected_word = (520 if software else 8) | (IMPREZA_MAIN_AOL if aol and candidate == CAR.SUBARU_IMPREZA_2020 else 0) + assert cp.safetyConfigs[0].safetyParam == expected_word and cp.autoResumeSng sd, controls = SelfdriveD(CP=cp), Controls() stream = CompleteCan(ci) safety.init_tests() diff --git a/openpilot/starpilot/car/subaru/tests/test_software_cruise_callers.py b/openpilot/starpilot/car/subaru/tests/test_software_cruise_callers.py index abe65b7992..70f25c12e1 100644 --- a/openpilot/starpilot/car/subaru/tests/test_software_cruise_callers.py +++ b/openpilot/starpilot/car/subaru/tests/test_software_cruise_callers.py @@ -8,6 +8,7 @@ import pytest from opendbc.can import CANParser from opendbc.car import Bus, gen_empty_fingerprint, structs from opendbc.car.subaru.values import CAR, DBC +from opendbc.car.subaru.stock_aol import IMPREZA_MAIN_AOL from opendbc.car.subaru.fingerprints import FW_VERSIONS from opendbc.safety.tests.libsafety import libsafety_py from openpilot.cereal import messaging @@ -63,7 +64,7 @@ def test_software_cruise_actual_stock_callers(aol, subaru_native_pair, tmp_path) safety = libsafety_py.libsafety assert cp.pcmCruise and not cp.openpilotLongitudinalControl and not cp.alphaLongitudinalAvailable assert cp.alternativeExperience == (32 if aol else 0) and not cp.dashcamOnly - assert cp.safetyConfigs[0].safetyParam == 512 + assert cp.safetyConfigs[0].safetyParam == (512 | (IMPREZA_MAIN_AOL if aol else 0)) sd, controls = SelfdriveD(CP=cp), Controls() stream = CompleteCan(ci) safety.init_tests() diff --git a/openpilot/starpilot/car/toyota/tests/test_radar_filter_buttons.py b/openpilot/starpilot/car/toyota/tests/test_radar_filter_buttons.py index 632233b220..d5ff447076 100644 --- a/openpilot/starpilot/car/toyota/tests/test_radar_filter_buttons.py +++ b/openpilot/starpilot/car/toyota/tests/test_radar_filter_buttons.py @@ -54,7 +54,10 @@ def test_factory_exposes_only_discovered_four_byte_buttons(tmp_path, identity, s rows = {r.key: r for r in feature(Params(str(tmp_path)), cp).rows()} assert {'wheel:LKASButtonControl', 'wheel:DistanceButtonControl', 'wheel:LongDistanceButtonControl', 'wheel:VeryLongDistanceButtonControl'} <= rows.keys() - assert not {'wheel:MainCruiseButtonControl', 'wheel:CancelButtonControl'} & rows.keys() + assert 'wheel:CancelButtonControl' not in rows + main = rows['wheel:MainCruiseButtonControl'] + assert main.value == 'Factory cruise / AOL' and not main.available and not main.choices + assert not feature(Params(str(tmp_path)), cp).choices('MainCruiseButtonControl') if not stock: assert 'Cycle personality' in rows['wheel:DistanceButtonControl'].choices diff --git a/openpilot/starpilot/galaxy/setting_descriptions.py b/openpilot/starpilot/galaxy/setting_descriptions.py index af4d736cbf..be1e30552b 100644 --- a/openpilot/starpilot/galaxy/setting_descriptions.py +++ b/openpilot/starpilot/galaxy/setting_descriptions.py @@ -6,6 +6,7 @@ This presentation catalog supplies the purpose before any genuine prerequisite. from openpilot.starpilot.ui.long_profile_feature import CATEGORY_HELP, VALUE_HELP DESCRIPTIONS = { + 'ReduceMotion': 'Reduces interface animations for a steadier display.', 'IsMetric': 'On displays speed and distance in kilometers; Off uses miles. Saved speed-limit offsets keep their physical values.', 'IsRhdDetected': 'Sets the initial steering-wheel side used by driver monitoring. Applies next drive; automatic side detection continues.', 'FordPrefSteerAngleCurvature': 'Uses steering pinion angle instead of yaw rate to estimate Ford steering curvature. Applies at the next vehicle startup.', diff --git a/openpilot/starpilot/galaxy/tests/description-key-inventory.json b/openpilot/starpilot/galaxy/tests/description-key-inventory.json index 76928bddc2..607d79c449 100644 --- a/openpilot/starpilot/galaxy/tests/description-key-inventory.json +++ b/openpilot/starpilot/galaxy/tests/description-key-inventory.json @@ -67,6 +67,7 @@ "PromptDistractedVolume", "PromptVolume", "RadarRecoveryAlert", + "ReduceMotion", "RefuseVolume", "RelaxedFollow", "RelaxedFollowHigh", @@ -77,6 +78,7 @@ "RelaxedJerkSpeedDecrease", "RemoteStartBootsComma", "ReverseCruise", + "SLCAdvanceSeconds", "SLCConfirmation", "SLCPriority1", "SLCPriority2", diff --git a/prebuilt.json b/prebuilt.json index 943149c54b..71839a4e3f 100644 --- a/prebuilt.json +++ b/prebuilt.json @@ -1 +1 @@ -{"protected_inventory_sha256": "45aa2de8b9c8d86f22f382b25ba847afff179057d13e9414e4900513a97c6705", "schema_version": 1} +{"protected_inventory_sha256": "f7e90cdc7655a052945d8d193e6e5548b57d32469f18feec72e9e25862ebd8fc", "schema_version": 1}