mirror of
https://github.com/razzant/ouroboros.git
synced 2026-10-02 19:58:46 +00:00
Say why a spent send budget stops a redo, and make the loopback test able to fail
The delta review found the last owner-facing sentence that still told the retracted story. The redo is refused when the caller has NO send left, so "asking again would have spent this task's last send" described a send that did not exist. The row now says the caller had no send left. The test that pins "the transport-death repeat never nests a second redo budget here" asserted the verdict on an error with no typed transport death at all, so it would have passed with the loopback exclusion deleted. It now builds a real typed death on a dispatched send and shows both sides: repeatable on a remote route, never on a loopback one. Co-authored-by: Ouroboros <311266734+ouroboros-agent@users.noreply.github.com>
This commit is contained in:
parent
07ccdc127c
commit
8de2a94f35
2 changed files with 14 additions and 5 deletions
|
|
@ -857,7 +857,7 @@ _SUBSTITUTION_DISPOSITIONS = {
|
|||
"redos_exhausted": "the answer was not accepted and no further attempt was available",
|
||||
"pinned_account": "the account is pinned, so the round was not asked again",
|
||||
"admitted_candidate": "this send was already admitted, so the round was not asked again",
|
||||
"send_budget_spent": "asking again would have spent this task's last send",
|
||||
"send_budget_spent": "this caller had no send left, so the round was not asked again",
|
||||
"deadline_spent": "the task's own time was spent, so the round was not asked again",
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -370,10 +370,19 @@ def test_no_outer_paid_repeat_can_nest_another_redo_budget_on_this_transport():
|
|||
|
||||
target = LLMClient()._resolve_remote_target(MODEL)
|
||||
assert target["provider"] == "claudexor" and is_loopback_base_url(target["base_url"])
|
||||
error = transport.ClaudexorModelError({"code": "model_operation_failed", "message": "died"})
|
||||
error.physical_attempt_capture = SimpleNamespace(
|
||||
state="dispatched", provider="claudexor", route_is_loopback=True)
|
||||
assert is_retryable_transport_death(error) is False
|
||||
import httpx
|
||||
|
||||
def died(loopback):
|
||||
# A typed transport death on a dispatched send: the ONLY thing left to
|
||||
# decide the verdict is the route's locality.
|
||||
error = transport.ClaudexorModelError({"code": "model_operation_failed", "message": "died"})
|
||||
error.__cause__ = httpx.ReadError("connection reset")
|
||||
error.physical_attempt_capture = SimpleNamespace(
|
||||
state="dispatched", provider="claudexor", route_is_loopback=loopback)
|
||||
return error
|
||||
|
||||
assert is_retryable_transport_death(died(False)) is True
|
||||
assert is_retryable_transport_death(died(True)) is False
|
||||
|
||||
|
||||
def test_a_discarded_generation_never_becomes_the_live_turn(setup, monkeypatch):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue