fix: label code queue final response closeout

This commit is contained in:
Codex
2026-05-23 03:04:05 +00:00
parent 6c02cb1655
commit 3f88396ecf
3 changed files with 57 additions and 2 deletions
@@ -64,7 +64,7 @@ function fixtureResponse(path: string): JsonRecord {
lastAssistantMessage: {
at: "2026-05-22T00:00:00.000Z",
seq: 120,
source: "assistant",
source: "finalResponse",
text: longText(`summary-assistant-${taskId}`, 130),
},
commands: {
@@ -218,10 +218,16 @@ export function runCodeQueueSupervisorDisclosureContract(): JsonRecord {
assertCondition(diagnostics.livenessSummary === undefined, "supervisor diagnostics should omit liveness summary preview by default", diagnostics);
assertCondition(listBudget.truncated === true && typeof listBudget.rawCommand === "string", "diagnostic list budget should disclose raw command", listBudget);
assertCondition(asArray(runningItem.issues).includes("#132"), "supervisor row should expose issue refs for triage", runningItem);
assertCondition(runningItem.status === "running", "fixture running row should keep raw scheduler status", runningItem);
assertCondition(String(runningItem.statusLabel ?? "").includes("awaiting terminal/judge"), "running finalResponse row should expose awaiting terminal/judge label", runningItem);
assertCondition(runningItem.awaitingTerminalJudge === true && runningItem.closeoutState === "awaiting-terminal-or-judge", "running finalResponse row should be marked as not ready for closeout", runningItem);
assertCondition(String(runningItem.closeoutHint ?? "").includes("wait for terminal status and judge"), "running finalResponse row should explain commander interpretation", runningItem);
assertCondition(Number(runningItem.promptChars) > String(runningItem.prompt ?? "").length && runningItem.promptTruncated === true, "supervisor prompt must be a short flat preview with original char count", runningItem);
assertCondition(Number(runningItem.lastChars) > String(runningItem.last ?? "").length && runningItem.lastTruncated === true, "supervisor body must be a short flat preview with original char count", runningItem);
assertCondition(runningItem.commands === undefined && runningItem.promptPreview === undefined && runningItem.lastAssistantMessage === undefined, "supervisor rows must not expose repeated commands or legacy long list fields", runningItem);
assertCondition(asRecord(fullItem.promptPreview).chars !== undefined && fullItem.lastAssistantMessage !== undefined, "full view must retain detailed task row fields", fullItem);
assertCondition(fullItem.status === "running" && String(fullItem.statusLabel ?? "").includes("awaiting terminal/judge"), "full view should keep raw status while exposing derived closeout label", fullItem);
assertCondition(fullItem.awaitingTerminalJudge === true && fullItem.closeoutState === "awaiting-terminal-or-judge", "full view should expose awaiting terminal/judge state", fullItem);
assertCondition(fullTasks.returned === 15, "full view must not inherit supervisor recentCompleted cap", fullTasks);
const budget = asRecord(disclosure.outputBudget);
assertCondition(budget.recentCompletedReturnedLimit === 3 && budget.sectionReturnedLimit === 3, "supervisor must expose output budget metadata", disclosure);
@@ -240,6 +246,7 @@ export function runCodeQueueSupervisorDisclosureContract(): JsonRecord {
"running/unread locally paged",
"split-brain diagnostics capped",
"prompt/body previews bounded",
"running finalResponse rows labeled awaiting terminal/judge",
"drill-down commands preserved",
"full view remains detailed",
],