fix: summarize AgentRun command output by signal
This commit is contained in:
@@ -133,6 +133,30 @@ assertCondition(
|
||||
"AgentRun logs/events must render payload error, backend phase, and command id summaries by default",
|
||||
);
|
||||
|
||||
assertCondition(
|
||||
agentRunSource.includes("function commandOutputSummary(payload: Record<string, unknown>): string | null")
|
||||
&& agentRunSource.includes("function summarizeStructuredCliOutput(value: Record<string, unknown>): string | null")
|
||||
&& agentRunSource.includes("function parseJsonRecordFromText(raw: string): Record<string, unknown> | null")
|
||||
&& agentRunSource.includes('if (type === "command_output")')
|
||||
&& agentRunSource.includes("push(commandOutputSummary(payload))")
|
||||
&& agentRunSource.includes('if (type !== "command_output")'),
|
||||
"AgentRun command_output summaries must use a dedicated low-noise renderer instead of raw payload JSON",
|
||||
);
|
||||
|
||||
assertCondition(
|
||||
agentRunSource.includes("isLowSignalJsonField")
|
||||
&& agentRunSource.includes('key === "generatedAt" || key === "cli" || key === "version" || key === "valuesRedacted" || key === "secretMaterialStored"')
|
||||
&& agentRunSource.includes('firstPathText(value, ["action", "operation", "command", "kind"])')
|
||||
&& agentRunSource.includes('"traceId", "lastTraceId", "trace.traceId", "trace.id", "body.traceId", "body.trace.id", "providerTrace.traceId", "runnerTrace.traceId"')
|
||||
&& agentRunSource.includes('"sessionId", "session.sessionId", "body.sessionId", "workspace.selectedAgentSessionId", "workspace.selectedConversation.sessionId"')
|
||||
&& agentRunSource.includes('"conversationId", "session.conversationId", "body.conversationId", "workspace.selectedConversationId", "workspace.selectedConversation.conversationId"')
|
||||
&& agentRunSource.includes('"providerProfile", "backendProfile", "profile", "session.providerProfile", "workspace.providerProfile"')
|
||||
&& agentRunSource.includes('"pipelineRun", "pipelineRunName", "pipelineRun.name", "pipeline.runName", "pipeline.name"')
|
||||
&& agentRunSource.includes("function summarizePartialJsonCommandOutput(raw: string): string | null")
|
||||
&& agentRunSource.includes("if (failure !== null || isFailureLikeStatus(status))"),
|
||||
"AgentRun command_output summaries must prefer business fields and suppress metadata-only JSON headers",
|
||||
);
|
||||
|
||||
assertCondition(
|
||||
agentRunSource.includes("function rerunWithoutDryRun(command: string): string")
|
||||
&& agentRunSource.includes("options.dryRun ? [rerunWithoutDryRun(command)] : undefined"),
|
||||
@@ -157,6 +181,8 @@ console.log(JSON.stringify({
|
||||
"AgentRun resource failure output is visible in human mode",
|
||||
"AgentRun logs tail is enforced by the render-only client",
|
||||
"AgentRun logs/events expose payload error and backend phase summaries",
|
||||
"AgentRun command_output summaries use a dedicated low-noise renderer",
|
||||
"AgentRun command_output summaries prefer business fields over metadata headers",
|
||||
"AgentRun dry-run mutations keep resource-command follow-up",
|
||||
],
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user