feat: seed carries frozen pools.json into training workspace
This commit is contained in:
@@ -243,6 +243,24 @@ class TestInitSeed:
|
||||
with pytest.raises(FileExistsError, match="种子已存在"):
|
||||
init_seed(store, "dup", skills_dir, prompts_dir, baseline_db, "r1", None, "second")
|
||||
|
||||
def test_init_seed_carries_pools(self, tmp_path):
|
||||
"""提供 pools_json/split_manifest 时拷入 seed 目录。"""
|
||||
from app.harness.store import init_seed
|
||||
|
||||
store = tmp_path / "store"
|
||||
skills = tmp_path / "sk"; skills.mkdir(); (skills / "s.md").write_text("x")
|
||||
prompts = tmp_path / "pr"; prompts.mkdir(); (prompts / "p.md").write_text("y")
|
||||
db = tmp_path / "b.db"; db.write_text("db")
|
||||
pools = tmp_path / "pools.json"; pools.write_text('{"split_mode":"global"}')
|
||||
manifest = tmp_path / "split_manifest.json"; manifest.write_text('{"pools_sha256":"a"}')
|
||||
|
||||
seed_dir = init_seed(
|
||||
store, "s1", skills, prompts, db, "infer_adhoc", None, "d",
|
||||
pools_json=pools, split_manifest=manifest,
|
||||
)
|
||||
assert (seed_dir / "pools.json").exists()
|
||||
assert (seed_dir / "split_manifest.json").exists()
|
||||
|
||||
|
||||
class TestListSeeds:
|
||||
"""list_seeds 列出所有种子。"""
|
||||
|
||||
Reference in New Issue
Block a user