This commit is contained in:
team3
2026-07-07 02:37:12 +02:00
parent f2bc6bcedb
commit 27364d0789
2 changed files with 15 additions and 8 deletions

View File

@@ -1986,7 +1986,7 @@ COLUMNS = [
_TITLE_STAGES = ["ingest", "cluster"]
_CLUSTER_STAGES = ["pair_check", "consensus_gate", "clarify", "naming", "naming_check"]
_BLOCK_STAGES = ["fragment_filter", "dedup", "grouping", "gap_check", "done"]
_ART_STAGES = ["generate", "verify", "artefakte", "finalize", "konsolidierung", "outline"]
_ART_STAGES = ["generate", "verify", "artefakte", "finalize", "outline"]
# where a requeued dead card restarts, by kind
_DEAD_RESTART = {"title": "cluster", "cluster": "pair_check", "block": "fragment_filter",
"ablock": "generate", "outline": "outline"}
@@ -2125,13 +2125,17 @@ async def reset_board_from_stage(topic: str, board: str, stage: str, files: dict
await _requeue(r, "outline")
elif r["stage"] in later:
await _requeue(r, stage)
if stage == "generate": # full artefact re-derive → also the DB mirrors
await db.delete_subblocks(topic)
if stage == "generate": # re-derive enrichment + artefacts; the Board-1 subs STAY
# Bottom-up: subblocks belong to Board 1 (the clustered atoms). Deleting them would
# leave Board 2 nothing to enrich → cards fall straight through to done. Only the
# DERIVED artefacts/questions + sidecar files are wiped; the enrichment (facts/level)
# gets overwritten by the fresh Board-2 run.
await db.delete_question_pattern(topic)
await db.delete_sub_artefakte(topic)
await db.delete_outline(topic) # the outline is a blocks artifact too (set in board_artefacts)
# global sidecar files and per-block resume slots: leftovers of the previous
# derive would re-merge/resume into the fresh run — nothing here is reused
for k in ("sidecar", "facts", "sub_roh", "question_pattern", "artefakte"):
for k in ("sidecar", "facts", "sub_roh", "question_pattern", "artefakte", "outline"):
files[k].unlink(missing_ok=True)
for d in files["arbeit"].glob("ab-*"):
if d.is_dir():