Merge origin/feature/N7Web into feature/N7Web

Integrate the remote firmware workbench, OTA delivery, and timed mode schedules while preserving the local N7 scene and runtime changes.
This commit is contained in:
Miayui
2026-09-17 12:46:51 +08:00
135 changed files with 30180 additions and 513 deletions
@@ -15,6 +15,7 @@ from cognitive_agent.application.codex_assistant import (
CodexAssistantService,
CodexVehicleToolError,
)
from cognitive_agent.application.mode_profile import ModeProfileRegistry
from cognitive_agent.application.seat_service import SeatDemoService
ROOT = Path(__file__).resolve().parents[2]
@@ -472,6 +473,10 @@ def vehicle_service(
os.environ["COGNITIVE_AGENT_DRIVER_SEAT_MEMORY_PATH"] = str(memory_path)
service = SeatDemoService(ROOT)
service.artifact_root = Path(tmp_path_factory.mktemp("assistant-matrix-runs"))
service.mode_profiles = ModeProfileRegistry(
ROOT / "config" / "modes",
user_root=Path(tmp_path_factory.mktemp("assistant-matrix-modes")),
)
yield service
service.close()
if previous_memory_path is None:
@@ -715,9 +720,16 @@ def test_every_catalog_mode_rejects_incompatible_explicit_seat_scopes(
for mode_index, mode in enumerate(modes):
assert isinstance(mode, Mapping)
profile = vehicle_service.mode_profiles.get_profile(str(mode["id"]), "denza_n7")
has_driver = any(
operation.domain == "seat" and operation.target_scope in {"driver", "front_left"}
for operation in profile.operations
)
for scope_index, scope in enumerate(
("主驾", "驾驶员", "后排", "二排", "前排", "所有座椅", "全车座椅")
):
if has_driver and scope in {"主驾", "驾驶员"}:
continue # Valid dual-seat subsets have a separate exact-action matrix.
message = f"请让{scope}进入{mode['name']}"
result = vehicle_service.preview_native_can(
message,
@@ -754,7 +766,7 @@ def test_every_catalog_mode_rejects_incompatible_explicit_seat_scopes(
def test_preview_and_process_share_mode_target_safety_gate(
vehicle_service: SeatDemoService,
) -> None:
message = "主驾开启小憩模式"
message = "主驾开启零重力模式"
direct = vehicle_service.process(
message,
provider="local",