Parcourir la source

Release 0.8.1.8: default RMT/AMT/MT enabled, StageIntentStore overwrite, Web/Qt dual control & testcase selection, chamber temp separation

XJKJ STL il y a 1 mois
Parent
commit
eeb9eb897f

+ 1 - 1
VERSION

@@ -1 +1 @@
-0.8.1.7
+0.8.1.8

+ 1 - 1
config/station0-live.json

@@ -84,7 +84,7 @@
       "run_amt": true,
       "run_mt": true,
       "stage1_commands": [],
-      "mt_command": "MemTest86SiteX64.efi",
+      "mt_command": "FS0:\\EFI\\118.efi",
       "required_artifact_kinds": [
         "memtest_html"
       ],

+ 1 - 1
docs/GRPC_API_ZH.md

@@ -1,4 +1,4 @@
-# XJKJ-STL 0.8.1.7:原生 gRPC 专用接口手册
+# XJKJ-STL 0.8.1.8:原生 gRPC 专用接口手册
 
 **只开发原生 gRPC 客户端,请只看这份;Qt 前端精简纯净版 WebSocket 对接请看 [QT_CLIENT_API_ZH.md](QT_CLIENT_API_ZH.md)。** 直接使用 `stl.v1.BenchService` 和 protobuf 消息;没有 WebSocket 风格的 JSON 请求 id,但控制动作仍需要持久 command_id。
 

Fichier diff supprimé car celui-ci est trop grand
+ 22 - 9
docs/QT_CLIENT_API_ZH.md


+ 1 - 1
docs/WEBSOCKET_API_ZH.md

@@ -1,4 +1,4 @@
-# XJKJ-STL 0.8.1.7:完整 WebSocket 接口手册
+# XJKJ-STL 0.8.1.8:完整 WebSocket 接口手册
 
 **Qt 前端精简纯净版对接请看 [QT_CLIENT_API_ZH.md](QT_CLIENT_API_ZH.md)(地址:`ws://192.168.2.79:8080/ws?view=qt-clean`)。** 本文是 `/ws`(或 `/ws?view=full`)的全部业务和诊断接口。后端同时支持三个接口:完整 WebSocket(`/ws`)、完整原生 gRPC(`:50051`)、Qt 专用精简纯净 WebSocket(`/ws?view=qt-clean`)。
 

+ 1 - 1
pyproject.toml

@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
 
 [project]
 name = "xjkj-stl-backend"
-version = "0.8.1.7"
+version = "0.8.1.8"
 description = "Four-station memory thermal test backend with WebSocket and gRPC"
 readme = "README.md"
 requires-python = ">=3.11"

Fichier diff supprimé car celui-ci est trop grand
+ 2 - 2
qt-client/QT_CLEAN_CLIENT_ZH.md


+ 11 - 7
qt-client/config.json

@@ -23,18 +23,22 @@
     "url": "ws://192.168.2.79:8080/ws?view=qt-clean"
   },
   "qtPlan": {
-    "run_rmt": false,
-    "run_amt": false,
+    "run_rmt": true,
+    "run_amt": true,
     "run_mt": true,
     "uip": {
       "action": "continue_uip",
-      "run_rmt": false,
+      "run_rmt": true,
       "apply_memory_params": false
     },
     "amt": {
-      "action": "skip_amt",
-      "run_amt": false,
-      "test_command": "amemdiag 1"
+      "action": "start_amt",
+      "run_amt": true,
+      "exit_after": true,
+      "test_command": "amemdiag 1",
+      "settings": {
+        "test_command": "amemdiag 1"
+      }
     },
     "uefi": {
       "action": "start_mt",
@@ -44,5 +48,5 @@
       }
     }
   },
-  "_qt_note": "Qt 纯净临时版:计划保存在本机 qt-plans.json。run_rmt / run_amt / run_mt 均为可选项(默认 run_rmt=false、run_amt=false、run_mt=true);AMT 开启时默认执行 amemdiag 1;MT 开启时在 UEFI Shell 阶段默认依次发送 fs0:、cd EFI、118.efi。"
+  "_qt_note": "Qt 纯净临时版:计划保存在本机 qt-plans.json。run_rmt / run_amt / run_mt 均为可选项布尔开关(默认全部开启:run_rmt=true、run_amt=true、run_mt=true);AMT 开启时默认执行 amemdiag 1(默认不自动跳过任何算法);MT 开启时在 UEFI Shell 阶段默认依次发送 fs0:、cd EFI、118.efi(默认不自动跳过任何测试项,完成后退回 FS0:\\EFI> 且不自动关机)。"
 }

+ 7 - 3
qt-client/src/backendlink.cpp

@@ -291,11 +291,14 @@ void BackendLink::advancePlan(int station)
     if (stage == QStringLiteral("uip1") || stage == QStringLiteral("uip2") || stage == QStringLiteral("uip")) {
         const QJsonObject uip = run.plan.value(QStringLiteral("uip")).toObject();
         const QJsonObject memParams = run.plan.value(QStringLiteral("memory_params")).toObject();
+        const bool defaultRunRmt = !uip.contains(QStringLiteral("action"))
+                                   || uip.contains(QStringLiteral("run_rmt"))
+                                   || run.plan.contains(QStringLiteral("run_rmt"));
         const bool runRmt = run.plan.value(QStringLiteral("run_rmt")).toBool(
             run.plan.value(QStringLiteral("rmt")).toBool(
                 uip.value(QStringLiteral("run_rmt")).toBool(
                     memParams.value(QStringLiteral("run_rmt")).toBool(
-                        memParams.value(QStringLiteral("rmt")).toBool(false)))));
+                        memParams.value(QStringLiteral("rmt")).toBool(defaultRunRmt)))));
         action = uip.value(QStringLiteral("action")).toString(QStringLiteral("continue_uip"));
         if (stage != QStringLiteral("uip2")) {
             params.insert(QStringLiteral("run_rmt"), runRmt);
@@ -305,12 +308,13 @@ void BackendLink::advancePlan(int station)
     } else if (stage == QStringLiteral("amt")) {
         const QJsonObject amt = run.plan.value(QStringLiteral("amt")).toObject();
         const QJsonObject memParams = run.plan.value(QStringLiteral("memory_params")).toObject();
+        const QString amtAction = amt.value(QStringLiteral("action")).toString();
+        const bool defaultRunAmt = amtAction.isEmpty() ? true : (amtAction == QStringLiteral("start_amt"));
         const bool runAmt = run.plan.value(QStringLiteral("run_amt")).toBool(
             run.plan.value(QStringLiteral("amt")).toBool(
                 amt.value(QStringLiteral("run_amt")).toBool(
                     memParams.value(QStringLiteral("run_amt")).toBool(
-                        memParams.value(QStringLiteral("amt")).toBool(
-                            amt.value(QStringLiteral("action")).toString() == QStringLiteral("start_amt"))))));
+                        memParams.value(QStringLiteral("amt")).toBool(defaultRunAmt)))));
         action = runAmt ? QStringLiteral("start_amt")
                         : amt.value(QStringLiteral("action")).toString(QStringLiteral("skip_amt"));
         if (action == QStringLiteral("start_amt") && run.amtStartedCpus.contains(input.value(QStringLiteral("cpu")).toInt())) {

+ 1 - 1
src/stl_backend/__init__.py

@@ -1,3 +1,3 @@
 """XJKJ-STL memory thermal testing backend."""
-__version__ = "0.8.1.7"
+__version__ = "0.8.1.8"
 

+ 14 - 5
src/stl_backend/application/qt_clean.py

@@ -823,8 +823,9 @@ class QtCleanService:
             if _COMMAND_ERROR.search(output):
                 result["confirmation"] = "rejected"
                 raise BenchError("FAILED_PRECONDITION", "EFI 程序启动返回错误:" + output[-600:])
-            only_mt = (mt or {}).get("only_tests") or []
-            skip_mt = (mt or {}).get("skip_tests") or []
+            saved_mt = self.bench.control_settings.load(context["station_id"]).get("firmware_settings", {}).get("mt_selection", {})
+            only_mt = (mt or {}).get("only_tests") if (mt and "only_tests" in mt) else (saved_mt.get("only_tests") or [])
+            skip_mt = (mt or {}).get("skip_tests") if (mt and "skip_tests" in mt) else (saved_mt.get("skip_tests") or [])
             if only_mt or skip_mt:
                 all_mt = set(range(0, 14))
                 skip_set = (all_mt - {int(x) for x in only_mt if 0 <= int(x) <= 13}) if only_mt else {int(x) for x in skip_mt if 0 <= int(x) <= 13}
@@ -984,7 +985,14 @@ class QtCleanService:
             self.consumed.add((node, action))  # Never automatically replay an ambiguous device write.
         try:
             if action in ("continue_uip", "apply_uip"):
-                rows = memory_overrides(request["memory_params"], run_rmt=request.get("run_rmt"))
+                eff_rmt = request.get("run_rmt")
+                if eff_rmt is None and not ({"rmt", "run_rmt"} & set(request["memory_params"])):
+                    saved_fw = self.bench.control_settings.load(sid).get("firmware_settings", {})
+                    for ov in saved_fw.get("uip_overrides", []):
+                        if ov.get("id") == "rmt" and ov.get("mode") == "override":
+                            eff_rmt = (ov.get("value") == "enable")
+                            break
+                rows = memory_overrides(request["memory_params"], run_rmt=eff_rmt)
                 if rows:
                     applied = await self.bench.controls.apply_uip_parameters({**context, "overrides": rows, "raw_commands": []})
                     require(all(row.get("prompt_observed") for row in applied.get("responses", [])),
@@ -997,8 +1005,9 @@ class QtCleanService:
                 raw_amt = request.get("amt") if isinstance(request.get("amt"), dict) else {}
                 test_cmd = raw_amt.get("test_command") or DEFAULT_AMT_TEST_COMMAND
                 settings = normalize_amt_settings({"action": "run", "overrides": [], "raw_commands": [], "test_command": test_cmd})
-                only_tests = raw_amt.get("only_tests") or []
-                skip_tests = raw_amt.get("skip_tests") or []
+                saved_amt = self.bench.control_settings.load(sid).get("amt_settings", {})
+                only_tests = raw_amt.get("only_tests") if "only_tests" in raw_amt else (saved_amt.get("only_tests") or [])
+                skip_tests = raw_amt.get("skip_tests") if "skip_tests" in raw_amt else (saved_amt.get("skip_tests") or [])
                 if raw_amt.get("fast_debug") is True:
                     fast_cmds = ["algomask", "offset", "channelmask", "loglevel", "tp", "ref", settings["test_command"]]
                     result = await self.bench.controls._send_amt(context, fast_cmds, "start")

+ 5 - 5
src/stl_backend/domain/stage_intents.py

@@ -27,16 +27,16 @@ def default_stage_intents() -> dict:
             "pending": False,
             "consumed": False,
             "action": "continue_uip",
-            "run_rmt": None,
+            "run_rmt": True,
             "memory_params": {},
             "revision": 0,
         },
         "amt": {
             "pending": False,
             "consumed": False,
-            "action": "skip_amt",
-            "run_amt": False,
-            "amt": {},
+            "action": "start_amt",
+            "run_amt": True,
+            "amt": {"test_command": "amemdiag 1"},
             "revision": 0,
         },
         "mt": {
@@ -44,7 +44,7 @@ def default_stage_intents() -> dict:
             "consumed": False,
             "action": "start_mt",
             "run_mt": True,
-            "mt": {},
+            "mt": {"efi_path": "FS0:\\EFI\\118.efi"},
             "revision": 0,
         },
     }