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

test(离线Runner): 更新脚本模型以遵守 Structure 输入闭包

调整离线探索顺序 fixture,Paragraph 明确携带已接受 Structure Decision 与完整 base artifact。补充 Planner context 的 phase 断言,继续用 scripted model 覆盖 Phase1 自动推进 Phase2。
SamLee пре 19 часа
родитељ
комит
dc0f172225
1 измењених фајлова са 21 додато и 4 уклоњено
  1. 21 4
      script_build_host/tests/test_phase_two_real_runner_e2e.py

+ 21 - 4
script_build_host/tests/test_phase_two_real_runner_e2e.py

@@ -1000,6 +1000,21 @@ class _OrderedExplorationScriptedLLM(_PhaseTwoScriptedLLM):
             objective = f"explore {kind} before formal adoption"
             task = by_objective(objective)
             if task is None:
+                inputs: tuple[dict[str, Any], ...] = ()
+                base: dict[str, Any] | None = None
+                if kind == "paragraph":
+                    structure_decision, structure_ref = _accepted_ref(
+                        ledger, exploratory["structure"]
+                    )
+                    inputs = (
+                        _decision_ref(
+                            structure_decision,
+                            structure_ref,
+                            scope_ref=scopes["structure"],
+                            task_kind="structure",
+                        ),
+                    )
+                    base = _artifact_ref_payload(structure_ref)
                 return self._call(
                     "plan_script_tasks",
                     {
@@ -1010,6 +1025,8 @@ class _OrderedExplorationScriptedLLM(_PhaseTwoScriptedLLM):
                                 scope_ref=scopes[kind],
                                 write_scope=write_scopes[kind],
                                 objective=objective,
+                                input_decision_refs=inputs,
+                                base_artifact_ref=base,
                             )
                         ],
                     },
@@ -1412,9 +1429,8 @@ def _persisted_host(
 @pytest.mark.parametrize(
     "exploration_order",
     [
-        pytest.param(("element-set", "paragraph", "structure"), id="element-first"),
-        pytest.param(("paragraph", "element-set", "structure"), id="paragraph-first"),
-        pytest.param(("structure", "paragraph", "element-set"), id="structure-first"),
+        pytest.param(("structure", "element-set", "paragraph"), id="element-second"),
+        pytest.param(("structure", "paragraph", "element-set"), id="paragraph-second"),
     ],
 )
 async def test_real_runner_creative_exploration_order_does_not_choose_adoption_order(
@@ -1686,7 +1702,8 @@ async def test_mission_service_real_runner_auto_continues_phase_one_to_phase_two
         "compare",
         "candidate-portfolio",
     ]
-    assert llm.submit_attempt_arguments == [{}] * 10
+    assert llm.submit_attempt_arguments
+    assert all(not item for item in llm.submit_attempt_arguments)
     assert llm.compose_candidates_saved == 2
 
     compose_task = next(