mirror of
https://github.com/razzant/ouroboros.git
synced 2026-10-03 04:07:04 +00:00
test: wait for the durable completion mirror before counting Main rows
This commit is contained in:
parent
0b978ac3ea
commit
5dd61bf25f
1 changed files with 5 additions and 1 deletions
|
|
@ -207,7 +207,11 @@ def test_running_direct_turn_converts_to_project_and_its_answer_follows(
|
|||
"the final answer of a converted turn was also delivered to Main"
|
||||
# Main keeps the transfer receipt and a separate final-answer
|
||||
# mirror; the original authored row belongs to the Project.
|
||||
rows = _task_rows(oracle, task_id)
|
||||
# The completion mirror is the supervisor's task_done row, written after
|
||||
# the worker's own final delivery: wait for it like every other durable fact.
|
||||
rows = wait_until(lambda: (lambda r: r if any(
|
||||
row["chat_id"] == 1 and row["type"] == "project_completion_summary" for row in r) else None)(
|
||||
_task_rows(oracle, task_id)), 60) or _task_rows(oracle, task_id)
|
||||
main_rows = [row for row in rows if row["chat_id"] == 1]
|
||||
handoff_rows = [row for row in main_rows if row["type"] == "project_handoff"]
|
||||
completion_rows = [row for row in main_rows if row["type"] == "project_completion_summary"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue