Repository navigation
Fork CI: quarantine ledger, log only (#1390 tier 3, part 1) - #1485
Conversation
The fork script test runner reads .github/fork-quarantine/ (one file per flaky test, at most 48 h) and, for each failed test a live entry names, reports and records whether quarantine would excuse it. Log only: every failure still fails. The unittest shim now names each failed test. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
lens: code · reviewer: Claude Opus 5.5 (code lens, round 1) · read at: fc08715 blocker: none Major: a null
|
… entry's class - quarantineVerdict: changes null (not a pull_request run, or no merge parents) now still blocks, since such a run could be adding its own entry. - quarantineOldEnough: only a def inside the entry's own class counts. - README: a pull request that breaks the script a quarantined test checks would get that failure excused while the entry is live (up to 48 h). Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Fix round r1 (head cfced06)
🤖 Generated with Claude Code |
Part of #1390 (tier 3, "quarantine flaky tests automatically, but fix them first"), part 1: the ledger and the runner's verdict, log only.
What changes
.github/fork-quarantine/, one JSON file per quarantined test (no shared list, so two PRs that add entries never conflict):test(a Python test listed asunittest),name(Class.test_x),issue,since,until(at most 48 h aftersince;sincenot in the future, with 10 min for clock drift). Format and rules are in itsREADME.md.fork-ci-unittest.pywritesfailed_nameson each run line: each failure's test (a subtest counts as its test),nullfor a class or module fixture failure.fork-ci-tests.cjs, for each failed test file that a live entry names, works out a verdict and:::notice ... quarantine (log only): <file> would not block | still blocks: <why>;quarantinefield to that file's record (only then, so other records are unchanged);statusare unchanged: every failure still fails.--filter=blob:none, and only when a failure has a live entry..github/fork-quarantine/is added to.github/fork-owned-paths.txt..github/fork-*stops at the/, so without this a PR that only adds an entry would have run the app jobs..github/scripts/fork-ci-quarantine.test.cjs, listed unweighted (about 0.2 s). Change entry:docs/fork/changes/repo/1390-quarantine-log-only.md.No workflow change. I kept the code inside
fork-ci-tests.cjsand did not add a module beside it: the kit-root job's sparse checkout holds only the runner's pinned files, andfork-contracts.test.pypins that list.Left for later parts of tier 3
fork-tests.yml(fork-ci-result) accepts a record whosequarantine.excusedis true, and the runner stops counting it. That needs a workflow push. It should come after the log has shown what would have been excused..github/fork-quarantine/to the merge-skipalways_rerunlist once entries change outcomes. In log-only mode they don't.State question
failed_namesgives "still blocks: failed outside its tests". An ended entry only warns. An open PR from before this change never sees an entry it did not merge with, and an entry added on main applies to it only after it merges main.General vs project
General: the ledger format, the rules and the runner code would fit any repo that uses this runner. The entries are project data.
Tests
Written to fail first: against main's
fork-ci-tests.cjsandfork-ci-unittest.py, all 14 tests infork-ci-quarantine.test.cjsfail (0 pass).Run here:
node --test .github/scripts/fork-ci-quarantine.test.cjs: 14 passed. They cover the ledger, the verdict, the age check with a fake git, a real shim run (a failed test, failed subtests, a fixture error), and main() in a scratch tree (log only, the part still fails; no ledger means no verdict; a bad entry fails; an ended entry warns).node --test .github/scripts/fork-ci-tests.test.cjs: 85 passed.node --test .github/scripts/fork-changes-list.test.cjs: 33 passed.vp fmt/vp linton the changed files: clean.Not run here, or failing for environment reasons:
fork-contracts.test.py: 60 failures. All are secret-scan end-to-end andfork_ci_resultscript cases that needjq, which is not installed here; none touch the runner, the shim or records.fork-owned-paths.test.py: its list checks pass; 4result:checks fail withjqmissing.vp run check:changed: not run, because no TypeScript changed (it would run knip).CI runs all of these.
🤖 Generated with Claude Code