mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
fix(backend/copilot): don't short-circuit JSONL validation in validate_transcript
Remove `break` after finding first assistant entry so all remaining lines are still validated for JSON correctness. Without this, corrupted JSONL after the first assistant entry would slip through and get uploaded as a broken --resume file.
This commit is contained in:
@@ -268,7 +268,6 @@ def validate_transcript(content: str | None) -> bool:
|
||||
entry = json.loads(line)
|
||||
if entry.get("type") == "assistant":
|
||||
has_assistant = True
|
||||
break
|
||||
except json.JSONDecodeError:
|
||||
return False
|
||||
|
||||
|
||||
Reference in New Issue
Block a user