feat: implement scan terminal dashboard system and supporting services

This commit is contained in:
2569718930@qq.com
2026-05-28 08:24:50 +08:00
parent 725727d763
commit 5d784f78b9
27 changed files with 263 additions and 961 deletions
+10 -1
View File
@@ -6,6 +6,16 @@ from web.scan_terminal_payloads import (
build_stale_scan_terminal_payload,
)
from web.scan_terminal_ranker import build_ranked_scan_terminal_result
from web.routers.scan import router as scan_router
def test_scan_router_does_not_expose_terminal_ai_endpoint():
routes = {
getattr(route, "path", None): getattr(route, "methods", set())
for route in scan_router.routes
}
assert "/api/scan/terminal/ai" not in routes
def test_normalize_scan_terminal_filters_clamps_and_swaps_bounds():
@@ -149,4 +159,3 @@ def test_metar_gate_vetoes_yes_when_observed_breaks_above_bucket():
assert row["ai_decision"] == "veto"
assert "越过目标桶上沿" in row["ai_reason_zh"]