aKode fase 5: rinomina interna (crate akode-*, akode-rs/, akode-cli/, binario akode, AKODE_*, ~/.akode, snapshot)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
andrea.difonzo
2026-11-11 11:06:46 +01:00
parent df99318392
commit 86e7c72e5f
10383 changed files with 749164 additions and 749170 deletions

View File

@@ -0,0 +1,29 @@
use akode_protocol::ThreadId;
use pretty_assertions::assert_eq;
use time::macros::datetime;
use super::RolloutFileName;
#[test]
fn canonical_rollout_file_names_round_trip() {
let timestamp = datetime!(2026-08-11 18:42:07 UTC);
let thread_id =
ThreadId::from_string("019ff1a2-b3c4-7d5e-8f60-112233445566").expect("valid thread id");
let rollout_id =
ThreadId::from_string("019ff1a2-b3c4-7d5e-8f60-667788990011").expect("valid rollout id");
for (file_name, expected) in [
(
RolloutFileName::new(timestamp, thread_id, thread_id),
"rollout-2026-08-11T18-42-07-019ff1a2-b3c4-7d5e-8f60-112233445566.jsonl",
),
(
RolloutFileName::new(timestamp, thread_id, rollout_id),
"rollout-2026-08-11T18-42-07-019ff1a2-b3c4-7d5e-8f60-112233445566_019ff1a2-b3c4-7d5e-8f60-667788990011.jsonl",
),
] {
let rendered = file_name.render().expect("timestamp should format");
assert_eq!(rendered, expected);
assert_eq!(RolloutFileName::parse(&rendered), Some(file_name));
}
}