()
| 536 | |
| 537 | #[test] |
| 538 | fn test_derive_with_date_prefix_session() { |
| 539 | let user = UserIdentityInfo { |
| 540 | name: "Dev".to_string(), |
| 541 | email: Some("dev@example.com".to_string()), |
| 542 | public_key_base32: "KEY123".to_string(), |
| 543 | }; |
| 544 | let options = AgentAuthorOptions { |
| 545 | agent_name: "claude-code", |
| 546 | agent_display_name: "Claude Code", |
| 547 | session_id: "2026-01-15-abc123de-f456-7890", |
| 548 | identity_dir: None, |
| 549 | }; |
| 550 | |
| 551 | let author = derive_agent_author(&user, &options); |
| 552 | |
| 553 | // Should skip the date prefix and use "abc1" from the UUID part |
| 554 | assert_eq!(author.name, "claude+abc1"); |
| 555 | assert_eq!(author.email, Some("dev@example.com".to_string())); |
| 556 | } |
| 557 | |
| 558 | // fallback_agent_author |
| 559 |
nothing calls this directly
no test coverage detected