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

Function test_builder_all_fields

atomic-agent/src/envelope.rs:620–638  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

618
619 #[test]
620 fn test_builder_all_fields() {
621 let e = make_envelope();
622 assert_eq!(e.session_id, "sess-abc-123");
623 assert_eq!(e.agent_name, "claude-code");
624 assert_eq!(e.agent_display_name.as_deref(), Some("Claude Code"));
625 assert_eq!(e.turn_number, 3);
626 assert_eq!(e.total_turns, Some(7));
627 assert_eq!(e.session_started_at, 1737000000);
628 assert_eq!(e.turn_started_at, 1737000300);
629 assert_eq!(e.turn_ended_at, 1737000312);
630 assert_eq!(e.turn_duration_ms, 12400);
631 assert_eq!(
632 e.prompt_summary.as_deref(),
633 Some("Fix the authentication bug in login.rs")
634 );
635 assert_eq!(e.files_in_turn.len(), 2);
636 assert_eq!(e.files_in_session, 5);
637 assert_eq!(e.delegation_id.as_deref(), Some("deleg-xyz"));
638 }
639
640 #[test]
641 fn test_builder_prompt_hash_from_text() {

Callers

nothing calls this directly

Calls 1

make_envelopeFunction · 0.85

Tested by

no test coverage detected