Repository navigation
Conversation
Brings upstream-Playwright retry semantics to `go test`: stay green on a transient flake, but still surface it as flaky on Flakiness.io. After the first pass, flakiness-go re-invokes `go test` on only the still-failing tests (scoped via an anchored `-run` regex + `-count=1`), up to N more times, feeding every round into the same converter so each rerun is an extra RunAttempt. The job's verdict is per-test: it goes green only once every test that failed in round 0 has passed on some attempt; a test that fails every attempt, a build/setup failure, a benchmark, or an unexplained non-zero rerun exit still fails the job. Borrows gotestsum's safeguards: --rerun-failed-max-failures (default 10) and --rerun-failed-abort-on-data-race (default true). Wrapper-mode only; warns under --stdin. Flags also resolve from FLAKINESS_RERUN_FAILED[_MAX_FAILURES|_ABORT_ON_DATA_RACE].
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Implements Option B from #2: a native
--rerun-failed[=N]flag that brings upstream-Playwright retry semantics togo test— stay green on a transient flake, but still surface it as flaky on Flakiness.io.After the first
go test -jsonpass,flakiness-gore-invokesgo teston only the still-failing tests (scoped via an anchored-runregex +-count=1), up to N more times. Every round feeds the same converter, so each rerun becomes an extraRunAttempt— a fail-then-pass is recorded as mixed attempts (flaky) while the job stays green.Design
--rerun-failed-max-failures(default 10 — skip reruns on broad breakage) and--rerun-failed-abort-on-data-race(default true).--stdin. Flags also resolve fromFLAKINESS_RERUN_FAILED[_MAX_FAILURES|_ABORT_ON_DATA_RACE].-args/--separator so they reachgo test, not the test binary.Tests
=0unlimited, data-race abort (and=falseno-abort), build-fail not retried, collateral passing sibling doesn't gate, failing subtest not masked by passing sibling, unexplained rerun failure not masked,-argsseparator handling, space-separated-value rejection, stdin warning.testdata/flaky) drives actualgo test -jsonthrough the rerun loop: fail-then-pass → exit 0 +[failed, passed]; stable test never rerun.go test -race -count=1 ./...,go vet ./..., andgofmtall clean.🤖 Generated with Claude Code