nit: fix db with multiple metadata lines (#10237)

This commit is contained in:
jif-oai
2026-01-30 18:32:10 +01:00
committed by GitHub
parent 079f4952e0
commit 0212f4010e
2 changed files with 6 additions and 1 deletions

View File

@@ -434,7 +434,7 @@ impl RolloutRecorder {
}
}
info!(
tracing::debug!(
"Resumed rollout with {} items, thread ID: {:?}, parse errors: {}",
items.len(),
thread_id,

View File

@@ -30,6 +30,11 @@ pub fn apply_rollout_item(
}
fn apply_session_meta_from_item(metadata: &mut ThreadMetadata, meta_line: &SessionMetaLine) {
if metadata.id != meta_line.meta.id {
// Ignore session_meta lines that don't match the canonical thread ID,
// e.g., forked rollouts that embed the source session metadata.
return;
}
metadata.id = meta_line.meta.id;
metadata.source = enum_to_string(&meta_line.meta.source);
if let Some(provider) = meta_line.meta.model_provider.as_deref() {