Training-Harness (ACO, Multi-Fidelity), Prüfstand-Benchmark, Agenten-README
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1186,6 +1186,24 @@ async def default_subblock_levels(topic: str, block_norm: str) -> None:
|
||||
await db.commit()
|
||||
|
||||
|
||||
async def copy_topic(quelle: str, ziel: str) -> None:
|
||||
"""Trainings-Helfer: Kanban-Karten + Block-Rows der Quelle unter neuem Topic duplizieren
|
||||
(Frozen-Inventar-Trials — Board 2 läuft auf identischem Board-1-Stand neu). Nur DB;
|
||||
Dateien (source.json/blocks.md) kopiert der Runner."""
|
||||
db = await get_db()
|
||||
await db.execute("DELETE FROM kanban_cards WHERE topic = ?", (ziel,))
|
||||
await db.execute("DELETE FROM blocks WHERE topic = ?", (ziel,))
|
||||
await db.execute(
|
||||
"""INSERT INTO kanban_cards (topic, board, card_id, kind, stage, payload, retries, not_before, last_error, updated_at)
|
||||
SELECT ?, board, card_id, kind, stage, payload, 0, 0, '', updated_at
|
||||
FROM kanban_cards WHERE topic = ?""", (ziel, quelle))
|
||||
await db.execute(
|
||||
"""INSERT INTO blocks (topic, title_norm, title, description, mentions, status, sources, reader, updated_at)
|
||||
SELECT ?, title_norm, title, description, mentions, status, sources, reader, updated_at
|
||||
FROM blocks WHERE topic = ?""", (ziel, quelle))
|
||||
await db.commit()
|
||||
|
||||
|
||||
async def delete_stale_consensus(topic: str, block_norm: str, keep: set[str]) -> None:
|
||||
"""Drop consensus rows of a block that are NOT in this run's sidecar (`keep`): finalize
|
||||
only upserts, so re-runs piled up orphan rows (measured: 25 subs without any board-2
|
||||
|
||||
Reference in New Issue
Block a user