mirror of
https://github.com/morluto/rea
synced 2026-10-28 06:46:47 -04:00
fix(hopper): diagnose MCP provider failures with stage, state, and request context (#1044)
* fix(hopper): diagnose MCP provider failures with stage, state, and request context * fix(hopper): retain health at the actual provider lifecycle boundary * test(hopper): distinguish socket loss from later observed process exit * test(hopper): cover observed exit separately from socket-first replies --------- Co-authored-by: N0zoM1z0 <1705004398@qq.com>
This commit is contained in:
@@ -296,6 +296,7 @@ try {
|
||||
{ name: "list_documents", arguments: {} },
|
||||
options,
|
||||
);
|
||||
requireSuccessfulTool(documents, "list_documents");
|
||||
requireBridgeProgress(progressUpdates);
|
||||
const rejectedProcedure = await client.callTool(
|
||||
{
|
||||
@@ -381,9 +382,13 @@ try {
|
||||
await client.callTool({ name: "list_documents", arguments: {} }, options),
|
||||
"list_documents after target switch",
|
||||
);
|
||||
const expectedDocumentsAfterTargetSwitch =
|
||||
process.platform === "linux"
|
||||
? firstDocuments.length
|
||||
: firstDocuments.length + 1;
|
||||
if (
|
||||
!Array.isArray(documentsAfterTargetSwitch) ||
|
||||
documentsAfterTargetSwitch.length !== firstDocuments.length + 1
|
||||
documentsAfterTargetSwitch.length !== expectedDocumentsAfterTargetSwitch
|
||||
)
|
||||
throw new Error("A distinct target did not receive one Hopper document");
|
||||
const reopenedTarget = await client.callTool(
|
||||
|
||||
Reference in New Issue
Block a user