()
| 1410 | |
| 1411 | #[test] |
| 1412 | fn test_session_record_roundtrip() { |
| 1413 | let record = SessionRecord { |
| 1414 | session_id: "sess-1".into(), |
| 1415 | json_path: ".atomic/sessions/sess-1.json".into(), |
| 1416 | view_name: Some("agent-sess-1".into()), |
| 1417 | parent_view: Some("main".into()), |
| 1418 | first_provenance: Some(Hash::of(b"p0")), |
| 1419 | latest_provenance: Some(Hash::of(b"p1")), |
| 1420 | turn_count: 2, |
| 1421 | started_at: 100, |
| 1422 | ended_at: None, |
| 1423 | status: SessionStatus::Incomplete(IncompleteSession::new( |
| 1424 | "working copy moved during managed turn", |
| 1425 | vec!["src/z.rs".into(), "src/a.rs".into(), "src/a.rs".into()], |
| 1426 | "refs/atomic/wip/run-1", |
| 1427 | SessionIncompleteOrigin::UnknownPostCheckout, |
| 1428 | )), |
| 1429 | }; |
| 1430 | |
| 1431 | assert_eq!( |
| 1432 | SessionRecord::from_bytes(&record.to_bytes()).unwrap(), |
| 1433 | record |
| 1434 | ); |
| 1435 | assert_eq!( |
| 1436 | record.status.incomplete().unwrap().paths, |
| 1437 | vec!["src/a.rs", "src/z.rs"] |
| 1438 | ); |
| 1439 | } |
| 1440 | |
| 1441 | #[test] |
| 1442 | fn test_session_record_reads_pre_status_encoding() { |
nothing calls this directly
no outgoing calls
no test coverage detected