更新: 421 个文件 - 2026-03-17 18:30:02

这个提交包含在:
hao
2026-03-17 18:30:02 -07:00
父节点 29c3faaa28
当前提交 a3edc88834
修改 421 个文件,包含 12474 行新增5845 行删除

查看文件

@@ -1,14 +1,29 @@
from __future__ import annotations
from pathlib import Path
from typing import Any, Dict, List
from lab.runners.dispatcher import run_seed as run_runner_seed
from lab.utils import write_json
def run_seed(profile: Dict[str, Any]) -> List[Dict[str, Any]]:
steps = []
def run_seed(profile: Dict[str, Any], advisory: Dict[str, Any], run_dir: Path, dry_run: bool = False) -> Dict[str, Any]:
if profile.get("runner_id") and not dry_run:
return run_runner_seed(profile, advisory, run_dir)
steps: List[Dict[str, Any]] = []
for action in profile.get("seed_actions", []):
kind = action.get("kind", "note")
if kind == "note":
steps.append({"kind": kind, "status": "recorded", "message": action.get("message", "")})
else:
steps.append({"kind": kind, "status": "skipped", "message": "Seed action type not yet automated"})
return steps
steps.append(
{
"kind": kind,
"status": "planned" if dry_run else "skipped",
"message": "Seed action type not yet automated",
}
)
payload = {"steps": steps, "seeded": not any(item["status"] == "skipped" for item in steps)}
write_json(run_dir / "logs" / "seed.json", payload)
return payload