Build the attestation.
(self)
| 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 |
no outgoing calls
no test coverage detected