feat: add test-preflight runner and deployer prepare adapters
agent-runtime executes fixed tester node operations over JSON stdin. deployer prepare brings up the local test Compose service the same way. test-preflight now passes the tester binding; tester select skips unauthorized cases before creating a runner.
This commit is contained in:
@@ -391,7 +391,11 @@ def check_network(evidence: Evidence, config: Mapping[str, Any], row: Mapping[st
|
||||
statuses.append(status)
|
||||
evidence.add(f"{platform_name}-{index}-network-{probe_index}-{detail['name']}", platform=platform_name, node=node, target=url, observed=detail["observed"], expected=detail["expected"], status=status, remediation=detail.get("remediation", ""))
|
||||
elif isinstance(runner, dict) and runner.get("kind") == "contract":
|
||||
status, observed, result = runner_call(runner, {"operation": "network_probe", "platform": platform_name, "node": node, "url": url, "probe": probe})
|
||||
# The runner is selected by the tester binding. Keep the binding
|
||||
# in the request just like platform_probe, otherwise the shared
|
||||
# agent-runtime adapter cannot resolve the actual node/worktree.
|
||||
binding = text(tester.get("binding")) if isinstance(tester, dict) else ""
|
||||
status, observed, result = runner_call(runner, {"operation": "network_probe", "platform": platform_name, "node": node, "binding": binding, "url": url, "probe": probe})
|
||||
result = result or {"status": status, "observed": observed}
|
||||
complete = require_runner_checks(evidence, result, prefix=f"{platform_name}-{index}-network-{probe_index}", platform_name=platform_name, node=node, required={"dns", "tcp", "http"})
|
||||
network_status = add_runner_checks(evidence, result, prefix=f"{platform_name}-{index}-network-{probe_index}", platform_name=platform_name, node=node, default_expected="DNS/TCP/HTTP reachable from actual tester node")
|
||||
@@ -488,8 +492,8 @@ def run(config: Mapping[str, Any], mode: str) -> Evidence:
|
||||
evidence.add(f"{platform_name}-{index}-install", platform=platform_name, node=node, target=target_path, observed="not-run", expected="verify and deployment ready", status="blocked", remediation="先修复前置检查;prepare 不伪造安装成功")
|
||||
evidence.add(f"{platform_name}-{index}-start", platform=platform_name, node=node, target=text(identity), observed="not-run", expected="install ready", status="blocked", remediation="安装前置失败,未启动 app")
|
||||
else:
|
||||
install_request = {"operation": "install", "platform": platform_name, "node": node, "artifact": target_path, "identity": identity}
|
||||
start_request = {"operation": "start", "platform": platform_name, "node": node, "identity": identity}
|
||||
install_request = {"operation": "install", "platform": platform_name, "node": node, "binding": binding, "artifact": target_path, "identity": identity}
|
||||
start_request = {"operation": "start", "platform": platform_name, "node": node, "binding": binding, "identity": identity}
|
||||
if is_local and (not isinstance(runner, dict) or runner.get("kind", "local") == "local"):
|
||||
if platform_name == "android":
|
||||
adb = shutil.which("adb") or "adb"
|
||||
|
||||
Reference in New Issue
Block a user