fix: predictions row carries arm run_id under shared gate_log; drain evolve gather on failure (algo #6)

This commit is contained in:
2026-07-17 03:52:19 -04:00
parent 23a64042fe
commit 0b839937df
5 changed files with 90 additions and 18 deletions
+4 -4
View File
@@ -332,8 +332,8 @@ class TestRunInferencePairEndToEnd:
assert result.total == 1
assert result.correct == 1
# 逐题溯源:predictions 表两条 record 都在
rows = harness_log.query("SELECT * FROM predictions WHERE run_id = ?", ("test-run",))
# 逐题溯源:predictions 表两条 record 都在record 显式携带传入的 run_id
rows = harness_log.query("SELECT * FROM predictions WHERE run_id = ?", ("run-pair-e2e",))
qids = {r["question_id"] for r in rows}
assert qids == {"po", "pm"}
@@ -360,6 +360,6 @@ class TestRunInferencePairEndToEnd:
)
assert result.total == 1 # single 存活,孤儿剔除
# 逐题溯源:孤儿题仍逐题落库(推理不变)
rows = harness_log.query("SELECT * FROM predictions WHERE run_id = ?", ("test-run",))
# 逐题溯源:孤儿题仍逐题落库(推理不变record 显式携带传入的 run_id
rows = harness_log.query("SELECT * FROM predictions WHERE run_id = ?", ("run-orphan-e2e",))
assert {r["question_id"] for r in rows} == {"s1", "po"}