MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_derive_with_date_prefix_session

Function test_derive_with_date_prefix_session

atomic-agent/src/identity.rs:734–753  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

732
733 #[test]
734 fn test_derive_with_date_prefix_session() {
735 let user = UserIdentityInfo {
736 name: "Dev".to_string(),
737 email: Some("dev@example.com".to_string()),
738 public_key_base32: "KEY123".to_string(),
739 };
740 let options = AgentAuthorOptions {
741 agent_name: "claude-code",
742 agent_display_name: "Claude Code",
743 session_id: "2026-01-15-abc123de-f456-7890",
744 identity_dir: None,
745 agent_identity: None,
746 };
747
748 let author = derive_agent_author(&user, &options);
749
750 // Should skip the date prefix and use "abc1" from the UUID part
751 assert_eq!(author.name, "claude+abc1");
752 assert_eq!(author.email, Some("dev@example.com".to_string()));
753 }
754
755 // fallback_agent_author
756

Callers

nothing calls this directly

Calls 1

derive_agent_authorFunction · 0.85

Tested by

no test coverage detected