fix: retain authentication diagnostics across empty stream blocks

This commit is contained in:
haelyra committed 2026-10-11 19:01:56 -04:00
1 parent 2ec80189a4
commit 8d969b0ec4
4 files changed
+31 -4

No files matched your search

+1 -1
View File
@@ -308,7 +308,7 @@ function runTrial(trial, { workRoot, armSettingsByName, executable, model, maxTu
providerMessage: stream.result && stream.result.is_error === true
? String(stream.result.result || '').slice(0, 200)
: !stream.result
? String(stream.texts[stream.texts.length - 1] || '').slice(0, 200) || null
? String([...stream.texts].reverse().find(text => text.trim() !== '') || '').slice(0, 200) || null
: null,
wallMs: Date.now() - started,
passed: outcome.passed,
+2 -1
View File
@@ -115,7 +115,8 @@ function runConversation({ cwd, stateDir, settingsPath, prompt, intent }, option
// conversation rather than being graded as a finding.
if (!stream.result || stream.result.is_error === true) {
providerError = true;
providerMessage = String((stream.result && stream.result.result) || finalText(stream) || '').slice(0, 200) || null;
providerMessage = String((stream.result && stream.result.result)
|| [...stream.texts].reverse().find(text => text.trim() !== '') || '').slice(0, 200) || null;
}
addUsage(usage, stream.result);
denialsPerTurn.push(stream.gateDenials);