fix(mcplocal): bounded, legible MCP failures — no request can hang forever #127
@@ -144,9 +144,14 @@ export function createTraceCommand(deps?: Partial<TraceCommandDeps>): Command {
|
|||||||
if (degraded !== null) degradedCount++;
|
if (degraded !== null) degradedCount++;
|
||||||
if (err !== null) errorCount++;
|
if (err !== null) errorCount++;
|
||||||
|
|
||||||
const ms = num(e.payload['durationMs']) ?? num(e.payload['totalDurationMs']);
|
// Only real steps compete for "slowest" — tool_call_trace and
|
||||||
const label = str(e.payload['stage']) ?? e.eventKind;
|
// pipeline_execution are aggregates OF those steps, so including them
|
||||||
if (ms !== null && (slowest === null || ms > slowest.ms)) slowest = { name: label, ms };
|
// would always name the total and tell you nothing.
|
||||||
|
const ms = num(e.payload['durationMs']);
|
||||||
|
const label = str(e.payload['stage']);
|
||||||
|
if (ms !== null && label !== null && (slowest === null || ms > slowest.ms)) {
|
||||||
|
slowest = { name: label, ms };
|
||||||
|
}
|
||||||
|
|
||||||
const marks = [
|
const marks = [
|
||||||
degraded !== null ? `⚠ ${degraded}` : null,
|
degraded !== null ? `⚠ ${degraded}` : null,
|
||||||
|
|||||||
Reference in New Issue
Block a user