Преглед изворни кода

生命周期回归:适配新 Context handle 的脚本模型阶段流程

更新 Phase1 与 Phase2/3 fake scripted runner,使其读取受保护 semantic source/evidence handle 而非物理 Artifact ref。保留真实 Planner、Worker、Validator Trace和Prompt digest断言,确保新上下文协议贯穿完整离线生命周期。
SamLee пре 16 часа
родитељ
комит
856b719354

+ 2 - 2
script_build_host/tests/test_phase_one_e2e.py

@@ -264,7 +264,7 @@ class _ScriptedLLM:
         spec = prompt["task_spec"]
         last = _last_tool_json(messages)
         if "search_script_decode_case" in names:
-            if last is None or "artifact_ref" not in last:
+            if last is None or not last.get("submitted"):
                 self.decode_versions.append(spec["version"])
                 return self.call(
                     "search_script_decode_case",
@@ -274,7 +274,7 @@ class _ScriptedLLM:
                 "submit_attempt",
                 {},
             )
-        if last is None or "artifact_ref" not in last:
+        if last is None or "direction_handle" not in last:
             accepted = prompt["role_context"]["accepted_inputs"]
             return self.call(
                 "save_direction_candidate",

+ 2 - 2
script_build_host/tests/test_phase_two_real_runner_e2e.py

@@ -683,14 +683,14 @@ class _PhaseTwoScriptedLLM:
             self.worker_kinds.append(kind)
         last = _last_tool_value(messages)
         if kind == "decode-retrieval":
-            if not isinstance(last, dict) or "artifact_ref" not in last:
+            if not isinstance(last, dict) or not last.get("submitted"):
                 return self._call(
                     "search_script_decode_case",
                     {"return_field": "主脉络", "keyword": "observable reversal", "top_k": 3},
                 )
             return self._call("submit_attempt", {})
         if kind == "direction":
-            if not isinstance(last, dict) or "artifact_ref" not in last:
+            if not isinstance(last, dict) or "direction_handle" not in last:
                 role_context = cast(Mapping[str, Any], prompt["role_context"])
                 accepted = cast(Sequence[Mapping[str, Any]], role_context["accepted_inputs"])
                 return self._call(