فهرست منبع

test(生产装配): 覆盖 resolver 注入与上传输入读取会话

扩展 ProductionRuntimeDependencies 测试替身,验证 outbound resolver 能传入安全 HTTP 策略,并确认生产装配继续将单个内部模型展开到全部脚本角色。
SamLee 11 ساعت پیش
والد
کامیت
31fd6a5fa2
1فایلهای تغییر یافته به همراه5 افزوده شده و 1 حذف شده
  1. 5 1
      script_build_host/tests/test_production_composition.py

+ 5 - 1
script_build_host/tests/test_production_composition.py

@@ -33,6 +33,9 @@ def _runtime(tmp_path: Path) -> ProductionRuntimeDependencies:
     async def llm_call(*_args: object, **_kwargs: object) -> dict[str, str]:
         return {"content": "unused", "finish_reason": "stop"}
 
+    async def resolve_public(_host: str, _port: int) -> tuple[str, ...]:
+        return ("8.8.8.8",)
+
     return ProductionRuntimeDependencies(
         runner=AgentRunner(
             trace_store=FileSystemTraceStore(str(tmp_path / "traces")),
@@ -40,6 +43,7 @@ def _runtime(tmp_path: Path) -> ProductionRuntimeDependencies:
         ),
         principal_provider=_Principals(),
         build_authorizer=_Authorizer(),
+        outbound_resolver=resolve_public,
     )
 
 
@@ -120,5 +124,5 @@ async def test_production_expands_one_internal_model_to_all_script_roles(tmp_pat
     assert isinstance(presets, dict)
     assert len(presets) == 16
     assert presets["script_root_worker"]["model"] == "qwen3.7-max"
-    assert presets["script_root_validator"]["max_iterations"] == 90
+    assert presets["script_root_validator"]["max_iterations"] == 25
     await host.close()