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