nit: add DB version is discrepancy recording (#10762)

This commit is contained in:
jif-oai
2026-02-05 16:24:18 +00:00
committed by GitHub
parent 901215e310
commit 68e82e5dc9
2 changed files with 7 additions and 2 deletions

View File

@@ -14,6 +14,7 @@ use codex_protocol::protocol::RolloutItem;
use codex_protocol::protocol::SessionSource;
use codex_state::DB_METRIC_COMPARE_ERROR;
pub use codex_state::LogEntry;
use codex_state::STATE_DB_VERSION;
use codex_state::ThreadMetadataBuilder;
use serde_json::Value;
use std::path::Path;
@@ -504,7 +505,11 @@ pub fn record_discrepancy(stage: &str, reason: &str) {
let _ = metric.counter(
DB_METRIC_COMPARE_ERROR,
1,
&[("stage", stage), ("reason", reason)],
&[
("stage", stage),
("reason", reason),
("version", &STATE_DB_VERSION.to_string()),
],
);
}
}