1use std::path::PathBuf;
2
3use chrono::{DateTime, Utc};
4use ought_spec::{ClauseId, Keyword};
5
6#[derive(Debug, Clone)]
10pub struct SurveyResult {
11 pub uncovered: Vec<UncoveredBehavior>,
12}
13
14#[derive(Debug, Clone)]
16pub struct UncoveredBehavior {
17 pub file: PathBuf,
18 pub line: usize,
19 pub description: String,
20 pub suggested_clause: String,
21 pub suggested_keyword: Keyword,
22 pub suggested_spec: PathBuf,
23}
24
25#[derive(Debug, Clone)]
29pub struct AuditResult {
30 pub findings: Vec<AuditFinding>,
31}
32
33#[derive(Debug, Clone)]
35pub struct AuditFinding {
36 pub kind: AuditFindingKind,
37 pub description: String,
38 pub clauses: Vec<ClauseId>,
39 pub suggestion: Option<String>,
40 pub confidence: Option<f64>,
41}
42
43#[derive(Debug, Clone, Copy, PartialEq, Eq)]
44pub enum AuditFindingKind {
45 Contradiction,
46 Gap,
47 Ambiguity,
48 Redundancy,
49}
50
51#[derive(Debug, Clone)]
55pub struct BlameResult {
56 pub clause_id: ClauseId,
57 pub last_passed: Option<DateTime<Utc>>,
58 pub first_failed: Option<DateTime<Utc>>,
59 pub likely_commit: Option<CommitInfo>,
60 pub narrative: String,
61 pub suggested_fix: Option<String>,
62}
63
64#[derive(Debug, Clone)]
66pub struct CommitInfo {
67 pub hash: String,
68 pub message: String,
69 pub author: String,
70 pub date: DateTime<Utc>,
71}
72
73#[derive(Debug, Clone)]
77pub struct BisectResult {
78 pub clause_id: ClauseId,
79 pub breaking_commit: CommitInfo,
80 pub diff_summary: String,
81}