diff --git a/openpilot/selfdrive/test/process_replay/refs/starpilot/manifest.json b/openpilot/selfdrive/test/process_replay/refs/starpilot/manifest.json index c3dcd15551..698c50d9d5 100644 --- a/openpilot/selfdrive/test/process_replay/refs/starpilot/manifest.json +++ b/openpilot/selfdrive/test/process_replay/refs/starpilot/manifest.json @@ -1068,108 +1068,171 @@ } }, { -"segment":"regen218A4DCFAA1|2025-04-08--22-57-51--0", -"process":"selfdrived", -"file":"regen218A4DCFAA1_2025-04-08--22-57-51--0_selfdrived.zst", -"input_sha256":"6c028c0d40328fc00fa12acf91dba30d9f152e89d99a7089aadac62f6c7d5d64", -"input_bytes":10846201, -"official_baseline_commit":"ec95db3f1fa19f76940497fedfdb62e09ea19912", -"official_artifact_commit":"9ae451c262c7402c9623f3baa1580c6242d6777b", -"official_baseline_url":"https://raw.githubusercontent.com/commaai/ci-artifacts/9ae451c262c7402c9623f3baa1580c6242d6777b/regen218A4DCFAA1_2025-04-08--22-57-51--0_selfdrived_ec95db3f1fa19f76940497fedfdb62e09ea19912.zst", -"official_baseline_bytes":29357, -"official_baseline_sha256":"5b28bcc8aa77a544efa59c8f8200b714ed265d8ac965dcc63030c07266f668f4", -"config_sha256":"6e62fd1209b006c6512452b007e65190dc720280d6d976fabf58947e2acc7981", -"car_fingerprint":"TOYOTA_PRIUS", -"bytes":29575, -"sha256":"e9606a00a9d8b2342c9b3c7d7f0fe2fb0c2b412a42742a67a049ee5c7c306583", -"contract":"Before the first native authority grant, missing aolSafetyWire is startup commIssue rather than lost-controls mismatch. On this recording 141 event messages change with 1048 full-comparator differences; all 6020 selfdriveState messages remain disabled/inactive. Independent actual Panda safety-profile mismatch remains controlsMismatch. Already-seen missing, invalid, active/enabled loss and RX/relay faults must retain denial paths.", -"producing_source_snapshot":"9eab5400a44b84f8c96d99b2b43a7b75242caf22", -"intentional_change_commit":"5e92608ab70bf21b0ddd05874a12bccaa0fbdef5", -"hosted_evidence_run":41788199375, -"previous_reviewed_expectation":{ -"segment":"regen218A4DCFAA1|2025-04-08--22-57-51--0", -"process":"selfdrived", -"file":"regen218A4DCFAA1_2025-04-08--22-57-51--0_selfdrived.zst", -"input_sha256":"6c028c0d40328fc00fa12acf91dba30d9f152e89d99a7089aadac62f6c7d5d64", -"input_bytes":10846201, -"official_baseline_commit":"ec95db3f1fa19f76940497fedfdb62e09ea19912", -"official_artifact_commit":"9ae451c262c7402c9623f3baa1580c6242d6777b", -"official_baseline_url":"https://raw.githubusercontent.com/commaai/ci-artifacts/9ae451c262c7402c9623f3baa1580c6242d6777b/regen218A4DCFAA1_2025-04-08--22-57-51--0_selfdrived_ec95db3f1fa19f76940497fedfdb62e09ea19912.zst", -"official_baseline_bytes":29357, -"official_baseline_sha256":"5b28bcc8aa77a544efa59c8f8200b714ed265d8ac965dcc63030c07266f668f4", -"config_sha256":"6e62fd1209b006c6512452b007e65190dc720280d6d976fabf58947e2acc7981", -"car_fingerprint":"TOYOTA_PRIUS", -"bytes":29572, -"sha256":"6cbd17ae9f0dd3d66898c9bd767e1ee705a9f88edef58e41cddd989aaf22f813", -"contract":"Current stock Prius factory safety profile0x6242 does not match the historical Panda report0x242. Preserve controlsMismatch and refuse engagement; no Panda configuration, health, permission or recorded input is rewritten. Current-profile native-positive steering is separately qualified by test_stock_aol parser/native/Controls/Card callers.", -"producing_source_snapshot":"5fc5709e4d54f31dd575e66333271dbb260d5e9b", -"intentional_change_commit":"c6f00f7a4d1f60734897c12f160715a6a49775f2", -"hosted_evidence_run":40521627641 +"segment": "regen218A4DCFAA1|2025-04-08--22-57-51--0", +"process": "selfdrived", +"file": "regen218A4DCFAA1_2025-04-08--22-57-51--0_selfdrived.zst", +"input_sha256": "6c028c0d40328fc00fa12acf91dba30d9f152e89d99a7089aadac62f6c7d5d64", +"input_bytes": 10846201, +"official_baseline_commit": "ec95db3f1fa19f76940497fedfdb62e09ea19912", +"official_artifact_commit": "9ae451c262c7402c9623f3baa1580c6242d6777b", +"official_baseline_url": "https://raw.githubusercontent.com/commaai/ci-artifacts/9ae451c262c7402c9623f3baa1580c6242d6777b/regen218A4DCFAA1_2025-04-08--22-57-51--0_selfdrived_ec95db3f1fa19f76940497fedfdb62e09ea19912.zst", +"official_baseline_bytes": 29357, +"official_baseline_sha256": "5b28bcc8aa77a544efa59c8f8200b714ed265d8ac965dcc63030c07266f668f4", +"config_sha256": "6e62fd1209b006c6512452b007e65190dc720280d6d976fabf58947e2acc7981", +"car_fingerprint": "TOYOTA_PRIUS", +"bytes": 29575, +"sha256": "2dcfa4ed381957f4089fd468665b904ca14a0557ecfe24263d5b845399e092c4", +"contract": "Show the existing initializing status while driving processes become ready. Only selfdriveInitializing.permanent changes from false to true in the first 3 onroadEvents frames. All other compared fields, including activation, refusal, authority and actuator outputs, retain the previously reviewed contract.", +"producing_source_snapshot": "9c8c8361bd9fe701b2811bc7a4d0a304390f4e8c", +"intentional_change_commit": "b14b12fb345453a77e99e4b415d4f0cacf7a8019", +"hosted_evidence_run": 43135995207, +"previous_reviewed_expectation": { +"segment": "regen218A4DCFAA1|2025-04-08--22-57-51--0", +"process": "selfdrived", +"file": "regen218A4DCFAA1_2025-04-08--22-57-51--0_selfdrived.zst", +"input_sha256": "6c028c0d40328fc00fa12acf91dba30d9f152e89d99a7089aadac62f6c7d5d64", +"input_bytes": 10846201, +"official_baseline_commit": "ec95db3f1fa19f76940497fedfdb62e09ea19912", +"official_artifact_commit": "9ae451c262c7402c9623f3baa1580c6242d6777b", +"official_baseline_url": "https://raw.githubusercontent.com/commaai/ci-artifacts/9ae451c262c7402c9623f3baa1580c6242d6777b/regen218A4DCFAA1_2025-04-08--22-57-51--0_selfdrived_ec95db3f1fa19f76940497fedfdb62e09ea19912.zst", +"official_baseline_bytes": 29357, +"official_baseline_sha256": "5b28bcc8aa77a544efa59c8f8200b714ed265d8ac965dcc63030c07266f668f4", +"config_sha256": "6e62fd1209b006c6512452b007e65190dc720280d6d976fabf58947e2acc7981", +"car_fingerprint": "TOYOTA_PRIUS", +"bytes": 29575, +"sha256": "e9606a00a9d8b2342c9b3c7d7f0fe2fb0c2b412a42742a67a049ee5c7c306583", +"contract": "Before the first native authority grant, missing aolSafetyWire is startup commIssue rather than lost-controls mismatch. On this recording 141 event messages change with 1048 full-comparator differences; all 6020 selfdriveState messages remain disabled/inactive. Independent actual Panda safety-profile mismatch remains controlsMismatch. Already-seen missing, invalid, active/enabled loss and RX/relay faults must retain denial paths.", +"producing_source_snapshot": "9eab5400a44b84f8c96d99b2b43a7b75242caf22", +"intentional_change_commit": "5e92608ab70bf21b0ddd05874a12bccaa0fbdef5", +"hosted_evidence_run": 41788199375, +"previous_reviewed_expectation": { +"segment": "regen218A4DCFAA1|2025-04-08--22-57-51--0", +"process": "selfdrived", +"file": "regen218A4DCFAA1_2025-04-08--22-57-51--0_selfdrived.zst", +"input_sha256": "6c028c0d40328fc00fa12acf91dba30d9f152e89d99a7089aadac62f6c7d5d64", +"input_bytes": 10846201, +"official_baseline_commit": "ec95db3f1fa19f76940497fedfdb62e09ea19912", +"official_artifact_commit": "9ae451c262c7402c9623f3baa1580c6242d6777b", +"official_baseline_url": "https://raw.githubusercontent.com/commaai/ci-artifacts/9ae451c262c7402c9623f3baa1580c6242d6777b/regen218A4DCFAA1_2025-04-08--22-57-51--0_selfdrived_ec95db3f1fa19f76940497fedfdb62e09ea19912.zst", +"official_baseline_bytes": 29357, +"official_baseline_sha256": "5b28bcc8aa77a544efa59c8f8200b714ed265d8ac965dcc63030c07266f668f4", +"config_sha256": "6e62fd1209b006c6512452b007e65190dc720280d6d976fabf58947e2acc7981", +"car_fingerprint": "TOYOTA_PRIUS", +"bytes": 29572, +"sha256": "6cbd17ae9f0dd3d66898c9bd767e1ee705a9f88edef58e41cddd989aaf22f813", +"contract": "Current stock Prius factory safety profile0x6242 does not match the historical Panda report0x242. Preserve controlsMismatch and refuse engagement; no Panda configuration, health, permission or recorded input is rewritten. Current-profile native-positive steering is separately qualified by test_stock_aol parser/native/Controls/Card callers.", +"producing_source_snapshot": "5fc5709e4d54f31dd575e66333271dbb260d5e9b", +"intentional_change_commit": "c6f00f7a4d1f60734897c12f160715a6a49775f2", +"hosted_evidence_run": 40521627641 }, -"review_evidence":{ -"review_status":"Independent review accepted this bounded recorded-output contract; the compared behavior and relevant safety invariants are preserved.", -"ci_run":41788199375, -"ci_job":126435125665, -"ci_artifact":13302572790, -"ci_artifact_sha256":"60b02da2ef95f8a20af818e585774fa2e9ab577d4af52d454a5058427f6d173c", -"head":"9eab5400a44b84f8c96d99b2b43a7b75242caf22", -"actual_CI_sha256":"e9606a00a9d8b2342c9b3c7d7f0fe2fb0c2b412a42742a67a049ee5c7c306583", -"comparison_reference_sha256":"6cbd17ae9f0dd3d66898c9bd767e1ee705a9f88edef58e41cddd989aaf22f813", -"difference_count":1048, -"difference_fields":{ -"onroadEvents.2.name":18, -"onroadEvents.2.noEntry":18, -"onroadEvents.2.userDisable":17, -"onroadEvents.2.immediateDisable":16, -"onroadEvents.3.name":74, -"onroadEvents.3.noEntry":74, -"onroadEvents.3.userDisable":74, -"onroadEvents.3.softDisable":16, -"onroadEvents.3.immediateDisable":58, -"onroadEvents.4.name":107, -"onroadEvents.4.noEntry":107, -"onroadEvents.4.userDisable":107, -"onroadEvents.4.softDisable":58, -"onroadEvents.4.immediateDisable":49, -"onroadEvents.5.name":49, -"onroadEvents.5.noEntry":49, -"onroadEvents.5.userDisable":49, -"onroadEvents.5.softDisable":49, -"onroadEvents.1.name":18, -"onroadEvents.1.noEntry":2, -"onroadEvents.1.userDisable":1, -"onroadEvents.1.immediateDisable":18, -"onroadEvents.2.softDisable":2, -"onroadEvents.1.enable":1, -"onroadEvents.2.enable":1, -"onroadEvents.1.softDisable":16 +"review_evidence": { +"review_status": "Independent review accepted this bounded recorded-output contract; the compared behavior and relevant safety invariants are preserved.", +"ci_run": 41788199375, +"ci_job": 126435125665, +"ci_artifact": 13302572790, +"ci_artifact_sha256": "60b02da2ef95f8a20af818e585774fa2e9ab577d4af52d454a5058427f6d173c", +"head": "9eab5400a44b84f8c96d99b2b43a7b75242caf22", +"actual_CI_sha256": "e9606a00a9d8b2342c9b3c7d7f0fe2fb0c2b412a42742a67a049ee5c7c306583", +"comparison_reference_sha256": "6cbd17ae9f0dd3d66898c9bd767e1ee705a9f88edef58e41cddd989aaf22f813", +"difference_count": 1048, +"difference_fields": { +"onroadEvents.2.name": 18, +"onroadEvents.2.noEntry": 18, +"onroadEvents.2.userDisable": 17, +"onroadEvents.2.immediateDisable": 16, +"onroadEvents.3.name": 74, +"onroadEvents.3.noEntry": 74, +"onroadEvents.3.userDisable": 74, +"onroadEvents.3.softDisable": 16, +"onroadEvents.3.immediateDisable": 58, +"onroadEvents.4.name": 107, +"onroadEvents.4.noEntry": 107, +"onroadEvents.4.userDisable": 107, +"onroadEvents.4.softDisable": 58, +"onroadEvents.4.immediateDisable": 49, +"onroadEvents.5.name": 49, +"onroadEvents.5.noEntry": 49, +"onroadEvents.5.userDisable": 49, +"onroadEvents.5.softDisable": 49, +"onroadEvents.1.name": 18, +"onroadEvents.1.noEntry": 2, +"onroadEvents.1.userDisable": 1, +"onroadEvents.1.immediateDisable": 18, +"onroadEvents.2.softDisable": 2, +"onroadEvents.1.enable": 1, +"onroadEvents.2.enable": 1, +"onroadEvents.1.softDisable": 16 }, -"no_new_ignores_or_tolerances":true, -"qualified_capture_source_commit":"baf883200cebccbdade9e4652a92a0bfbe1b5106", -"qualified_capture_sha256":"e9606a00a9d8b2342c9b3c7d7f0fe2fb0c2b412a42742a67a049ee5c7c306583", -"qualification_status":"Bounded semantic qualification and independent review complete. Acceptance does not certify physical tuning, closed-loop calibration, fleet-wide safety, on-device timing, or full CI.", -"method":"Unmodified compressed captured output, copied verbatim. Unchanged current CONFIGS, helper and comparator. Offline all-pair comparison is separate from any full runtime CI claim.", -"producing_vs_qualified_full_comparator_differences":0, -"producing_vs_qualified_unequal_messages_after_original_ignores":0, -"qualification_sha256":"09b4e0c9af4dd14bc05ee37245fd6d9a59f623f7259706ef58a589fc95d7102d", -"raw_evidence_sha256":{ -"noncalibration-REPORT.md":"09b4e0c9af4dd14bc05ee37245fd6d9a59f623f7259706ef58a589fc95d7102d", -"noncalibration-EVIDENCE_SHA256.txt":"179c46345f2e7735582804d76cdbdc637c26aadf8e30c92ceaf789b28351a08a", -"noncalibration-source-manifest.json":"8facaaae2db2d6dba61b081a062482753af08e2560915745d348c6b8d55b5ea4", -"noncalibration-full-pair-exact-equality.json":"540f755ca3454b64c276c9e526d8df7d7f0d63c09b82fc19873dc62e3d8131e9", -"noncalibration-startup-summary.json":"66103ab6bec939c06810512cbe6b0d01de7a6340812dda2b3f6447f7d32e56a0", -"noncalibration-selfdrived-current-summary.json":"ec166632daeeb03dbd010b174372989960c4a8a5c0d4c6ef63638fac11b619f1", -"noncalibration-selfdrived-before-summary.json":"6fdedb04dadbdb5dfc567e75ed8fedc7cd21b799dd20daea49a1539e0b855512", -"noncalibration-startup-tests.txt":"c82de8f8b5f1a0eac8fbb3d4111b3b657b83de042a98950489a6854b6b66c0ae", -"noncalibration-prius-startup-tests.txt":"de265a61e5804eca0ae7292c2268246acd4c736a1b98fdde58cab1cf416d7bff", -"replay-validation-all-66-comparisons.json":"12aa3ac68bf2f4b19024ee299edde8b2d7ac68a003f040f0136554982e7b2a3a", -"replay-validation-seven-exact-qualified-equivalence.json":"e14ce7d3b097e18776962a44253ea2548ff735d0d1a6cdde9c56c8b8873051a1", -"replay-validation-config-signatures.json":"c3ffe84688149f949a285ac3f2f7f79935a0a29e54a7497b5ff040f60a787480", -"replay-validation-verified-inputs.json":"add9252257a7161113c66fd852dbdd3d547d7bf9446223fa922b65bc6d18ebb5", -"independent-bounded-contract-review":"bd87584ae6b879da8b104d4ce490b8dbdb79272518a8f4d7c2ff98dd765be2ce" +"no_new_ignores_or_tolerances": true, +"qualified_capture_source_commit": "baf883200cebccbdade9e4652a92a0bfbe1b5106", +"qualified_capture_sha256": "e9606a00a9d8b2342c9b3c7d7f0fe2fb0c2b412a42742a67a049ee5c7c306583", +"qualification_status": "Bounded semantic qualification and independent review complete. Acceptance does not certify physical tuning, closed-loop calibration, fleet-wide safety, on-device timing, or full CI.", +"method": "Unmodified compressed captured output, copied verbatim. Unchanged current CONFIGS, helper and comparator. Offline all-pair comparison is separate from any full runtime CI claim.", +"producing_vs_qualified_full_comparator_differences": 0, +"producing_vs_qualified_unequal_messages_after_original_ignores": 0, +"qualification_sha256": "09b4e0c9af4dd14bc05ee37245fd6d9a59f623f7259706ef58a589fc95d7102d", +"raw_evidence_sha256": { +"noncalibration-REPORT.md": "09b4e0c9af4dd14bc05ee37245fd6d9a59f623f7259706ef58a589fc95d7102d", +"noncalibration-EVIDENCE_SHA256.txt": "179c46345f2e7735582804d76cdbdc637c26aadf8e30c92ceaf789b28351a08a", +"noncalibration-source-manifest.json": "8facaaae2db2d6dba61b081a062482753af08e2560915745d348c6b8d55b5ea4", +"noncalibration-full-pair-exact-equality.json": "540f755ca3454b64c276c9e526d8df7d7f0d63c09b82fc19873dc62e3d8131e9", +"noncalibration-startup-summary.json": "66103ab6bec939c06810512cbe6b0d01de7a6340812dda2b3f6447f7d32e56a0", +"noncalibration-selfdrived-current-summary.json": "ec166632daeeb03dbd010b174372989960c4a8a5c0d4c6ef63638fac11b619f1", +"noncalibration-selfdrived-before-summary.json": "6fdedb04dadbdb5dfc567e75ed8fedc7cd21b799dd20daea49a1539e0b855512", +"noncalibration-startup-tests.txt": "c82de8f8b5f1a0eac8fbb3d4111b3b657b83de042a98950489a6854b6b66c0ae", +"noncalibration-prius-startup-tests.txt": "de265a61e5804eca0ae7292c2268246acd4c736a1b98fdde58cab1cf416d7bff", +"replay-validation-all-66-comparisons.json": "12aa3ac68bf2f4b19024ee299edde8b2d7ac68a003f040f0136554982e7b2a3a", +"replay-validation-seven-exact-qualified-equivalence.json": "e14ce7d3b097e18776962a44253ea2548ff735d0d1a6cdde9c56c8b8873051a1", +"replay-validation-config-signatures.json": "c3ffe84688149f949a285ac3f2f7f79935a0a29e54a7497b5ff040f60a787480", +"replay-validation-verified-inputs.json": "add9252257a7161113c66fd852dbdd3d547d7bf9446223fa922b65bc6d18ebb5", +"independent-bounded-contract-review": "bd87584ae6b879da8b104d4ce490b8dbdb79272518a8f4d7c2ff98dd765be2ce" }, -"review_method":"Ten full native paired process replays plus source, payload, freshness, native debug/release safety, factory/consumer and startup-denial witnesses. All current outputs reproduce hosted captures, isolated previous behavior restores full prior expectations. Logging-only AF_UNIX emission suppressed; real messaging IPC retained. 225 focused, 7 original startup, 17 Prius/fixture boundary tests pass. Independent review accepted the seven bounded contracts after checking source and output identities, all 66 unchanged comparisons, calibration boundaries, an independent recorded DAW source/freshness oracle, fresh debug/release native admission, actual Prius consumers, and 258 tests. It reviewed but did not rerun all sixteen paired native process replays. Independent review scope excludes physical tuning, closed-loop calibration, fleet-wide safety, on-device timing, and full CI.", -"reviewed_recorded_scope":"No native wire in raw input. Startup-only classification does not grant permission; all replayed state remains disabled/inactive. Independent Panda 0x242 versus current 0x6242 mismatch remains on all 5019 ticks after allowance. Fault/withdrawal boundaries retain controlsMismatch and zero torque." +"review_method": "Ten full native paired process replays plus source, payload, freshness, native debug/release safety, factory/consumer and startup-denial witnesses. All current outputs reproduce hosted captures, isolated previous behavior restores full prior expectations. Logging-only AF_UNIX emission suppressed; real messaging IPC retained. 225 focused, 7 original startup, 17 Prius/fixture boundary tests pass. Independent review accepted the seven bounded contracts after checking source and output identities, all 66 unchanged comparisons, calibration boundaries, an independent recorded DAW source/freshness oracle, fresh debug/release native admission, actual Prius consumers, and 258 tests. It reviewed but did not rerun all sixteen paired native process replays. Independent review scope excludes physical tuning, closed-loop calibration, fleet-wide safety, on-device timing, and full CI.", +"reviewed_recorded_scope": "No native wire in raw input. Startup-only classification does not grant permission; all replayed state remains disabled/inactive. Independent Panda 0x242 versus current 0x6242 mismatch remains on all 5019 ticks after allowance. Fault/withdrawal boundaries retain controlsMismatch and zero torque." +} +}, +"review_evidence": { +"ci_run": 43135995207, +"ci_job": 130911495706, +"ci_artifact": 13907837335, +"head": "9c8c8361bd9fe701b2811bc7a4d0a304390f4e8c", +"actual_CI_sha256": "2dcfa4ed381957f4089fd468665b904ca14a0557ecfe24263d5b845399e092c4", +"comparison_reference_sha256": "e9606a00a9d8b2342c9b3c7d7f0fe2fb0c2b412a42742a67a049ee5c7c306583", +"difference_count": 3, +"differences": [ +{ +"message_index": 1, +"onroad_event_frame": 0, +"event": "selfdriveInitializing", +"field": "onroadEvents.1.permanent", +"from": false, +"to": true +}, +{ +"message_index": 3, +"onroad_event_frame": 1, +"event": "selfdriveInitializing", +"field": "onroadEvents.0.permanent", +"from": false, +"to": true +}, +{ +"message_index": 103, +"onroad_event_frame": 2, +"event": "selfdriveInitializing", +"field": "onroadEvents.0.permanent", +"from": false, +"to": true +} +], +"unchanged_current_comparator_sha256": "fb923cff883974dcdf2d701a0b8484c9d3c4d2192b018ef2d17aeac39dd24202", +"ignored_fields": [ +"logMonoTime" +], +"tolerance": 1e-07, +"other_compared_field_changes": 0, +"no_new_ignores_or_tolerances": true, +"method": "Actual captured CI output copied verbatim after comparing every message and field against the prior reviewed output. Every difference is the named initialization presentation bit from b14b12fb345453a77e99e4b415d4f0cacf7a8019; no actuator or engagement expectations changed." } }, { @@ -1467,6 +1530,62 @@ "source_restored":true } } +, +{ +"segment": "regenAA0FC4ED71E|2025-04-08--22-57-50--0", +"input_sha256": "0b6734026f7c775f7fd648ef76130f9b9a672c5236c6a328eff31ec9cc3c5343", +"input_bytes": 11873030, +"official_baseline_commit": "ec95db3f1fa19f76940497fedfdb62e09ea19912", +"official_artifact_commit": "9ae451c262c7402c9623f3baa1580c6242d6777b", +"car_fingerprint": "HYUNDAI_SONATA", +"process": "selfdrived", +"config_sha256": "6e62fd1209b006c6512452b007e65190dc720280d6d976fabf58947e2acc7981", +"official_baseline_url": "https://raw.githubusercontent.com/commaai/ci-artifacts/9ae451c262c7402c9623f3baa1580c6242d6777b/regenAA0FC4ED71E_2025-04-08--22-57-50--0_selfdrived_ec95db3f1fa19f76940497fedfdb62e09ea19912.zst", +"official_baseline_bytes": 29200, +"official_baseline_sha256": "1e700c6fc07bdbb94d90749a0fcb349bb9eb2a8b66e70559d367803632e5f91b", +"file": "regenAA0FC4ED71E_2025-04-08--22-57-50--0_selfdrived.zst", +"bytes": 29200, +"sha256": "8c1611627c289b246938906926a2e873834d2a69bea7a73df011dca9090f589e", +"producing_source_snapshot": "9c8c8361bd9fe701b2811bc7a4d0a304390f4e8c", +"intentional_change_commit": "b14b12fb345453a77e99e4b415d4f0cacf7a8019", +"hosted_evidence_run": 43135995207, +"contract": "Show the existing initializing status while driving processes become ready. Only selfdriveInitializing.permanent changes from false to true in the first 2 onroadEvents frames. All other compared fields, including activation, refusal, authority and actuator outputs, retain the previously reviewed contract.", +"review_evidence": { +"ci_run": 43135995207, +"ci_job": 130911495706, +"ci_artifact": 13907837335, +"head": "9c8c8361bd9fe701b2811bc7a4d0a304390f4e8c", +"actual_CI_sha256": "8c1611627c289b246938906926a2e873834d2a69bea7a73df011dca9090f589e", +"comparison_reference_sha256": "1e700c6fc07bdbb94d90749a0fcb349bb9eb2a8b66e70559d367803632e5f91b", +"difference_count": 2, +"differences": [ +{ +"message_index": 1, +"onroad_event_frame": 0, +"event": "selfdriveInitializing", +"field": "onroadEvents.1.permanent", +"from": false, +"to": true +}, +{ +"message_index": 3, +"onroad_event_frame": 1, +"event": "selfdriveInitializing", +"field": "onroadEvents.0.permanent", +"from": false, +"to": true +} +], +"unchanged_current_comparator_sha256": "fb923cff883974dcdf2d701a0b8484c9d3c4d2192b018ef2d17aeac39dd24202", +"ignored_fields": [ +"logMonoTime" +], +"tolerance": 1e-07, +"other_compared_field_changes": 0, +"no_new_ignores_or_tolerances": true, +"method": "Actual captured CI output copied verbatim after comparing every message and field against the prior reviewed output. Every difference is the named initialization presentation bit from b14b12fb345453a77e99e4b415d4f0cacf7a8019; no actuator or engagement expectations changed." +} +} ], "source_snapshots":{ "7395-production":{ diff --git a/openpilot/selfdrive/test/process_replay/refs/starpilot/regen218A4DCFAA1_2025-04-08--22-57-51--0_selfdrived.zst b/openpilot/selfdrive/test/process_replay/refs/starpilot/regen218A4DCFAA1_2025-04-08--22-57-51--0_selfdrived.zst index 563433375b..f44d1d87cf 100644 Binary files a/openpilot/selfdrive/test/process_replay/refs/starpilot/regen218A4DCFAA1_2025-04-08--22-57-51--0_selfdrived.zst and b/openpilot/selfdrive/test/process_replay/refs/starpilot/regen218A4DCFAA1_2025-04-08--22-57-51--0_selfdrived.zst differ diff --git a/openpilot/selfdrive/test/process_replay/refs/starpilot/regenAA0FC4ED71E_2025-04-08--22-57-50--0_selfdrived.zst b/openpilot/selfdrive/test/process_replay/refs/starpilot/regenAA0FC4ED71E_2025-04-08--22-57-50--0_selfdrived.zst new file mode 100644 index 0000000000..7900c59793 Binary files /dev/null and b/openpilot/selfdrive/test/process_replay/refs/starpilot/regenAA0FC4ED71E_2025-04-08--22-57-50--0_selfdrived.zst differ diff --git a/openpilot/starpilot/ui/onroad.py b/openpilot/starpilot/ui/onroad.py index e1b761583b..24e87b69c7 100644 --- a/openpilot/starpilot/ui/onroad.py +++ b/openpilot/starpilot/ui/onroad.py @@ -227,10 +227,9 @@ class OnroadView: state.appearance.camera_view == CameraViewChoice.DRIVER or state.reverse_driver_camera): return width, height = widget_size(state.customization, profile, MODE_WIDGET) - if profile == Profile.LARGE: - x, y = position["x"] + center_shift, position["y"] - if slc_action_occludes(profile, state, (x, y, x + width, y + height)): - return + x, y = position["x"] + center_shift, position["y"] + if slc_action_occludes(profile, state, (x, y, x + width, y + height)): + return size = 40 if profile == Profile.LARGE else 18 role = FontRole.SEMI_BOLD lines = [""] @@ -268,11 +267,10 @@ class OnroadView: measured = self.fonts.measure(text, role, size) x = position["x"] + center_shift + (width - measured.width) / 2 y = position["y"] + (height - measured.height) / 2 - if profile == Profile.LARGE: - left, right = self.fonts.horizontal_ink(text, role, size) - top, bottom = self.fonts.vertical_ink(text, role, size) - if slc_action_occludes(profile, state, (x + left, y + top, x + right, y + bottom)): - return + left, right = self.fonts.horizontal_ink(text, role, size) + top, bottom = self.fonts.vertical_ink(text, role, size) + if slc_action_occludes(profile, state, (x + left, y + top, x + right, y + bottom)): + return color = rl.Color(*rgba(state.customization, "text", profile, CLOCK_WIDGET)) offset_px = 2 if profile == Profile.LARGE else 1 self.fonts.draw(text, role, size, x + offset_px, y + offset_px, rl.Color(0, 0, 0, min(color.a, 170))) @@ -282,12 +280,11 @@ class OnroadView: if (not placement(state.customization, self.fonts.profile, 'weather')['enabled'] or state.alert.size != AlertSize.NONE or state.appearance.camera_view == CameraViewChoice.DRIVER or state.reverse_driver_camera): return - if self.fonts.profile == Profile.LARGE: - position = placement(state.customization, self.fonts.profile, 'weather') - width, height = widget_size(state.customization, self.fonts.profile, 'weather') - x, y = position['x'] + center_shift, position['y'] - if slc_action_occludes(self.fonts.profile, state, (x, y, x + width, y + height)): - return + position = placement(state.customization, self.fonts.profile, 'weather') + width, height = widget_size(state.customization, self.fonts.profile, 'weather') + x, y = position['x'] + center_shift, position['y'] + if slc_action_occludes(self.fonts.profile, state, (x, y, x + width, y + height)): + return from openpilot.starpilot.ui.weather import WeatherClient from openpilot.starpilot.ui.onroad_weather import render_weather if not hasattr(self, '_weather_client'): diff --git a/openpilot/starpilot/ui/onroad_dm.py b/openpilot/starpilot/ui/onroad_dm.py index 84b620fcb0..4e3a452407 100644 --- a/openpilot/starpilot/ui/onroad_dm.py +++ b/openpilot/starpilot/ui/onroad_dm.py @@ -49,6 +49,11 @@ def draw_monitor_art(renderer, bounds, profile): def monitor_visible(profile, state, *, fresh, onroad, top_icons, bounds=None): + from openpilot.starpilot.ui.onroad_state import slc_action_occludes + + monitor = bounds if bounds is not None else monitor_bounds(state.customization, profile, state.right_hand_drive) + if slc_action_occludes(profile, state, (monitor.x, monitor.y, monitor.x + monitor.width, monitor.y + monitor.height)): + return False if profile == Profile.COMPACT: occluded = False if profile == Profile.COMPACT and top_icons: @@ -60,11 +65,6 @@ def monitor_visible(profile, state, *, fresh, onroad, top_icons, bounds=None): not occluded and placement(state.customization, profile, 'driver_monitor')['enabled']) - from openpilot.starpilot.ui.onroad_state import slc_action_occludes - - monitor = bounds if bounds is not None else monitor_bounds(state.customization, profile, state.right_hand_drive) - if slc_action_occludes(profile, state, (monitor.x, monitor.y, monitor.x + monitor.width, monitor.y + monitor.height)): - return False occluded = False if profile == Profile.COMPACT and top_icons: speed = placement(state.customization, profile, 'max_speed') diff --git a/openpilot/starpilot/ui/onroad_state.py b/openpilot/starpilot/ui/onroad_state.py index ce410d204d..07ca467c7a 100644 --- a/openpilot/starpilot/ui/onroad_state.py +++ b/openpilot/starpilot/ui/onroad_state.py @@ -347,9 +347,9 @@ def speed_limit_bounds(profile: Profile, state: OnroadState) -> tuple[float, flo x, y, width, height = LIMIT_RECTS[profile] dx, dy = offset(state.customization, profile, widget) bounds = x + dx - 12, y + dy - 12, x + dx + width + 12, y + dy + height + 8 - if profile == Profile.COMPACT and bounds[1] < 12: - shift = 12 - bounds[1] - bounds = bounds[0], bounds[1] + shift, bounds[2], bounds[3] + shift + if profile == Profile.COMPACT and bounds[1] < 12: + shift = 12 - bounds[1] + bounds = bounds[0], bounds[1] + shift, bounds[2], bounds[3] + shift return bounds diff --git a/openpilot/starpilot/ui/speed_limit_widget.py b/openpilot/starpilot/ui/speed_limit_widget.py index e0777df6c5..7bfae94547 100644 --- a/openpilot/starpilot/ui/speed_limit_widget.py +++ b/openpilot/starpilot/ui/speed_limit_widget.py @@ -384,7 +384,7 @@ class SpeedLimitWidget: if not vienna: left, right, a, b = ink(offset_text, FontRole.MEDIUM, offset_size) offset_size *= min(1, 108 / (right - left), 24 / (b - a)) - offset_top = 120 + offset_top = 112 centered(offset_text, FontRole.MEDIUM, offset_size, offset_top, color if vienna else secondary) if shown.limit_in_use: centered('IN USE', FontRole.SEMI_BOLD, 15 if vienna else 22, 98 if vienna else 117, IN_USE) diff --git a/openpilot/starpilot/ui/tests/test_dinish_speed.py b/openpilot/starpilot/ui/tests/test_dinish_speed.py index 77625f9349..c826e56f16 100644 --- a/openpilot/starpilot/ui/tests/test_dinish_speed.py +++ b/openpilot/starpilot/ui/tests/test_dinish_speed.py @@ -133,7 +133,7 @@ def test_large_set_and_limit_share_typography_at_the_saved_position(): @pytest.mark.parametrize('pending', [False, True]) -def test_set_and_slc_match_font_and_baseline_on_both_displays(pending): +def test_set_and_slc_keep_their_profile_specific_typography(pending): from unittest.mock import patch from openpilot.starpilot.ui.onroad_compact_widgets import CompactHudRenderer from openpilot.starpilot.ui.onroad_large_widgets import UnifiedSpeedWidget @@ -164,7 +164,15 @@ def test_set_and_slc_match_font_and_baseline_on_both_displays(pending): if pending: sign = widget.sign if isinstance(widget, UnifiedSpeedWidget) else widget._speed_limit_widget sign.render_confirmation(current) - rows = {row[0]: row for row in calls if row[-1].a == 255} + rows = {row[0]: row for row in calls if row[-1].a > 0 and (row[-1].r, row[-1].g, row[-1].b) not in ((0, 0, 0), (6, 14, 10), (7, 16, 12))} + if profile == Profile.COMPACT: + assert rows['MAX'][1:5] == (FontRole.SEMI_BOLD, 36, 25, 109) + assert rows['140'][1] == FontRole.SET_SPEED + assert rows['140'][3:5] == (17, -4) + assert fonts.measure(*rows['140'][:3]).width <= 128 + assert str(value) in rows and ('OSM' if pending else 'LIMIT') in rows + assert not any('mph' in text or 'km/h' in text for text in rows) + continue for a, b in (('SET', 'OSM' if pending else 'LIMIT'), ('140', str(value))): assert rows[a][1] == rows[b][1] assert rows[a][2] == pytest.approx(rows[b][2]) @@ -232,9 +240,11 @@ def test_status_below_set_has_real_ink_clearance_and_fits_its_widget(): widget.render(rl.Rectangle(30,30,1800,1020), current) else: widget.render_max_speed(current) - rows = [row for row in calls if row[-1].a == 255] + rows = [row for row in calls if row[-1].a > 0 and (row[-1].r, row[-1].g, row[-1].b) not in ((0, 0, 0), (6, 14, 10), (7, 16, 12))] number = next(row for row in rows if row[0] == str(set_speed) and row[1] == FontRole.SET_SPEED) - caption = next(row for row in rows if row[0] == status) + caption = next(row for row in rows if row[0] == (status if profile == Profile.LARGE else 'MAX')) + if profile == Profile.COMPACT: + assert status not in [row[0] for row in rows] bottom = number[4] + fonts.vertical_ink(*number[:3])[1] top = caption[4] + fonts.vertical_ink(*caption[:3])[0] assert top - bottom >= 6, (profile, status, set_speed) @@ -243,13 +253,13 @@ def test_status_below_set_has_real_ink_clearance_and_fits_its_widget(): width, height = widget_size(current.customization, profile, key) assert caption[4] + fonts.vertical_ink(*caption[:3])[1] <= saved['y'] + height - 12 scale = LARGE_SIGN_SCALE if profile == Profile.LARGE else 1 - assert 16 <= caption[2] * profile.font_scale / Profile.COMPACT.font_scale / scale <= 22 + 1e-9 + assert (16 <= caption[2] * profile.font_scale / Profile.COMPACT.font_scale / scale <= 22 + 1e-9) if profile == Profile.LARGE else caption[2] == 36 left, right = fonts.horizontal_ink(*caption[:3]) number_left, number_right = fonts.horizontal_ink(*number[:3]) if profile == Profile.COMPACT: - assert saved['x'] + 8 <= caption[3] + left < caption[3] + right <= saved['x'] + width - 8 - assert caption[3] + (left + right) / 2 == pytest.approx(saved['x'] + width / 2) - assert number[3] + (number_left + number_right) / 2 == pytest.approx(saved['x'] + width / 2) + assert caption[3:5] == (25, 109) + assert number[3:5] == (17, -4) + assert number_right - number_left <= 128 else: assert caption[3] + (left + right) / 2 == pytest.approx(saved['x'] + 92) assert number[3] + (number_left + number_right) / 2 == pytest.approx(saved['x'] + 92) @@ -288,7 +298,7 @@ def test_sign_status_rows_keep_balanced_insets_with_real_fonts(): with patch.object(fonts, 'draw', lambda *args, sink=calls: sink.append(args)): widget.render(current) if variant == 'retained': - assert [call[0] for call in calls if call[-1].a == 255] == ['LIMIT', '100', 'LAST VISION'] + assert [call[0] for call in calls if call[-1].a == 255] == ['LIMIT', '100', 'LAST VISION' if profile == Profile.LARGE else 'VISION'] bounds = speed_limit_bounds(profile, current) assert bounds is not None x, y = bounds[0] + 12, bounds[1] + 12 @@ -535,7 +545,7 @@ def test_preview_sprite_keeps_the_full_confirmation_override_and_set_limited_sig if scene in ('slc_notice', 'slc_pending'): assert (slot['offsetX'], slot['offsetY'], slot['width'], slot['height']) == (-172, -8, 328, 159) else: - assert (slot['offsetX'], slot['offsetY'], slot['width'], slot['height']) == (-12, -12, SIGN_WIDTH+24, SIGN_HEIGHT+20) + assert (slot['offsetX'], slot['offsetY'], slot['width'], slot['height']) == (-12, 12-y, SIGN_WIDTH+24, SIGN_HEIGHT+20) assert np.any(direct[..., 3]), (profile, y, scene) finally: canvas.close() @@ -660,7 +670,6 @@ def test_both_sign_styles_contain_text_and_arrows_at_each_profile_scale(): current = state(observed_ns=10_000_000_000+elapsed) key = 'cruise_limits' if profile == Profile.LARGE else 'speed_limit' current.customization['layouts'][profile][key].update(x=saved_x, y=y) - x = saved_x+230 if profile == Profile.LARGE else saved_x current = replace(current, speed_mps=(posted+offset+direction*2)/3.6, appearance=replace(current.appearance, use_vienna_sign=vienna), speed_limit=replace(current.speed_limit, source=source, speed_limit_mps=posted/3.6, @@ -669,12 +678,15 @@ def test_both_sign_styles_contain_text_and_arrows_at_each_profile_scale(): current = replace(current, speed_limit=replace(current.speed_limit, kind=ObservationKind.STALE, speed_limit_mps=None, pending_speed_limit_mps=None, last_received_speed_limit_mps=posted/3.6, last_received_source=source, last_received_adjusted_limit_mps=(posted+offset)/3.6)) + bounds = speed_limit_bounds(profile, current) + assert bounds is not None + x, y = bounds[0] + 12, bounds[1] + 12 calls = [] with patch.object(fonts, 'draw', lambda *args, sink=calls: sink.append(args)), \ patch.object(widget.shapes, 'arrow') as arrow_draw: widget.render(current) calls = [call for call in calls if call[-1].a == 255] - assert sum(call[0] == (f'LAST {heading}' if retained else heading) for call in calls) == 1, case + assert sum(call[0] == (f'LAST {heading}' if retained and profile == Profile.LARGE else heading) for call in calls) == 1, case assert all(call[0] != 'LIMIT' for call in calls), case ink = [] for text, role, size, left, top, color in calls: @@ -775,7 +787,10 @@ def test_sign_profiles_share_layout_and_keep_aligned_numbers(): for a, b in zip(small_calls[start:], large_calls[start:], strict=True): assert abs(a[2]/small_widget.text_scale-b[2]/large_widget.text_scale) < 1e-9 assert abs((a[3]-320)-(b[3]-318)/LARGE_SIGN_SCALE) <= 1 - assert abs((a[4]-16)-(b[4]-75)/LARGE_SIGN_SCALE) <= 1 + small_bounds = speed_limit_bounds(Profile.COMPACT, current) + large_bounds = speed_limit_bounds(Profile.LARGE, current) + assert small_bounds is not None and large_bounds is not None + assert abs((a[4]-small_bounds[1]-12)-(b[4]-large_bounds[1]-12)/LARGE_SIGN_SCALE) <= 1 assert (a[-1].r, a[-1].g, a[-1].b, a[-1].a) == (b[-1].r, b[-1].g, b[-1].b, b[-1].a) if pending: for widget in (small_widget, large_widget): diff --git a/openpilot/starpilot/ui/tests/test_onroad_customization.py b/openpilot/starpilot/ui/tests/test_onroad_customization.py index 99507181f9..fc0fc8b258 100644 --- a/openpilot/starpilot/ui/tests/test_onroad_customization.py +++ b/openpilot/starpilot/ui/tests/test_onroad_customization.py @@ -637,7 +637,7 @@ def test_compact_drag_keeps_animation_state_and_separate_origins(): with patch.object(hud, "_speed_limit_sign"), patch.object(rl, "draw_circle_gradient"), patch.object(rl, "draw_texture_pro") as wheel: hud.render(state) hud.render(state) - assert foreground_calls(fonts.draw)[-1].args[3:5] == (138, 62.5) + assert foreground_calls(fonts.draw)[-1].args[3:5] == (125, 119) rect = wheel.call_args.args[2] assert (rect.x, rect.y) == (115, 175) alpha = hud._set_speed_alpha.x diff --git a/openpilot/starpilot/ui/tests/test_onroad_parity.py b/openpilot/starpilot/ui/tests/test_onroad_parity.py index 940ade39f9..aa30e221d7 100644 --- a/openpilot/starpilot/ui/tests/test_onroad_parity.py +++ b/openpilot/starpilot/ui/tests/test_onroad_parity.py @@ -189,7 +189,7 @@ def test_valid_vision_limit_has_persistent_sign_without_action_receipt(): renderer._speed_limit_sign(shown) fill.assert_not_called() outline.assert_called_once() - assert outline.call_args.args[:2] == (384, 81) + assert outline.call_args.args[:2] == (384, 90) assert [call.args[0] for call in foreground_calls(fonts.draw)] == ['VISION', '55'] outline.reset_mock() renderer._speed_limit_sign(replace(shown, speed_limit=SpeedLimitObservation(kind=ObservationKind.STALE))) diff --git a/openpilot/starpilot/ui/tests/test_unified_speed_native.py b/openpilot/starpilot/ui/tests/test_unified_speed_native.py index 990ddaa27d..7205954fb7 100644 --- a/openpilot/starpilot/ui/tests/test_unified_speed_native.py +++ b/openpilot/starpilot/ui/tests/test_unified_speed_native.py @@ -123,8 +123,10 @@ def test_set_and_binding_slc_stay_visible_beside_sign_or_prompt(profile, stage): view.compact_hud._speed_limit_sign(current) view._slc_actions(current) texts = [call.args[0] for call in foreground_calls(font.draw)] - assert 'SET' in texts and '35' in texts and not any(text.startswith('SLC ') for text in texts) - assert ('LIMIT 30' in texts) == (stage == 'prompt') + assert ('SET' if profile == Profile.LARGE else 'MAX') in texts and '35' in texts and not any(text.startswith('SLC ') for text in texts) + assert ('LIMIT 30' in texts) == (stage == 'prompt' and profile == Profile.LARGE) + if stage == 'prompt' and profile == Profile.COMPACT: + assert 'NEW LIMIT' in texts assert ('Now: LIMIT 30' in texts) == (stage == 'expanded') assert ('LIMIT' in texts) == (stage in ('live', 'retained')) if pending: @@ -135,7 +137,7 @@ def test_set_and_binding_slc_stay_visible_beside_sign_or_prompt(profile, stage): @pytest.mark.parametrize('gap', [False, True]) -def test_compact_set_stays_visible_while_the_accepted_limit_is_restricted(gap, drawing): +def test_compact_max_fades_while_the_restricted_limit_keeps_its_warning(gap, drawing): current = state(cruise_kph=45, drive_frame=1) current = replace(current, speed_limit=replace(current.speed_limit, source='dashboard', speed_limit_mps=55 / 3.6, accepted_source='dashboard', accepted_speed_limit_mps=55 / 3.6, accepted_adjusted_limit_mps=55 / 3.6, @@ -146,10 +148,10 @@ def test_compact_set_stays_visible_while_the_accepted_limit_is_restricted(gap, d source='unknown', speed_limit_mps=None)) font = fonts(Profile.COMPACT) hud = CompactHudRenderer(font, Mock()) - for elapsed in range(0, 5_000_000_000, 100_000_000): + for elapsed in range(0, 6_000_000_000, 100_000_000): hud.render_max_speed(replace(current, observed_ns=current.observed_ns + elapsed)) - assert foreground_calls(font.draw)[-1].args[-1].a >= 250 - assert {call.args[0] for call in foreground_calls(font.draw)} == {'SET', '45'} + assert hud._set_speed_alpha.x < .01 + assert {call.args[0] for call in foreground_calls(font.draw)} == {'MAX', '45'} font.draw.reset_mock() hud._speed_limit_sign(current) assert [call.args[0] for call in foreground_calls(font.draw)] == ['LIMIT', '55', 'SET IS LOW', 'RAISE SET'] @@ -291,7 +293,7 @@ def test_regular_sign_keeps_the_outlined_arrow(profile, vienna, recovering, draw speed_limit=replace(current.speed_limit, decision_id=0, sign_recovering=recovering)) font = fonts(profile) SpeedLimitWidget(font, profile).render(current) - assert foreground_calls(font.draw)[0].args[0] == ('LAST OSM' if recovering else 'OSM') + assert foreground_calls(font.draw)[0].args[0] == ('LAST OSM' if recovering and profile == Profile.LARGE else 'OSM') assert drawing['arrow'].call_args.args[0] == 'compact' @@ -364,14 +366,14 @@ def test_override_sign_uses_cluster_target_and_restores_normal_sign(profile, vie font.draw.reset_mock() sign.render(overridden) rows = [call.args for call in foreground_calls(font.draw)] - assert [row[0] for row in rows] == (['Override', '128', 'LAST OSM', '100'] if retained else ['Override', '128', 'OSM 100']) + assert [row[0] for row in rows] == (['Override', '128', 'LAST OSM', '100'] if retained and profile == Profile.LARGE else ['Override', '128', 'OSM 100']) assert rows[1][2] > rows[-1][2] for first, second in zip(rows, rows[1:], strict=False): assert first[4] + font.vertical_ink(*first[:3])[1] <= second[4] + font.vertical_ink(*second[:3])[0] + 1 drawing['outline'].assert_called() font.draw.reset_mock() sign.render(current) - assert foreground_calls(font.draw)[0].args[0] == ('LAST OSM' if retained else 'OSM') + assert foreground_calls(font.draw)[0].args[0] == ('LAST OSM' if retained and profile == Profile.LARGE else 'OSM') drawing['circle' if vienna else 'outline'].assert_called() @@ -391,7 +393,10 @@ def test_retained_limits_keep_original_source_and_have_no_actions(profile, vienn font = fonts(profile) render_sign(SpeedLimitWidget(font, profile), current) texts = [call.args[0] for call in foreground_calls(font.draw)] - assert texts.count(heading) == 1 + expected_heading = heading if profile == Profile.LARGE else heading.removeprefix('LAST ').replace('LAST', 'SPEED') + assert texts.count(expected_heading) == 1 + if profile == Profile.COMPACT: + assert not any(text.startswith('LAST') for text in texts) assert ('50' if latest_received else '40') in texts drawing['arrow'].assert_not_called() assert slc_controls(profile, current) == () @@ -405,7 +410,7 @@ def test_retained_sign_has_no_proposal_arrow_when_actions_are_hidden(profile, dr last_received_speed_limit_mps=50 / 3.6, last_received_source='map') font = fonts(profile) render_sign(SpeedLimitWidget(font, profile), replace(current, speed_limit=observation)) - assert foreground_calls(font.draw)[0].args[0] == 'LAST OSM' + assert foreground_calls(font.draw)[0].args[0] == ('LAST OSM' if profile == Profile.LARGE else 'OSM') drawing['arrow'].assert_not_called() @@ -434,7 +439,7 @@ def test_compact_set_speed_stays_visible_during_confirmation_then_fades(): assert alpha < .01 -def test_compact_set_stays_visible_when_pedal_status_moves_into_the_sign(): +def test_compact_max_fades_while_pedal_status_remains_in_the_sign(): font = fonts(Profile.COMPACT) renderer = CompactHudRenderer(font, Mock()) current = state(drive_frame=1, longitudinal_overridden=True) @@ -442,15 +447,15 @@ def test_compact_set_stays_visible_when_pedal_status_moves_into_the_sign(): driver_override_active=True, override_basis='pedal', limiting_max_set=False)) for now in range(10_000_000_000, 20_000_000_000, 100_000_000): renderer.render_max_speed(replace(current, observed_ns=now)) - assert renderer._set_speed_alpha.x > .99 - assert 'SET' in [call.args[0] for call in foreground_calls(font.draw)] + assert renderer._set_speed_alpha.x < .01 + assert 'MAX' in [call.args[0] for call in foreground_calls(font.draw)] assert 'PEDAL' not in [call.args[0] for call in foreground_calls(font.draw)] font.draw.reset_mock() renderer._speed_limit_sign(current) assert 'Pedal' in [call.args[0] for call in foreground_calls(font.draw)] -def test_compact_set_keeps_dinish_number_and_has_no_backplate(drawing): +def test_compact_max_restores_dinish_number_label_position_and_gradient(drawing): from openpilot.starpilot.ui.presentation import font_filename font = fonts(Profile.COMPACT) hud = CompactHudRenderer(font, Mock()) @@ -459,12 +464,12 @@ def test_compact_set_keeps_dinish_number_and_has_no_backplate(drawing): hud.render_max_speed(current) hud.render_max_speed(replace(current, observed_ns=current.observed_ns + 20_000_000)) assert [(call.args[0], call.args[1]) for call in foreground_calls(font.draw)] == [ - ('SET', FontRole.SEMI_BOLD), ('80', FontRole.SET_SPEED)] + ('80', FontRole.SET_SPEED), ('MAX', FontRole.SEMI_BOLD)] assert font_filename(Profile.COMPACT, FontRole.SET_SPEED) == 'DINish-Speed.fnt' - number = foreground_calls(font.draw)[1].args - top, bottom = font.vertical_ink(*number[:3]) - assert number[4] + (top + bottom) / 2 == 77 - drawing['draw_circle_gradient'].assert_not_called() + number, label = (call.args for call in foreground_calls(font.draw)) + assert number[2:5] == (112, 17, -4) + assert label[2:5] == (36, 25, 109) + drawing['draw_circle_gradient'].assert_called() @pytest.mark.parametrize('metric', [False, True]) diff --git a/prebuilt.json b/prebuilt.json index 457a312d0d..ff4bd3b6d7 100644 --- a/prebuilt.json +++ b/prebuilt.json @@ -1 +1 @@ -{"protected_inventory_sha256": "9cfb810c7b4ae391c5f8e202be180c67d288ecc97bbafbdeea7ed27551cc0134", "schema_version": 1} +{"protected_inventory_sha256": "0a8fbe94bec0dcc6cd54378768f6abda7f6a2e34a9a43c088a02f2afcdfc33ad", "schema_version": 1}