feat(n7web): sync N7 scene cards and optimize runtime

This commit is contained in:
Miayui
2026-09-17 11:04:05 +08:00
parent 75ce391312
commit 7d196db02b
31 changed files with 2924 additions and 126 deletions
+14 -1
View File
@@ -40,7 +40,20 @@ def validate_semantics(
for index, deferred in enumerate(parsed.get("deferred_requests", [])):
domain = str(deferred.get("domain"))
capability = str(deferred.get("capability"))
if domain not in detected_domains or not capability.startswith(f"{domain}."):
# An N7-synchronised scene may use a vehicle-owned capability namespace
# that intentionally differs from its routing domain (for example
# ``domain=local_vehicle`` with ``capability=local_scene.seat_preset``).
# It is not executed by this validator's local backend: the original
# action is forwarded unchanged to ``transto_n7/ctl``. Keep the strict
# namespace check for every ordinary deferred request, while allowing
# this explicitly marked transfer backend to retain the source contract.
n7_transfer = (
deferred.get("execution_backend") == "n7_vehicle_transfer"
and deferred.get("rejection_code") == "PC_CAPABILITY_UNAVAILABLE"
)
if domain not in detected_domains or (
not n7_transfer and not capability.startswith(f"{domain}.")
):
issues.append(
{
"severity": "error",