diff --git a/ouroboros/tools/control_task_results.py b/ouroboros/tools/control_task_results.py index faf88d977..87da38f65 100644 --- a/ouroboros/tools/control_task_results.py +++ b/ouroboros/tools/control_task_results.py @@ -197,6 +197,7 @@ def _get_task_result( status="unavailable", code="LEGACY_UNAVAILABLE", text=f"Task {task_id}: unknown or not yet registered", )) + from ouroboros.project_sources import CLONE_TIMEOUT_SEC from ouroboros.routing_wait import is_emitted_admission_stub if is_emitted_admission_stub(data): @@ -210,9 +211,10 @@ def _get_task_result( text=( f"Task {task_id}: admission pending since {since} (now {utc_now_iso()}) - the promote " "was emitted and this row carries no supervisor receipt yet, neither scheduled nor " - f"refused. Read get_task_result({task_id}) again before promoting the same work: the " - "supervisor answers within seconds of draining its queue. If the row is still " - "pending minutes later, the event did not land and a new promote is the way forward." + f"refused. Read get_task_result({task_id}) again before promoting the same work: a " + f"promote that prepares a source can stay pending for up to {CLONE_TIMEOUT_SEC // 60} " + "minutes. A new promote is a NEW task id; this row does not forbid one, and whether " + "this one is lost is yours to judge from the two times above." ), )) if bool(include_authority) or bool(include_work_order_source) or bool(include_completion_source): diff --git a/tests/test_promote_admission_pending.py b/tests/test_promote_admission_pending.py index 7defc0ced..fdc06927b 100644 --- a/tests/test_promote_admission_pending.py +++ b/tests/test_promote_admission_pending.py @@ -309,8 +309,9 @@ def test_the_attachment_refusal_without_a_stub_still_writes_no_result(swarm_host def test_the_pending_sentence_never_forbids_a_new_promote_for_ever(tmp_path, _short_confirmation_window): """The row proves one thing: emitted, no receipt yet. An event can be lost (a - supervisor restart drops its in-memory queue), so the sentence hands the - decision back with the facts instead of a standing ban.""" + supervisor restart drops its in-memory queue) and a source can take minutes to + prepare, and the row cannot tell the two apart; so the sentence gives the facts + and hands the decision back, with neither a standing ban nor an invented cause.""" from ouroboros.tools.control_routing import _promote_chat_to_task from ouroboros.tools.control_task_results import _get_task_result @@ -321,4 +322,7 @@ def test_the_pending_sentence_never_forbids_a_new_promote_for_ever(tmp_path, _sh read = _get_task_result(ctx, task_id) assert "admission pending since" in read and f"get_task_result({task_id})" in read assert "do not promote the same work a second time" not in read - assert "did not land" in read and "new promote" in read + # Facts only: the row cannot tell a lost event from a source still being prepared, + # so the sentence names the longest honest wait and leaves the judgement to the model. + assert "did not land" not in read and "within seconds" not in read + assert "can stay pending for up to 15 minutes" in read and "NEW task id" in read