anthonyoteri / anthonyoteri/cargo-rigtest

Transient-only retry policy (retry infra failures, never assertions)

Abierto
#98 0 comentarios 0 reacciones 0 asignados Ver en GitHub
AI Generated enhancement
Lenguaje dominante
Rust
Estrellas
0
Forks
0
Merge medio
3 d 18 h
PR fusionados (30 d)
8

Descripción

## Problem

`retries = N` retries on *any* failure, which can mask a real assertion bug. `retry_on_error = ` avoids that but requires threading typed error variants through the test signature. The common need — "retry only on transient infra errors (connection reset / timeout), never on an assertion failure" — is verbose to express.

## Proposal

A built-in transient-only retry mode:

```rust
#[testcase(retries = 2, retry_on = transient)]
async fn t(ctx: Arc) -> Result<(), rigtest::Error> { Ok(()) }
```

- `retry_on = transient` retries on setup-phase failures / a provided error predicate, and **never** on assertion panics.
- Optionally allow registering a global "is this error transient?" classifier for the suite.

## Why

Makes flaky-infra resilience a one-liner without risking a masked regression — assertion failures stay loud, transient blips self-heal. Report the retry count per case so flakiness stays visible.

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Trace the existing #[testcase] handling for retries and retry_on_error, including how setup errors and assertion panics are distinguished. Define and test transient-only behavior so matching setup failures retry, assertion panics never do, and each case reports its retry count; also resolve whether suite-wide classification is required.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
rust
Área
testing
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Tranquilo
Claridad
Bastante claro
Aptitud para principiantes
42/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.