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

Method build

atomic-core/src/change/attestation.rs:648–670  ·  view source on GitHub ↗

Build the attestation.

(self)

Source from the content-addressed store, hash-verified

646
647 /// Build the attestation.
648 pub fn build(self) -> Attestation {
649 let timestamp = self.timestamp.unwrap_or_else(|| {
650 std::time::SystemTime::now()
651 .duration_since(std::time::UNIX_EPOCH)
652 .map(|d| d.as_secs() as i64)
653 .unwrap_or(0)
654 });
655
656 Attestation {
657 version: SCHEMA_VERSION,
658 timestamp,
659 agent: self.agent,
660 session_id: self.session_id,
661 cost_usd: self.cost_usd,
662 duration_api_ms: self.duration_api_ms,
663 duration_wall_ms: self.duration_wall_ms,
664 code_changes: self.code_changes,
665 models: self.models,
666 changes_covered: self.changes_covered,
667 previous_attestation: self.previous_attestation,
668 notes: self.notes,
669 }
670 }
671}
672
673// Error Type

Callers 13

make_attestationFunction · 0.45
test_builder_minimalFunction · 0.45
test_builder_with_notesFunction · 0.45
test_builder_models_vecFunction · 0.45
test_minimal_roundtripFunction · 0.45
test_is_chained_trueFunction · 0.45
test_cost_display_smallFunction · 0.45
test_cost_display_normalFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected