fix(web-probe): correlate CPU samples with performance windows

This commit is contained in:
Codex
2026-07-02 15:41:39 +00:00
parent d9b3fc79e1
commit 225e3e6836
5 changed files with 725 additions and 31 deletions
@@ -71,7 +71,7 @@ const promptNetwork = buildPromptNetworkReport(control, promptNetworkRows);
const runtimeAlerts = buildRuntimeAlerts(samples, control, network, consoleEvents, errors);
const apiDomLag = buildApiDomLagReport(samples, network);
const browserProcess = buildBrowserProcessReport(browserProcessRows);
const frontendPerformance = buildFrontendPerformanceReport(performanceRows, artifacts, samples, network);
const frontendPerformance = await buildFrontendPerformanceReport(performanceRows, artifacts, samples, network);
const projectManagement = buildProjectManagementReport(samples, control, network, pagePerformance, projectManagementConfig);
const runnerErrors = errors.slice(-8).map((item) => {
const details = item.error?.details && typeof item.error.details === "object" ? item.error.details : {};
@@ -124,7 +124,7 @@ const commandFailures = summarizeCommandFailures(control);
const toolFindings = buildToolFindings({ manifest, heartbeat, commandState });
const findings = [...toolFindings, ...buildProjectManagementFindings(projectManagement), ...buildFindings(samples, control, network, errors, sampleMetrics, promptNetwork, runtimeAlerts, pagePerformance, requestRate, pageProvenance, commandFailures, manifest, apiDomLag, browserProcess, frontendPerformance)];
if (jsonlReadIssues.length > 0) findings.unshift({ id: "jsonl-read-issues", severity: "red", summary: "observer analyzer hit JSONL read/parse issues", count: jsonlReadIssues.length, issues: jsonlReadIssues.slice(0, 20) });
const recentWindow = buildRecentAnalysisWindow({ samples, control, network, consoleEvents, errors, artifacts, browserProcessRows, performanceRows, manifest });
const recentWindow = await buildRecentAnalysisWindow({ samples, control, network, consoleEvents, errors, artifacts, browserProcessRows, performanceRows, manifest });
const commandTimeline = control.filter((item) => item.phase === "completed" || item.phase === "failed").map((item) => ({ ts: item.ts, phase: item.phase, commandId: item.commandId, type: item.type, input: item.input, afterUrl: item.afterUrl }));
const report = {
ok: findings.filter((item) => item.severity === "red").length === 0,