mirror of
https://github.com/instructkr/claw-code.git
synced 2026-05-19 05:51:26 +08:00
omx(team): auto-checkpoint worker-1 [1]
This commit is contained in:
@@ -458,10 +458,12 @@ pub fn compute_event_fingerprint(
|
|||||||
});
|
});
|
||||||
let canonical = serde_json::to_vec(&payload).unwrap_or_default();
|
let canonical = serde_json::to_vec(&payload).unwrap_or_default();
|
||||||
let digest = Sha256::digest(canonical);
|
let digest = Sha256::digest(canonical);
|
||||||
digest[..8]
|
let mut fingerprint = String::with_capacity(16);
|
||||||
.iter()
|
for byte in &digest[..8] {
|
||||||
.map(|byte| format!("{byte:02x}"))
|
use std::fmt::Write as _;
|
||||||
.collect()
|
write!(&mut fingerprint, "{byte:02x}").expect("writing to String should not fail");
|
||||||
|
}
|
||||||
|
fingerprint
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Classification of event terminality for reconciliation.
|
/// Classification of event terminality for reconciliation.
|
||||||
|
|||||||
Reference in New Issue
Block a user