No Dev Blocking

This commit is contained in:
firestar5683
2026-03-27 23:26:40 -05:00
parent d36b9402d9
commit 8fafa6e8d4
41 changed files with 23 additions and 24 deletions
+7 -2
View File
@@ -127,6 +127,12 @@ def _get_gm_stored_candidate_fallback(fingerprints: dict[int, dict], stored_cand
return None
def _apply_starpilot_access_policy(candidate: str, starpilot_toggles: SimpleNamespace | None) -> str:
# Branch-based dashcam gating was removed. Keep the resolved candidate even if
# an older serialized toggle payload still contains block_user=True.
return candidate
def can_fingerprint(can_recv: CanRecvCallable) -> tuple[str | None, dict[int, dict]]:
finger = gen_empty_fingerprint()
candidate_cars = {i: all_legacy_fingerprint_cars() for i in [0, 1]} # attempt fingerprint on both bus 0 and 1
@@ -274,8 +280,7 @@ def get_car(can_recv: CanRecvCallable, can_send: CanSendCallable, set_obd_multip
params.put_nonblocking("CarMake", candidate.split('_')[0].title())
params.put_nonblocking("CarModel", str(candidate))
if starpilot_toggles.block_user:
candidate = "MOCK"
candidate = _apply_starpilot_access_policy(candidate, starpilot_toggles)
# Legacy branch migration guard: normalize stale platform names from any source
# (forced params, cached CarParams, fixed fingerprint env) before interface lookup.
@@ -1,6 +1,8 @@
from types import SimpleNamespace
import pytest
from opendbc.car.can_definitions import CanData
from opendbc.car.car_helpers import FRAME_FINGERPRINT, _get_gm_stored_candidate_fallback, can_fingerprint
from opendbc.car.car_helpers import FRAME_FINGERPRINT, _apply_starpilot_access_policy, _get_gm_stored_candidate_fallback, can_fingerprint
from opendbc.car.fingerprints import _FINGERPRINTS as FINGERPRINTS
@@ -74,3 +76,8 @@ class TestCanFingerprint:
candidate = _get_gm_stored_candidate_fallback(fingerprints, "CHEVROLET_VOLT_CC", "CHEVROLET_VOLT_CC")
assert candidate is None
def test_starpilot_access_policy_ignores_stale_block_user_toggle(self):
candidate = _apply_starpilot_access_policy("CHEVROLET_VOLT_CC", SimpleNamespace(block_user=True))
assert candidate == "CHEVROLET_VOLT_CC"
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -1,2 +1,2 @@
extern const uint8_t gitversion[19];
const uint8_t gitversion[19] = "DEV-74113197-DEBUG";
const uint8_t gitversion[19] = "DEV-a97a59be-DEBUG";
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -1 +1 @@
DEV-74113197-DEBUG
DEV-a97a59be-DEBUG
-5
View File
@@ -4,7 +4,6 @@ import time
import threading
import cereal.messaging as messaging
import openpilot.system.sentry as sentry
from cereal import car, custom, log
from msgq.visionipc import VisionIpcClient, VisionStreamType
@@ -167,10 +166,6 @@ class SelfdriveD:
self.FPCP = messaging.log_from_bytes(self.params.get("StarPilotCarParams", block=True), custom.StarPilotCarParams)
if self.starpilot_toggles.block_user:
self.startup_event = StarPilotEventName.blockUser
sentry.capture_block()
def update_events(self, CS):
"""Compute onroadEvents from carState"""
@@ -62,11 +62,6 @@ SoftwarePanel::SoftwarePanel(QWidget* parent) : ListWidget(parent) {
auto current = params.get("GitBranch");
QStringList branches = QString::fromStdString(params.get("UpdaterAvailableBranches")).split(",");
if (!isFrogsGoMoo()) {
for (int i = branches.size() - 1; i >= 0; --i) {
if (branches[i].startsWith("StarPilot-Development", Qt::CaseInsensitive)) {
branches.removeAt(i);
}
}
branches.removeAll("StarPilot-Vetting");
branches.removeAll("MAKE-PRS-HERE");
}
BIN
View File
Binary file not shown.
+1 -1
View File
@@ -80,7 +80,7 @@ def install_starpilot(build_metadata, params):
update_boot_logo(starpilot=True, selected_logo=params.get("BootLogo"))
if build_metadata.channel == "StarPilot-Development" and is_FrogsGoMoo():
if is_FrogsGoMoo():
mount_options = run_cmd(["findmnt", "-n", "-o", "OPTIONS", "/persist"], "Successfully retrieved mount options", "Failed to retrieve mount options")
run_cmd(["sudo", "mount", "-o", "remount,rw", "/persist"], "Successfully remounted /persist as read-write", "Failed to remount /persist")
run_cmd(["sudo", "python3", FROGS_GO_MOO_PATH], "Successfully ran frogsgomoo.py", "Failed to run frogsgomoo.py")
+2 -3
View File
@@ -288,14 +288,14 @@ class StarPilotVariables:
self.tuning_levels = {key.decode(): self.params.get_tuning_level(key) for key in self.params.all_keys()}
branch = get_build_metadata().channel
self.development_branch = branch == "StarPilot-Development"
self.release_branch = branch == "StarPilot"
self.staging_branch = branch == "StarPilot-Staging"
self.testing_branch = branch == "StarPilot-Testing"
self.vetting_branch = branch == "StarPilot-Vetting"
self.frogs_go_moo = FROGS_GO_MOO_PATH.is_file()
toggle.block_user = (self.development_branch or branch == "MAKE-PRS-HERE" or self.vetting_branch) and not self.frogs_go_moo
# Development/vetting branches are no longer gated into dashcam mode.
toggle.block_user = False
toggle.tuning_level = self.params.get("TuningLevel") if self.params.get_bool("TuningLevelConfirmed") else TUNING_LEVELS["ADVANCED"]
@@ -306,7 +306,6 @@ class StarPilotVariables:
toggle.use_higher_bitrate &= self.get_value("NoUploads")
toggle.use_higher_bitrate &= not self.get_value("DisableOnroadUploads")
toggle.use_higher_bitrate &= not self.vetting_branch
toggle.use_higher_bitrate |= self.development_branch
HD_PATH.parent.mkdir(parents=True, exist_ok=True)
if not HD_PATH.is_file() and toggle.use_higher_bitrate:
+1 -1
View File
@@ -224,7 +224,7 @@ def send_stats():
.tag("branch", build_metadata.channel)
.tag("dongle_id", stats_dongle_id)
.field("blocked_user", starpilot_toggles.block_user)
.field("blocked_user", False)
.field("current_months_kilometers", int(starpilot_stats.get("CurrentMonthsKilometers", 0)))
.field("event", 1)
.field("starpilot_drives", int(starpilot_stats.get("StarPilotDrives", 0)))
+2 -4
View File
@@ -3541,11 +3541,9 @@ def setup(app):
build_metadata = get_build_metadata()
short_branch = build_metadata.channel
if short_branch == "StarPilot-Development":
env = "Development"
elif build_metadata.release_channel:
if build_metadata.release_channel:
env = "Release"
elif short_branch == "StarPilot-Testing":
elif short_branch in ("StarPilot-Development", "StarPilot-Testing"):
env = "Testing"
elif build_metadata.tested_channel:
env = "Staging"