Feat: Add Note for tests with known Issues (flakiness) - #22
Conversation
PR Summary by QodoAdd KnownIssue() annotation for flaky tests (visibility-only)
AI Description
Diagram
High-Level Assessment
Files changed (4)
|
Code Review by Qodo
1. KnownIssue skipped on timeout
|
| if !result.Success && t.knownIssueReason != "" { | ||
| result.Message += colorYellow(fmt.Sprintf(" (known issue: %s)", t.knownIssueReason)) | ||
| } |
There was a problem hiding this comment.
1. Knownissue skipped on timeout 🐞 Bug ≡ Correctness
Trial.testCase appends the known-issue suffix only at the end of the function, but timeout and panic-related code paths return early, so those failing cases never include the KnownIssue annotation. This contradicts the documented behavior (“When a case fails, output includes a suffix…”) and reduces visibility for some of the most important failure modes (timeouts/panics).
Agent Prompt
## Issue description
`KnownIssue()` is intended to append a suffix to *any failing case*, but `testCase()` currently appends the suffix only at the end of the normal path. Early returns (timeout, panic-handling) bypass this, so those failing results lack the known-issue annotation.
## Issue Context
- Timeout failures (`ctx.Done()`) and panic-related failures (`panicCheck`) return before reaching the KnownIssue append block.
- Docs explicitly state that when a case fails, output includes the known-issue suffix.
## Fix Focus Areas
- trial.go[191-244]
### Implementation direction
- Centralize the KnownIssue decoration in a helper (e.g., `t.decorateResult(r *result)` that appends when `!r.Success && t.knownIssueReason != ""`) and call it immediately before *every* return in `testCase()`.
- Alternatively, refactor `testCase()` to a single exit path where the decoration always runs before returning.
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
No description provided.