fix(routing): retry ACP transport disconnects instead of failing outright (#2680)
Co-authored-by: nova28 <17953305+nova28@users.noreply.github.com> Co-authored-by: Carlos Florencio <carlosmflorencio@gmail.com>
This commit is contained in:
@@ -247,6 +247,22 @@ describe("ActionMessage — transient retry (warning variant)", () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe("ActionMessage — agent transport lost", () => {
|
||||
it("renders the agent-transport-lost reason for a dropped ACP connection", () => {
|
||||
renderAction(
|
||||
retryMessage({
|
||||
content: "Agent connection lost",
|
||||
metadata: {
|
||||
...transientRetryMetadata(1, 5),
|
||||
failure_code: "agent_transport_lost",
|
||||
},
|
||||
}),
|
||||
"WAITING_FOR_INPUT",
|
||||
);
|
||||
expect(screen.getByText(/Agent connection lost/i)).toBeTruthy();
|
||||
});
|
||||
});
|
||||
|
||||
describe("ActionMessage — retry schedule updates", () => {
|
||||
it("resets the fallback countdown when a later retry schedule arrives", () => {
|
||||
vi.useFakeTimers();
|
||||
|
||||
@@ -198,6 +198,8 @@ function transientRetryReasonKey(failureCode?: string) {
|
||||
return "chat:transientRetryReasonProviderUnavailable";
|
||||
case "rate_limited":
|
||||
return "chat:transientRetryReasonRateLimited";
|
||||
case "agent_transport_lost":
|
||||
return "chat:transientRetryReasonAgentTransportLost";
|
||||
default:
|
||||
return "chat:transientRetryReasonGeneric";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user