This commit is contained in:
team3
2026-07-08 18:55:36 +02:00
parent 224ba1ed4f
commit 9a6ab0937b
15 changed files with 172 additions and 55 deletions

View File

@@ -72,6 +72,27 @@ async def test_e2e_guide(fake_welt, testdb, tmp_path):
assert await pruefe_guide_invarianten(TOPIC) == []
async def test_e2e_only_artefacts(fake_welt, testdb, tmp_path):
"""Artefakt-only (inventory=False): nach removeArtefacts läuft NUR Board 2 auf den
fertigen Blocks — kein Board 1, keine Research-Agenten. Karten aus done_block geseedet."""
ok, files = await _lauf(tmp_path)
assert ok
db = testdb
subs_vorher = {r["sub_norm"] for r in await db.list_subblocks(TOPIC)}
assert subs_vorher
# Artefakte entfernen (Karten zurück auf generate, Board-1-Subs bleiben)
await bi.reset_board_from_stage(TOPIC, "artefacts", "generate", files)
fake_welt.calls.clear()
ctx = GenContext(topic=TOPIC, provider="claude", is_cancelled=lambda: False)
ok2 = await asyncio.wait_for(
bi.run_boards(ctx, lambda *a, **k: None, files, {"type": "thema"}, None, "",
research=False, inventory=False), timeout=60)
assert ok2
assert not any("-research-" in k for k in fake_welt.calls) # Board 1 lief NICHT
assert any("-sb-enrich-" in k or "-sb-verify-" in k for k in fake_welt.calls) # Board 2 lief
assert {r["sub_norm"] for r in await db.list_subblocks(TOPIC)} == subs_vorher # vollständig
async def test_e2e_rerun_idempotent(fake_welt, testdb, tmp_path):
"""Zweiter Lauf (Continue, research=False) hinterlässt keine Waisen/Reste."""
ok, files = await _lauf(tmp_path)