Repository navigation
CI flakes: list today's four flaky Chrome files; retry unlisted failures to find flakes and print their entry - #996
Conversation
…res to find flakes The four flaky browser tests that turned PRs red on 2026-12-04 (dashboard-loop's row walk, project-hosts-e2e C3, question-threads-e2e QT-S5, dashboard-permalinks' cold-loaded peek) were not in test/flaky.json, so run.mjs never retried them: every flake failed its job and forced a whole-job rerun. Nothing found them either: an unlisted file was never retried. - test/flaky.json: the four files, each with run ids of same-commit flips, the logged error, a fix owner (PR #995 for dashboard-loop; a ticket to ask for the others), until 2026-12-18, and "tests" naming the flaky test. - An entry's optional "tests": only a failure of those tests passes on a retry. - until may be at most 31 days ahead, so an entry can't be parked for good. - An unlisted failing file (at most 3 failed, first runs within 150 s together, never the chain) is retried once: passing, the run still fails and prints NOT LISTED FLAKY with a ready-made entry (run, job, Node, commit, failing tests, 14 days). A file that fails twice always fails. - FLAKY and NOT LISTED FLAKY go to $GITHUB_STEP_SUMMARY too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
PR #996 review a: flaky quarantine with per-test entries and unlisted-flake detection
What I ran vs only readRan, in a scratch clone at the head (hub env pointed away, testslot, memory gate under 42):
Read: the run.mjs diff ( What holds, as far as I can find:
Findings
Notes
Opened by the box operator. Verdict: CHANGES 41f6bd3 |
… path (review a F1, F2)
- F1: readyEntry makes no entry when no test failed (a crash, a timeout, a hook): it would have
no "tests" and so pass any failure of the file. The run says so instead. A listed entry's tests
are always kept. failedTests skips hook failures (hookFailed), which name no test.
- F2: flakyList refuses an entry whose reason or cause starts with TODO, so the ready entry pasted
as printed is refused until its cause and fix owner are filled in.
- Minor: tests are named by path ("suite > test", parents from the TAP's Subtest lines, the
per-file wrapper left out), so two leaves with one name don't cover each other. Seeds moved to
paths (checked against the CI logs they came from).
- Fix owners: kit-1243 (project-hosts-e2e C3), kit-1244 (question-threads-e2e QT-S5), kit-1242
(dashboard-permalinks).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
F1 (review a), fixed in ccf308d. New test: "a flake with no failing test (a crash, a hook) prints no ready entry". It covers a listed-with-tests crash, a listed-with-tests Mutation-proved:
Opened by the box operator. |
|
F2 (review a), fixed in ccf308d. Test 3 now asserts that the ready entry pasted as printed is refused, with exactly that line, and is accepted once its cause is filled in. The invalid-entry table gained Mutation-proved:
Opened by the box operator. |
|
Minor (tests by leaf), fixed in ccf308d. The seeds now use paths. I ran them against the CI job logs they came from: each is covered, and the real dashboard-permalinks break in run 47310824047 is not. New test: an entry naming only Mutation-proved:
Fix owners added: kit-1243-project-hosts-c3-flake, kit-1244-question-threads-qt-s5-flake, kit-1242-permalinks-cold-peek. dashboard-loop stays with #995. Opened by the box operator. |
PR #996 review b: re-check of the F1/F2/Minor fixes at ccf308d
What I ran vs only readRan, in a scratch clone at the head with DEVTEAM_HUB_PORT=59991, DEVTEAM_BOX=off and DEVTEAM_IMAGE_HUB unset, on Node 22.23.4:
Only read: the four CI at the head: test.yml run 47378444705 was in progress at 16:57 UTC (created 16:39, most jobs still queued). I did not wait for it, so it has no result yet. The branch is 10 commits behind main (mergeState CLEAN). FindingsFindings: none. F1, F2 and the leaf-name Minor from the previous final are fixed and covered by tests that go red when each fix is mutated. Notes
Opened by the box operator. Verdict: APPROVE ccf308d |
…, kit-1243 C3, kit-1244 QT-S5, kit-1242 permalinks) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…seen to fail and pass on a rerun of the same commit on 12-05 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Updated since the last review:
Opened by the box operator. |
PR #996 review d-latest: delta since review b's APPROVE (four entries dropped, a merge of main, two entries added)
Last APPROVE: review b, at What I ran vs only read
FindingsFindings: none. Notes
Opened by the box operator. Verdict: APPROVE c53b206 |
PR #996 review d2: delta since APPROVE at c53b206
Delta confirm against the last APPROVE (comment 7439025880, What I ran vs only read
FindingsFindings: none. NotesI ran no mutations this time: the approved diff is byte-identical, so the earlier review's mutation results still hold. Opened by the box operator. Verdict: APPROVE 7e05826 |
Cause
test/flaky.jsonandrun.mjs's one retry already existed (#942). The four browser tests that kept PRs red on 2026-12-04 were simply not in the list, so their files were never retried. Each flake failed its job and forced a rerun of the whole job. Nothing flagged them as flakes either, because an unlisted file was never retried.I checked 25 failed
test.ymlruns and 60 runs that went green on a rerun (2026-12-04) by reading the job logs. All four were red in jobs on a commit that later went green:No expired entry, uncovered group or timeout, and nothing in the
testsroll-up job explains these reds.Change (builds on the existing list and retry, no second list)
Seed
test/flaky.jsonwith the four files. Each entry has:until2026-12-18 (14 days)testsnaming the flaky testOptional
testsin an entry: a retry's pass counts only if every test that failed on the first run is named there. Any other test failing in that file, or a timeout with no failing test, is handled like an unlisted file. The 12 existing whole-file entries keep their behaviour.Expiry:
untilcan be at most 31 days ahead (FLAKY_DAYS), so an entry can't stay forever. An entry past its day or set too far ahead is printed and enforced again. 31 rather than 14 keeps the existing entries (2027-01-03) valid. Ready-made entries get 14 days.Automatic detection: an unlisted file that fails is retried once, when all of these hold:
If the retry passes, the run still fails and prints
NOT LISTED FLAKY: <file> …plus a ready-made JSON entry. The entry has the run, attempt, URL, job, Node major and commit as evidence, the failing test names,untiltoday+14, and aTODO:cause where the fix owner goes. For a file already listed for other tests, the entry joins the test names and keeps the existing entry's reason and cause.A test that fails twice always fails the job, listed or not.
--repeatstill retries nothing.FLAKYandNOT LISTED FLAKYare GitHub warnings, and are also written to$GITHUB_STEP_SUMMARY.Docs:
run.mjsheader and the README's testing section.Why the whole file is retried rather than just the one test: these e2e files share state across tests (setup tests, one Chrome page per file), so a
--test-name-patternretry would fail for reasons that aren't the flake. The four files take about 25 to 45 s, so a whole-file retry is cheap. The verdict is still per test, throughtests.Tests
test/run-flaky.test.mjsuses fixture roots with a test that fails once:flakyListonce filled intestsnarrowing, with the joined entrytestsfailedTests(nested, TODO,cancelledByParent,subtestsFailed, the per-file wrapper),covers,pickDetectMutation-proved: 10 mutants, each fails at least one test: ignoring
tests, no detect cap, no detection, detection passing the run, countingsubtestsFailedparents, no days cap, no step summary, accepting emptytests, no time budget, retrying the chain.Ran
node test/run.mjs test/run-flaky.test.mjs test/run.test.mjs test/run-deal.test.mjs: all ok. I also ranfailedTestson the real CI job logs: it named exactly the four tests above in each red job. No shell was touched.What I couldn't test
question-threads-e2e.test.mjsmoves, its entry has to move with it; the list test fails on a missing file.Opened by the box operator.
🤖 Generated with Claude Code