fix code queue trace summary sync contract

This commit is contained in:
Codex
2026-05-20 04:58:58 +00:00
parent e9be28d6bb
commit 93e4630497
9 changed files with 879 additions and 63 deletions
+2 -1
View File
@@ -630,8 +630,9 @@ function renderTraceConsoleRows(summary: Record<string, unknown>, steps: Record<
const execution = asRecord(summary.execution) ?? {};
const stats = asRecord(execution.traceStats) ?? asRecord(summary.traceStats);
const statsSource = String(execution.statsSource || summary.statsSource || "");
const statsUsable = stats !== null && (statsSource === "oa-event-flow" || statsSource === "raw-trace-fallback" || stats.source === "oa-event-flow");
const stat = (key: string): string | number => {
if (!stats || statsSource !== "oa-event-flow") return "--";
if (!statsUsable) return "--";
const value = Number(stats[key]);
return Number.isFinite(value) && value >= 0 ? Math.floor(value) : "--";
};