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

Method build

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

Build the attestation.

(self)

Source from the content-addressed store, hash-verified

1056
1057 /// Build the attestation.
1058 pub fn build(self) -> Attestation {
1059 let timestamp = self.timestamp.unwrap_or_else(|| {
1060 std::time::SystemTime::now()
1061 .duration_since(std::time::UNIX_EPOCH)
1062 .map(|d| d.as_secs() as i64)
1063 .unwrap_or(0)
1064 });
1065
1066 Attestation {
1067 version: SCHEMA_VERSION,
1068 timestamp,
1069 agent: self.agent,
1070 session_id: self.session_id,
1071 cost_usd: self.cost_usd,
1072 duration_api_ms: self.duration_api_ms,
1073 duration_wall_ms: self.duration_wall_ms,
1074 code_changes: self.code_changes,
1075 models: self.models,
1076 changes_covered: self.changes_covered,
1077 previous_attestation: self.previous_attestation,
1078 notes: self.notes,
1079 operations_covered: self.operations_covered,
1080 signer: None,
1081 signature: None,
1082 turn_outcomes_root: self.turn_outcomes_root,
1083 capture_root: self.capture_root,
1084 provenance_root: self.provenance_root,
1085 }
1086 }
1087}
1088
1089// Trust Policy

Callers 15

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