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:
Zamil Majdy
2026-03-06 13:07:40 +07:00
parent 81aea5dc52
commit 3e45a28307

View File

@@ -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