fix: classify quick verify observer cleanup

This commit is contained in:
Codex
2026-07-02 11:06:41 +00:00
parent ad4029d308
commit 47bd94712c
4 changed files with 251 additions and 14 deletions
@@ -2640,6 +2640,7 @@ function renderStoredSummary(
`observer=${stringOrNull(row.observer_id) ?? "-"} stateDir=${stringOrNull(row.state_dir) ?? "-"}`,
`report=${reportSha ?? "-"} artifacts=${String(row.artifact_count ?? 0)} findings=${String(findingCount)}`,
`timing=${formatRunTimingSummary(timing)}`,
`cleanup=${formatStoredCleanupSummary(summary.cleanup)}`,
`publicOrigin=${stringOrNull(stored.publicOrigin) ?? "-"}`,
`analysisWindow=${formatStoredAnalysisWindow(summary.analysisWindow)}`,
"",
@@ -2658,6 +2659,24 @@ function renderStoredFindings(row: Record<string, unknown>, findings: readonly R
].join("\n");
}
function formatStoredCleanupSummary(value: unknown): string {
const cleanup = record(value);
const cleanupClass = stringOrNull(cleanup.cleanupClass);
if (cleanupClass === null) return "-";
const fields = [
["class", cleanupClass],
["aliveBefore", cleanup.aliveBefore],
["aliveAfter", cleanup.aliveAfter],
["termSent", cleanup.termSent],
["killSent", cleanup.killSent],
["pendingAbandoned", cleanup.pendingAbandoned],
["processingAbandoned", cleanup.processingAbandoned],
["gracefulStopOk", cleanup.gracefulStopOk],
["forceStopOk", cleanup.forceStopOk],
];
return fields.map(([key, fieldValue]) => `${key}=${fieldValue ?? "-"}`).join(" ");
}
function formatStoredAnalysisWindow(value: unknown): string {
const window = record(value);
const fields = [