pub fn mint_id(kind: &str, recorded_at: &str) -> StringExpand description
A fresh record id: the kind, the stamp, and six hex digits of the moment and process.
The stamp is recorded_at with every character that is not ASCII alphanumeric
removed. The suffix hashes the clock, the process id and a counter, so two ids minted
by one process in the same instant still differ.
use majordomus_cli::reasoning::store::mint_id;
let a = mint_id("plan", "2026-10-01T00:00:00Z");
let b = mint_id("plan", "2026-10-01T00:00:00Z");
assert!(a.starts_with("plan-20261001T000000Z-"));
assert_eq!(a.len(), "plan-20261001T000000Z-".len() + 6);
assert_ne!(a, b);