1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
//! Run and CI command arguments.
use std::path::PathBuf;
use clap::Parser;
use super::{JudgeArgs, OutputFormat};
#[derive(Parser, Clone)]
pub struct RunArgs {
#[arg(long, default_value = "eval.yaml")]
pub config: PathBuf,
#[arg(long, default_value = ".eval/eval.db")]
pub db: PathBuf,
#[arg(long, default_value_t = 0)]
pub rerun_failures: u32,
/// quarantine mode: off|warn|strict (controls status of quarantined tests)
#[arg(long, default_value = "warn")]
pub quarantine_mode: String,
/// Trace file to use as Source of Truth for replay (auto-ingested in strict mode)
#[arg(long)]
pub trace_file: Option<PathBuf>,
#[arg(long)]
pub redact_prompts: bool,
#[arg(long)]
pub baseline: Option<PathBuf>,
#[arg(long)]
pub export_baseline: Option<PathBuf>,
/// strict mode (controls exit code policy: warn/flaky -> exit 1)
#[arg(long)]
pub strict: bool,
/// Run a config carrying an assertion that no trace could fail.
///
/// Refusing is the default since 5.0.0 (#1949); this is the escape hatch. Separate from
/// `--strict`, which decides exit codes for warn/flaky results, and from `--deny-deprecations`,
/// which refuses keys this version does not understand. An assertion that cannot fail is
/// neither: it parses, it is current, and it reports a pass that carries no information.
#[arg(long)]
pub allow_ineffective_assertions: bool,
/// embedder provider (none|openai|fake)
#[arg(long, default_value = "none")]
pub embedder: String,
/// embedding model name
#[arg(long, default_value = "text-embedding-3-small")]
pub embedding_model: String,
/// force refresh of embeddings (ignore cache)
#[arg(long)]
pub refresh_embeddings: bool,
/// enable incremental execution (skip passing tests with same fingerprint)
#[arg(long)]
pub incremental: bool,
/// ignore incremental cache (force re-run)
#[arg(long)]
pub refresh_cache: bool,
/// Explicitly disable cache usage (alias for --refresh-cache)
#[arg(long)]
pub no_cache: bool,
/// show details for skipped tests
#[arg(long)]
pub explain_skip: bool,
#[command(flatten)]
pub judge: JudgeArgs,
/// strict replay mode: use trace-file as truth, forbid network, auto-ingest to DB
#[arg(long)]
pub replay_strict: bool,
/// Fail if deprecated v1 policy format is detected
#[arg(long)]
pub deny_deprecations: bool,
/// Exit code compatibility mode: v1 (legacy) or v2 (standard)
/// defaults to v2 (trace not found = 2)
#[arg(long, value_enum, default_value_t, env = "ASSAY_EXIT_CODES")]
pub exit_codes: crate::exit_codes::ExitCodeVersion,
/// Disable signature verification (UNSAFE); recorded in summary.json as verify_enabled: false
#[arg(long)]
pub no_verify: bool,
/// Output format for results: text (human report on stderr) or json
/// (machine-readable report on stdout). The run.json/summary.json
/// artifacts are always written regardless of this flag.
#[arg(long, value_enum, default_value_t = OutputFormat::Text)]
pub format: OutputFormat,
}
impl Default for RunArgs {
fn default() -> Self {
Self {
config: PathBuf::from("eval.yaml"),
db: PathBuf::from(".eval/eval.db"),
rerun_failures: 0,
quarantine_mode: "warn".to_string(),
trace_file: None,
redact_prompts: false,
baseline: None,
export_baseline: None,
strict: false,
embedder: "none".to_string(),
embedding_model: "text-embedding-3-small".to_string(),
refresh_embeddings: false,
incremental: false,
refresh_cache: false,
no_cache: false,
explain_skip: false,
judge: JudgeArgs::default(),
replay_strict: false,
deny_deprecations: false,
allow_ineffective_assertions: false,
exit_codes: crate::exit_codes::ExitCodeVersion::default(),
no_verify: false,
format: OutputFormat::Text,
}
}
}
#[derive(Parser, Clone)]
pub struct CiArgs {
#[arg(long, default_value = "eval.yaml")]
pub config: PathBuf,
#[arg(long, default_value = ".eval/eval.db")]
pub db: PathBuf,
#[arg(long, default_value = "junit.xml")]
pub junit: PathBuf,
#[arg(long, default_value = "sarif.json")]
pub sarif: PathBuf,
#[arg(long, default_value_t = 2)]
pub rerun_failures: u32,
#[arg(long, default_value = "warn")]
pub quarantine_mode: String,
#[arg(long)]
pub otel_jsonl: Option<PathBuf>,
/// Trace file to use as Source of Truth for replay (auto-ingested in strict mode)
#[arg(long)]
pub trace_file: Option<PathBuf>,
#[arg(long)]
pub redact_prompts: bool,
#[arg(long)]
pub baseline: Option<PathBuf>,
#[arg(long)]
pub export_baseline: Option<PathBuf>,
/// strict mode (controls exit code policy: warn/flaky -> exit 1)
#[arg(long)]
pub strict: bool,
/// Refuse to run a config carrying an assertion that no trace could fail.
///
/// Separate from `--strict` (exit-code policy) and `--deny-deprecations` (unknown keys). An
/// assertion that cannot fail is neither: it parses, it is current, and it reports a pass that
/// carries no information.
#[arg(long)]
pub allow_ineffective_assertions: bool,
#[arg(long, default_value = "none")]
pub embedder: String,
#[arg(long, default_value = "text-embedding-3-small")]
pub embedding_model: String,
#[arg(long)]
pub refresh_embeddings: bool,
/// enable incremental execution (skip passing tests with same fingerprint)
#[arg(long)]
pub incremental: bool,
/// ignore incremental cache (force re-run)
#[arg(long)]
pub refresh_cache: bool,
/// Explicitly disable cache usage (alias for --refresh-cache)
#[arg(long)]
pub no_cache: bool,
/// show details for skipped tests
#[arg(long)]
pub explain_skip: bool,
#[command(flatten)]
pub judge: JudgeArgs,
/// strict replay mode: use trace-file as truth, forbid network, auto-ingest to DB
#[arg(long)]
pub replay_strict: bool,
/// Fail if deprecated v1 policy format is detected
#[arg(long)]
pub deny_deprecations: bool,
/// Exit code compatibility mode: v1 (legacy) or v2 (standard)
#[arg(long, value_enum, default_value_t, env = "ASSAY_EXIT_CODES")]
pub exit_codes: crate::exit_codes::ExitCodeVersion,
/// Disable signature verification (UNSAFE); recorded in summary.json as verify_enabled: false
#[arg(long)]
pub no_verify: bool,
/// Output format: text prints the human report to stderr; json prints the summary to stdout.
#[arg(long, value_enum, default_value_t = OutputFormat::Text)]
pub format: OutputFormat,
/// Write PR comment body (markdown) to file for GitHub Actions
#[arg(long)]
pub pr_comment: Option<PathBuf>,
}