()
| 1152 | |
| 1153 | #[test] |
| 1154 | fn test_build_agent_author_fallback() { |
| 1155 | // Without a real identity store, this falls back to display name. |
| 1156 | // In a real install with ~/.atomic/identities/ configured, it would |
| 1157 | // produce the +tag format. |
| 1158 | let author = build_agent_author( |
| 1159 | "claude-code", |
| 1160 | "Claude Code", |
| 1161 | "60f5cbd2-aa23-40ee-9085-4375dd186ce7", |
| 1162 | None, |
| 1163 | ); |
| 1164 | |
| 1165 | // Can't guarantee identity store exists in test env, so just verify |
| 1166 | // the author is valid (either tagged or fallback) |
| 1167 | assert!(!author.name.is_empty()); |
| 1168 | } |
| 1169 | |
| 1170 | /// A name that does not resolve must degrade to a usable author, not an |
| 1171 | /// error — recording a turn must never fail over identity selection. |
nothing calls this directly
no test coverage detected