diff --git a/bin/gstack-flaky b/bin/gstack-flaky new file mode 100755 index 000000000..7bec3b7ba --- /dev/null +++ b/bin/gstack-flaky @@ -0,0 +1,110 @@ +#!/usr/bin/env -S bun --no-env-file --config=/dev/null +/** + * gstack-flaky (GSTA-158): rerun a failed test once and record the flake, for + * any runner that writes JUnit (Playwright, bun, jest, pytest, vitest). CREW + * rule 16 for every repository: "you can just run the failed test again and + * note that it is flaky". The rules live in lib/flaky-run.ts; docs/flaky.md is + * the how-to and the error-code table. + */ +import * as fs from 'fs'; +import { DEFAULT_MAX_RERUNS, appendLedger, ledgerPath, renderResult, runFlaky, stepSummary } from '../lib/flaky-run'; +import { JunitError, readJunit, type JunitRunner } from '../lib/junit'; + +const USAGE = `Usage: + gstack-flaky run --junit [--runner playwright|bun|generic] [--max-reruns ] + [--rerun-arg