(
repo_root: &Path,
initial: &str,
agent_identity: Option<&str>,
identity_dir: Option<std::path::PathBuf>,
)
| 1354 | } |
| 1355 | |
| 1356 | fn record_signed_turn( |
| 1357 | repo_root: &Path, |
| 1358 | initial: &str, |
| 1359 | agent_identity: Option<&str>, |
| 1360 | identity_dir: Option<std::path::PathBuf>, |
| 1361 | ) -> crate::record::TurnRecordOutcome { |
| 1362 | let mut session = AgentSession::new("signed-sess", "claude-code", "Claude Code"); |
| 1363 | session.view_name = "session-signed".to_string(); |
| 1364 | session.set_parent_view("dev"); |
| 1365 | |
| 1366 | std::fs::write(repo_root.join("sign-me.txt"), "second\n").unwrap(); |
| 1367 | debug_assert_ne!(initial, "second\n"); |
| 1368 | |
| 1369 | let event = TurnEvent::new("signed-sess", HookType::TurnEnd); |
| 1370 | let options = TurnRecordOptions { |
| 1371 | session: &session, |
| 1372 | event: &event, |
| 1373 | turn_number: 1, |
| 1374 | turn_duration_ms: 1000, |
| 1375 | prompt: Some("Edit sign-me.txt".to_string()), |
| 1376 | agent_identity: agent_identity.map(str::to_string), |
| 1377 | identity_dir, |
| 1378 | }; |
| 1379 | record_turn(repo_root, &options).unwrap() |
| 1380 | } |
| 1381 | |
| 1382 | #[test] |
| 1383 | fn a_turn_with_a_selected_agent_identity_is_signed_with_the_agents_key() { |
no test coverage detected