trusty_code/redundant_run.rs
1//! Redundant full-suite test re-run suppression (#2682).
2//!
3//! Why: (bake-off L1 diagnosis) The delegated engineer re-runs the full test
4//! suite 7-14x per run, typically framed as "one final run to confirm", even
5//! when NO code has changed since the last clean pass. Each redundant re-run
6//! burns a whole turn (and the suite's wall-clock cost), inflating tcode's
7//! turn count (~33-49) far above claude-code's (~15) on the same challenge.
8//! The sibling verify-before-finish gate (#2279) guarantees the suite runs at
9//! LEAST once; this module is its complement — it stops the suite running MORE
10//! than it needs to. Together they bracket the correct behaviour: exactly one
11//! clean full-suite pass after the last code change, no more and no less.
12//! What: [`is_redundant_test_rerun`] is a pure predicate over a loop's
13//! transcript. A proposed `bash` test invocation is redundant iff the most
14//! recent prior test invocation ran the BYTE-IDENTICAL command, already PASSED,
15//! and nothing that could have changed the tree (a `write_file`/`write_files`/
16//! `edit`, or any non-test `bash` command) has run since. Command identity is
17//! load-bearing (#2804 review): a narrow run passing (`cargo test -p a`) must
18//! never suppress a broader/different one (`cargo test --workspace`,
19//! `cargo test -p b`) that never actually ran, nor may a compile-only
20//! `cargo test --no-run` suppress the real subsequent run. The predicate reuses
21//! `verify_gate`'s `is_test_command` / `bash_command_from_call` so the two
22//! gates can never drift on what counts as a test invocation. `agent_loop::AgentLoop`'s
23//! dispatch loop consults it (when suppression is enabled via
24//! `AgentLoop::with_redundant_run_suppression`) and, on a match, short-circuits
25//! the dispatch with [`REDUNDANT_RERUN_MESSAGE`] instead of actually spawning
26//! the suite — saving the turn's wall-clock cost and nudging the model to
27//! proceed to finish. (#2857) That short-circuit is itself a decision that
28//! silently changes the run's outcome (a test invocation the model requested
29//! did NOT happen), so `agent_loop::AgentLoop::dispatch_all` logs it via
30//! `tracing::info!` at the call site — a suppressed run is still the
31//! expected, by-design outcome (not a failure), so `info` rather than `warn`.
32//! Test: `redundant_run::tests::*`, plus
33//! `agent_loop::tests::redundant_test_rerun_is_suppressed`,
34//! `agent_loop::tests::test_rerun_after_edit_is_not_suppressed`, and
35//! `agent_loop::tests::redundant_rerun_suppression_logs_info`.
36//!
37//! [`is_redundant_test_rerun`]: crate::redundant_run::is_redundant_test_rerun
38//! [`REDUNDANT_RERUN_MESSAGE`]: crate::redundant_run::REDUNDANT_RERUN_MESSAGE
39
40use crate::llm::{ChatMessage, ToolCall};
41use crate::tools::BASH_TOOL_NAME;
42use crate::verify_gate::{bash_command_from_call, is_test_command};
43
44/// The `ToolResult` text returned in place of a suppressed redundant re-run.
45///
46/// Why: The model must understand WHY its test command produced no fresh
47/// output, so it stops retrying and moves on — a silent no-op would just
48/// invite another confirmation run. Phrasing it as a normal (non-error)
49/// result keeps the loop calm: nothing failed, the prior pass still stands.
50/// What: A fixed, model-facing sentence explaining the suppression and the
51/// invariant it relies on — the SAME command already passed and no code has
52/// changed since. It is only ever emitted for a byte-identical re-run (see
53/// [`is_redundant_test_rerun`]), so "this exact command" is always accurate.
54/// Test: `redundant_run::tests::suppression_message_is_informative`.
55pub const REDUNDANT_RERUN_MESSAGE: &str = "skipped: this exact test command already passed \
56earlier in this session and no code has changed since (no write_file/edit and no other shell \
57command ran between that passing run and this one). Re-running the identical command would \
58produce the same result and cost a turn. The prior clean pass still stands — proceed to finish \
59the task, or run a DIFFERENT (e.g. broader) command if you need to verify something the passing \
60run did not cover.";
61
62/// Tool names that are pure read-only discovery and therefore CANNOT
63/// invalidate a passing test baseline.
64///
65/// Why: Between a clean test pass and a redundant re-run the model typically
66/// does nothing, or merely re-reads files — none of which changes the tree, so
67/// none of which makes a re-run non-redundant. Anything NOT on this allowlist
68/// (a write, an edit, an arbitrary shell command, a skill load, a delegation)
69/// is treated as potentially state-changing, which errs toward RUNNING the
70/// suite — the conservative, correctness-first default the acceptance criteria
71/// demand ("the single final run must still occur after the last code change").
72/// What: The read-only file/discovery tools registered in the engineer's tool
73/// set. `bash` is deliberately absent — a `bash` call is classified by its
74/// command (a test command preserves the baseline; any other command is
75/// treated as potentially mutating).
76/// Test: `redundant_run::tests::read_only_activity_keeps_run_redundant`,
77/// `redundant_run::tests::non_test_bash_between_runs_defeats_suppression`.
78const READ_ONLY_TOOLS: &[&str] = &[
79 "read_file",
80 "grep",
81 "glob",
82 "list_dir",
83 "search_code",
84 "recall_session",
85];
86
87/// Whether a `bash` tool-result's captured output indicates the command exited
88/// 0 (the suite PASSED).
89///
90/// Why: Only a PASSING prior run makes a re-run redundant — re-running a suite
91/// that last FAILED is legitimate (the model may have fixed something, or may
92/// be re-reading the failure), so the gate must never suppress it. The bash
93/// tool always appends a final `exit_code: N` line to its captured output
94/// (`tools::bash`), which is the one reliable pass/fail signal available from
95/// the transcript.
96/// What: `true` iff the result text, trimmed of trailing whitespace, ends with
97/// exactly `exit_code: 0`. `exit_code: 10` / `exit_code: 1` and the
98/// suppression sentinel (which carries no `exit_code:` line) all read as "not
99/// a pass".
100/// Test: `redundant_run::tests::exit_zero_reads_as_pass`,
101/// `redundant_run::tests::nonzero_and_missing_exit_read_as_not_pass`.
102fn test_result_passed(result_content: &str) -> bool {
103 result_content.trim_end().ends_with("exit_code: 0")
104}
105
106/// Whether the `tool`-role result answering `call_id` in `messages` reports a
107/// passing exit.
108///
109/// Why: A test invocation only establishes a passing baseline once its result
110/// has actually been recorded and shows exit 0; a call whose result is not yet
111/// present (e.g. the proposed re-run itself, mid-dispatch) must not count.
112/// What: Finds the first `tool` message whose `tool_call_id == call_id` and
113/// applies [`test_result_passed`] to its content; `false` when absent.
114/// Test: exercised via `is_redundant_test_rerun` in
115/// `redundant_run::tests::passing_prior_run_makes_rerun_redundant`,
116/// `redundant_run::tests::failing_prior_run_is_not_redundant`.
117fn call_result_passed(messages: &[ChatMessage], call_id: &str) -> bool {
118 messages
119 .iter()
120 .find(|m| m.role == "tool" && m.tool_call_id.as_deref() == Some(call_id))
121 .and_then(|m| m.content.as_deref())
122 .map(test_result_passed)
123 .unwrap_or(false)
124}
125
126/// Fold one completed tool `call` into the running baseline: the exact command
127/// string of the most recent test run that PASSED with nothing state-changing
128/// since, or `None`.
129///
130/// Why: Centralises the single rule that decides, per tool call, whether a
131/// prior clean test pass survives it — and, critically (#2804 review),
132/// remembers WHICH command passed so a later re-run is only suppressed when it
133/// is byte-identical. A bare `bool` would wrongly suppress a broader/different
134/// command (`cargo test --workspace`) just because a narrower one
135/// (`cargo test -- foo`) passed.
136/// What: A passing `bash` test command SETS the baseline to `Some(command)`; a
137/// FAILING test command CLEARS it (`None`); any other `bash` command CLEARS it
138/// (a shell command may have mutated the tree); a [`READ_ONLY_TOOLS`] call
139/// leaves it unchanged; every other tool CLEARS it (conservative — treat
140/// unknown effects as state-changing).
141/// Test: exercised via `is_redundant_test_rerun` across
142/// `redundant_run::tests::*`.
143fn fold_call(baseline: &mut Option<String>, call: &ToolCall, messages: &[ChatMessage]) {
144 if let Some(command) = bash_command_from_call(call) {
145 *baseline = (is_test_command(&command) && call_result_passed(messages, &call.id))
146 .then_some(command);
147 return;
148 }
149 if READ_ONLY_TOOLS.contains(&call.function.name.as_str()) {
150 return;
151 }
152 *baseline = None;
153}
154
155/// Whether two shell command strings are the "same" test invocation for
156/// suppression purposes.
157///
158/// Why: Suppression must require command IDENTITY (#2804 review): re-running a
159/// DIFFERENT command — a broader scope, a different package, a previously
160/// compile-only `--no-run` now actually executing — is a genuinely-needed run,
161/// never redundant. Defaulting to exact match (not a fuzzy/normalized one)
162/// keeps the gate conservative: a false "same" verdict would suppress a real
163/// run, so anything short of certainty must read as "different".
164/// What: Exact string equality after trimming leading/trailing whitespace only
165/// — the sole normalization, so a stray surrounding space cannot force an
166/// otherwise-identical re-run to execute. Internal differences (flags, paths,
167/// package selectors, `--no-run`) are all preserved and therefore all count as
168/// a different command.
169/// Test: `redundant_run::tests::different_test_command_after_pass_is_not_redundant`,
170/// `redundant_run::tests::passing_prior_run_makes_rerun_redundant`.
171fn same_test_command(baseline: &str, pending: &str) -> bool {
172 baseline.trim() == pending.trim()
173}
174
175/// Whether the pending `bash` test call `current_call_id` would be a redundant
176/// re-run: the SAME command already passed with nothing changed since.
177///
178/// Why: This is the gate `agent_loop::AgentLoop::dispatch_all` consults before
179/// spawning a test suite — the whole point of #2682. It must be conservative:
180/// a `true` result suppresses a real execution, so a false positive would hide
181/// a genuinely-needed run. The predicate therefore only returns `true` when a
182/// prior run demonstrably PASSED, every tool call since is demonstrably
183/// non-mutating, AND (#2804 review) the pending command is byte-identical to
184/// that passing command — a broader or otherwise-different command is never
185/// suppressed.
186/// What: Folds every assistant tool call in `messages`, in order, up to (but
187/// excluding) the call identified by `current_call_id` — the proposed re-run
188/// itself, and anything after it, is irrelevant — tracking the exact command
189/// of the most recent still-valid passing test run (or `None`). On reaching
190/// the pending call, extracts ITS command and returns `true` only when a
191/// baseline command exists and [`same_test_command`] holds. Because the
192/// proposed call's own (not-yet-recorded) result is never consulted, and any
193/// same-turn write/edit BEFORE it clears the baseline, the answer reflects tree
194/// state exactly as of just before the re-run.
195/// Test: `redundant_run::tests::passing_prior_run_makes_rerun_redundant`,
196/// `redundant_run::tests::different_test_command_after_pass_is_not_redundant`,
197/// `redundant_run::tests::failing_prior_run_is_not_redundant`,
198/// `redundant_run::tests::edit_between_runs_defeats_suppression`,
199/// `redundant_run::tests::no_prior_run_is_not_redundant`,
200/// `redundant_run::tests::same_turn_edit_before_rerun_defeats_suppression`.
201pub fn is_redundant_test_rerun(messages: &[ChatMessage], current_call_id: &str) -> bool {
202 let mut baseline: Option<String> = None;
203 for message in messages {
204 if message.role != "assistant" {
205 continue;
206 }
207 let Some(calls) = message.tool_calls.as_ref() else {
208 continue;
209 };
210 for call in calls {
211 if call.id == current_call_id {
212 return match (baseline.as_deref(), bash_command_from_call(call)) {
213 (Some(passed), Some(pending)) => same_test_command(passed, &pending),
214 _ => false,
215 };
216 }
217 fold_call(&mut baseline, call, messages);
218 }
219 }
220 // The pending call was not found in the transcript — fail safe (never
221 // suppress a call we cannot locate). In practice `dispatch_all` always
222 // passes a `call.id` present in the just-pushed assistant turn.
223 false
224}
225
226/// Whether `call` is a `bash` invocation of a test command — the cheap
227/// pre-filter `dispatch_all` applies before the fuller
228/// [`is_redundant_test_rerun`] transcript scan.
229///
230/// Why: Only a `bash` test call can ever be a redundant re-run, so the dispatch
231/// loop should not pay for the transcript scan on every other tool call.
232/// What: `true` iff `call` names [`BASH_TOOL_NAME`] and its extracted command
233/// [`is_test_command`].
234/// Test: `redundant_run::tests::is_test_bash_call_true_only_for_test_bash`.
235pub fn is_test_bash_call(call: &ToolCall) -> bool {
236 call.function.name == BASH_TOOL_NAME
237 && bash_command_from_call(call).is_some_and(|c| is_test_command(&c))
238}
239
240// ── Tests ─────────────────────────────────────────────────────────────────────
241
242#[cfg(test)]
243mod tests {
244 use super::*;
245 use crate::llm::FunctionCall;
246
247 /// Build a `bash` tool call with the given id and command.
248 fn bash_call(id: &str, command: &str) -> ToolCall {
249 ToolCall {
250 id: id.into(),
251 kind: "function".into(),
252 function: FunctionCall {
253 name: BASH_TOOL_NAME.into(),
254 arguments: serde_json::json!({ "command": command }).to_string(),
255 },
256 }
257 }
258
259 /// Build a non-`bash` tool call (e.g. `write_file`, `read_file`).
260 fn tool_call(id: &str, name: &str) -> ToolCall {
261 ToolCall {
262 id: id.into(),
263 kind: "function".into(),
264 function: FunctionCall {
265 name: name.into(),
266 arguments: "{}".into(),
267 },
268 }
269 }
270
271 /// An assistant turn carrying the given tool calls.
272 fn assistant(calls: Vec<ToolCall>) -> ChatMessage {
273 ChatMessage {
274 role: "assistant".into(),
275 content: None,
276 tool_calls: Some(calls),
277 tool_call_id: None,
278 name: None,
279 cache_control: None,
280 }
281 }
282
283 /// A `tool`-role result answering `call_id` with a bash-shaped body ending
284 /// in `exit_code: {code}`.
285 fn bash_result(call_id: &str, code: i32) -> ChatMessage {
286 ChatMessage::tool_result(
287 call_id,
288 BASH_TOOL_NAME,
289 format!("stdout:\nok\nexit_code: {code}"),
290 )
291 }
292
293 /// [`test_result_passed`] treats a trailing `exit_code: 0` as a pass.
294 ///
295 /// Why: Exit 0 is the one pass signal the bash tool guarantees.
296 /// What: Assert on a realistic passing bash body.
297 /// Test: this test.
298 #[test]
299 fn exit_zero_reads_as_pass() {
300 assert!(test_result_passed("stdout:\n5 passed\nexit_code: 0"));
301 assert!(test_result_passed("exit_code: 0\n"));
302 }
303
304 /// [`test_result_passed`] rejects non-zero and missing exit codes.
305 ///
306 /// Why: A failing or unknown run must never establish a passing baseline —
307 /// and `exit_code: 10` must not be mistaken for `exit_code: 0`.
308 /// What: Non-zero exits, the suppression sentinel, and empty text.
309 /// Test: this test.
310 #[test]
311 fn nonzero_and_missing_exit_read_as_not_pass() {
312 assert!(!test_result_passed("stderr:\nFAILED\nexit_code: 1"));
313 assert!(!test_result_passed("exit_code: 10"));
314 assert!(!test_result_passed(REDUNDANT_RERUN_MESSAGE));
315 assert!(!test_result_passed(""));
316 }
317
318 /// A passing prior run with nothing since makes an identical re-run
319 /// redundant.
320 ///
321 /// Why: This is the core acceptance behaviour — the exact "one final run to
322 /// confirm" loop the ticket eliminates.
323 /// What: Turn 1 runs `cargo test` and it passes (exit 0); turn 2 proposes
324 /// `cargo test` again with nothing in between; assert redundant.
325 /// Test: this test.
326 #[test]
327 fn passing_prior_run_makes_rerun_redundant() {
328 let messages = vec![
329 assistant(vec![bash_call("t1", "cargo test -p trusty-code")]),
330 bash_result("t1", 0),
331 assistant(vec![bash_call("t2", "cargo test -p trusty-code")]),
332 ];
333 assert!(is_redundant_test_rerun(&messages, "t2"));
334 }
335
336 /// A DIFFERENT test command after a pass is NOT redundant — suppression
337 /// requires command IDENTITY (#2804 review).
338 ///
339 /// Why: A narrow run passing (`cargo test -p a`) must never suppress a
340 /// broader/different run (`cargo test -p b`, `cargo test --workspace`) that
341 /// was never actually executed — that would silently skip real coverage.
342 /// What: Turn 1 runs `cargo test -p a` and passes; turn 2 proposes
343 /// `cargo test -p b`; assert NOT redundant. The reverse (same command) is
344 /// covered by `passing_prior_run_makes_rerun_redundant`.
345 /// Test: this test.
346 #[test]
347 fn different_test_command_after_pass_is_not_redundant() {
348 let messages = vec![
349 assistant(vec![bash_call("t1", "cargo test -p a")]),
350 bash_result("t1", 0),
351 assistant(vec![bash_call("t2", "cargo test -p b")]),
352 ];
353 assert!(!is_redundant_test_rerun(&messages, "t2"));
354 }
355
356 /// A `--no-run` compile-only pass does NOT suppress a subsequent REAL run
357 /// of the same suite — because the real run's command string differs
358 /// (#2804 review, secondary concern).
359 ///
360 /// Why: `cargo test --no-run` compiles but executes zero tests, then exits
361 /// 0. Command-identity matching already prevents it suppressing a genuine
362 /// `cargo test` run: the two command strings are not equal, so the gate
363 /// treats them as different runs — no special-casing of `--no-run` needed.
364 /// What: Turn 1 runs `cargo test --no-run` (exit 0); turn 2 proposes the
365 /// real `cargo test`; assert NOT redundant.
366 /// Test: this test.
367 #[test]
368 fn compile_only_pass_does_not_suppress_real_run() {
369 let messages = vec![
370 assistant(vec![bash_call("t1", "cargo test --no-run")]),
371 bash_result("t1", 0),
372 assistant(vec![bash_call("t2", "cargo test")]),
373 ];
374 assert!(!is_redundant_test_rerun(&messages, "t2"));
375 }
376
377 /// Surrounding whitespace does not defeat identity — a re-run of the SAME
378 /// command with a stray leading/trailing space is still redundant.
379 ///
380 /// Why: `same_test_command` trims outer whitespace only, so a trivially
381 /// re-emitted command is still recognised while every internal difference
382 /// (flags, scope) is preserved.
383 /// What: Turn 1 `cargo test` passes; turn 2 proposes ` cargo test ` (outer
384 /// spaces); assert redundant.
385 /// Test: this test.
386 #[test]
387 fn outer_whitespace_does_not_defeat_identity() {
388 let messages = vec![
389 assistant(vec![bash_call("t1", "cargo test")]),
390 bash_result("t1", 0),
391 assistant(vec![bash_call("t2", " cargo test ")]),
392 ];
393 assert!(is_redundant_test_rerun(&messages, "t2"));
394 }
395
396 /// A FAILING prior run makes a re-run NOT redundant.
397 ///
398 /// Why: The model may re-run a failing suite legitimately; suppressing it
399 /// would hide the failure and break the loop's self-correction.
400 /// What: Turn 1's `cargo test` exits 1; turn 2 proposes it again; assert
401 /// NOT redundant.
402 /// Test: this test.
403 #[test]
404 fn failing_prior_run_is_not_redundant() {
405 let messages = vec![
406 assistant(vec![bash_call("t1", "cargo test")]),
407 bash_result("t1", 1),
408 assistant(vec![bash_call("t2", "cargo test")]),
409 ];
410 assert!(!is_redundant_test_rerun(&messages, "t2"));
411 }
412
413 /// A `write_file`/`edit` between a passing run and a re-run defeats
414 /// suppression — the genuinely-needed post-change run still fires.
415 ///
416 /// Why: This is the correctness guarantee the acceptance criteria name:
417 /// "the single final run must still occur after the last code change".
418 /// What: pass → `edit` → propose re-run; assert NOT redundant.
419 /// Test: this test.
420 #[test]
421 fn edit_between_runs_defeats_suppression() {
422 let messages = vec![
423 assistant(vec![bash_call("t1", "cargo test")]),
424 bash_result("t1", 0),
425 assistant(vec![tool_call("e1", "edit")]),
426 ChatMessage::tool_result("e1", "edit", "edited"),
427 assistant(vec![bash_call("t2", "cargo test")]),
428 ];
429 assert!(!is_redundant_test_rerun(&messages, "t2"));
430 }
431
432 /// Read-only activity (read_file/grep/glob) between a passing run and a
433 /// re-run keeps the re-run redundant.
434 ///
435 /// Why: Re-reading files changes nothing on disk, so a re-run after only
436 /// reads is still a wasted confirmation.
437 /// What: pass → `read_file` + `grep` → propose re-run; assert redundant.
438 /// Test: this test.
439 #[test]
440 fn read_only_activity_keeps_run_redundant() {
441 let messages = vec![
442 assistant(vec![bash_call("t1", "pytest tests/ -v")]),
443 bash_result("t1", 0),
444 assistant(vec![tool_call("r1", "read_file"), tool_call("g1", "grep")]),
445 ChatMessage::tool_result("r1", "read_file", "..."),
446 ChatMessage::tool_result("g1", "grep", "..."),
447 assistant(vec![bash_call("t2", "pytest tests/ -v")]),
448 ];
449 assert!(is_redundant_test_rerun(&messages, "t2"));
450 }
451
452 /// A non-test `bash` command between runs defeats suppression.
453 ///
454 /// Why: An arbitrary shell command (`sed -i`, `git checkout`, a build) may
455 /// mutate the tree, so a subsequent test run is not provably redundant.
456 /// What: pass → `bash: git checkout .` → propose re-run; assert NOT
457 /// redundant.
458 /// Test: this test.
459 #[test]
460 fn non_test_bash_between_runs_defeats_suppression() {
461 let messages = vec![
462 assistant(vec![bash_call("t1", "cargo test")]),
463 bash_result("t1", 0),
464 assistant(vec![bash_call("b1", "git checkout .")]),
465 bash_result("b1", 0),
466 assistant(vec![bash_call("t2", "cargo test")]),
467 ];
468 assert!(!is_redundant_test_rerun(&messages, "t2"));
469 }
470
471 /// With no prior test run at all, the first run is never redundant.
472 ///
473 /// Why: The first execution is always genuinely needed — the gate must be
474 /// inert until a baseline exists.
475 /// What: A single proposed `cargo test` with empty history; assert NOT
476 /// redundant.
477 /// Test: this test.
478 #[test]
479 fn no_prior_run_is_not_redundant() {
480 let messages = vec![assistant(vec![bash_call("t1", "cargo test")])];
481 assert!(!is_redundant_test_rerun(&messages, "t1"));
482 }
483
484 /// A same-turn edit emitted BEFORE the re-run (batched) defeats
485 /// suppression.
486 ///
487 /// Why: The model can batch `edit` + `cargo test` in one turn; the edit
488 /// must invalidate the prior baseline even though it shares the proposed
489 /// run's turn.
490 /// What: pass → [turn: `edit` then `cargo test`]; propose the same-turn
491 /// `cargo test`; assert NOT redundant.
492 /// Test: this test.
493 #[test]
494 fn same_turn_edit_before_rerun_defeats_suppression() {
495 let messages = vec![
496 assistant(vec![bash_call("t1", "cargo test")]),
497 bash_result("t1", 0),
498 assistant(vec![tool_call("e1", "edit"), bash_call("t2", "cargo test")]),
499 ];
500 assert!(!is_redundant_test_rerun(&messages, "t2"));
501 }
502
503 /// [`is_test_bash_call`] is true only for a `bash` call whose command is a
504 /// test command.
505 ///
506 /// Why: The dispatch-loop pre-filter must not trip on a non-`bash` tool or
507 /// a non-test shell command.
508 /// What: A test bash call (true), a non-test bash call (false), a
509 /// `write_file` call (false).
510 /// Test: this test.
511 #[test]
512 fn is_test_bash_call_true_only_for_test_bash() {
513 assert!(is_test_bash_call(&bash_call("a", "cargo test")));
514 assert!(!is_test_bash_call(&bash_call("b", "git status")));
515 assert!(!is_test_bash_call(&tool_call("c", "write_file")));
516 }
517
518 /// The suppression message names the invariant it relies on so the model
519 /// can trust it.
520 ///
521 /// Why: A vague message would invite the very re-run it means to prevent.
522 /// What: Assert the sentinel mentions "already passed" and "proceed to
523 /// finish".
524 /// Test: this test.
525 #[test]
526 fn suppression_message_is_informative() {
527 assert!(REDUNDANT_RERUN_MESSAGE.contains("already passed"));
528 assert!(REDUNDANT_RERUN_MESSAGE.contains("proceed to finish"));
529 }
530}