Skip to content

Commit 3298857

Browse files
fix: match backfilled log status to terminal status code
Bugbot pointed out that the backfill loop could pick an earlier RUNNING/partial status log instead of the terminal one when a rollout emits multiple status-bearing logs. The reported `code` was always correct (it came from /status), but `message`/`details`/`extras` could be attached from the wrong row and the raised exception would carry misleading text. Match the log row's status code to the terminal code returned by /status so the backfill is deterministic. Made-with: Cursor
1 parent 30f662f commit 3298857

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

eval_protocol/pytest/remote_rollout_processor.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,9 +146,12 @@ async def _process_row(row: EvaluationRow) -> EvaluationRow:
146146
completed_logs = await self._tracing_adapter.async_search_logs(
147147
session, tags=[f"rollout_id:{row.execution_metadata.rollout_id}"]
148148
)
149+
# Pick the log row whose status code matches the terminal
150+
# code from /status, so intermediate RUNNING checkpoints
151+
# don't poison the backfill.
149152
for log in completed_logs:
150153
sd = log.get("status")
151-
if sd and isinstance(sd, dict) and "code" in sd:
154+
if isinstance(sd, dict) and sd.get("code") == status_code:
152155
status_message = sd.get("message", "") or ""
153156
status_details = sd.get("details", []) or []
154157
raw_extras = log.get("extras") or {}

0 commit comments

Comments
 (0)