fix: treat execution as success when output was delivered despite null result
This commit is contained in:
@@ -898,8 +898,9 @@ export async function runAgentForGroup(
|
||||
return 'error';
|
||||
}
|
||||
|
||||
// success-null-result with no visible output — agent returned nothing useful
|
||||
if (primaryAttempt.sawSuccessNullResultWithoutOutput) {
|
||||
// success-null-result with no visible output — agent returned nothing useful.
|
||||
// But if output was already delivered to Discord (sawOutput), treat as success.
|
||||
if (primaryAttempt.sawSuccessNullResultWithoutOutput && !primaryAttempt.sawOutput) {
|
||||
logger.error(
|
||||
{ group: group.name, chatJid, runId },
|
||||
'Agent returned success with null result and no visible output',
|
||||
|
||||
@@ -48,7 +48,8 @@ function classifyReviewerVerdict(
|
||||
// from quoted/referenced status markers in the body text.
|
||||
if (/^\*{0,2}BLOCKED\*{0,2}\b/.test(firstLine)) return 'blocked';
|
||||
if (/^\*{0,2}NEEDS_CONTEXT\*{0,2}\b/.test(firstLine)) return 'needs_context';
|
||||
if (/^\*{0,2}DONE_WITH_CONCERNS\*{0,2}\b/.test(firstLine)) return 'done_with_concerns';
|
||||
if (/^\*{0,2}DONE_WITH_CONCERNS\*{0,2}\b/.test(firstLine))
|
||||
return 'done_with_concerns';
|
||||
if (/^\*{0,2}DONE\*{0,2}\b/.test(firstLine)) return 'done';
|
||||
return 'continue';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user