Repository navigation
CI: track flaky tests per commit on plxnative.com/ci - #926
Merged
Merged
Conversation
Both host unit jobs upload their per-test outcomes; the ci-metrics collector records the tests that gave one job of one run both a pass and a fail, ci-summary derives the Active / Quarantined / Fixed list, and the page shows it. ci/flaky.txt is the (empty, shrink-only) quarantine list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…h stored events Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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.
Closes #923
What
A test is flaky when one job of one run gave it both a pass and a fail (the same commit and build; in practice a re-run attempt). This tracks that in our own CI, no vendor.
tools/ci-test-results.py(new): turns the libtesttest <name> ... ok|FAILEDlines of a host unit job's log into a small JSON (stable libtest has no JSON format). Both host unit jobs inci.ymlupload it astest-results-<slug>-<run_attempt>(14 days; the attempt in the name avoids re-run collisions).tools/ci-history.py: for new or re-runciruns that failed or have attempt > 1 and whose head repo is this one, downloads those artifacts in memory (one validated JSON member, size and name limits, nothing extracted) and stores one event per flaky (job, test) underflaky. Only tests seen both ways are stored, never the ~6000 passes; 90-day retention (dropped infold), at most 100 events per run (more is an outage, not 100 flakes). Fork PRs are skipped: a fork runs its own copy of ci.yml, so its artifact is attacker-authored. Jobs are never compared with each other (default vs hostsim are different builds).tools/ci-summary.py: derivesflakyper (job, test): first/last seen, run count, status Active / Quarantined (inci/flaky.txt) / Fixed (no flake for 30 days), andnew(first flake within 24 h). No blocking gate.ci/flaky.txt(new, empty,# count: 0, shrink-only likeci/allow/layers.txt): quarantine list,test<TAB>reason. Read frommainby both writers of the summary (ci-metrics.yml and build-bench.yml). Nothing skips quarantined tests yet.site/ci/index.html: a "Flaky tests" panel in the page's existing style (new-flake note, active list, fixed under a disclosure); every name isesc()'d.docs/agent-reference.md.Verification
tools/test_ci_test_results.py(new, added toci/check-python-steps.txt),tools/test_ci_history.py(+9 flaky cases incl. hostile zips, fork skip, rerun replacement, idempotent bytes, retention, per-run limit, failed download),tools/test_ci_summary.py(+9),ci/test_ci_workflows.py(pins both jobs' upload names against the collector's regex, and the quarantine wiring).make checkon the committed tree: exit 0, tree clean afterwards. Lasttest result:line:test result: ok. 1857 passed; 0 failed; 64 ignored; 0 measured; 0 filtered out; finished in 55.72s.gh api .../zipdownload) only runs in GitHub; the first re-run after merge will show it.build-bench
This touches
.github/workflows/but changes no compiled input (no Cargo, Makefile or build.rs change); the workflow edits add two steps to existing test jobs. I did not runmake build-bench: it takes every check slot exclusively and would stall the other lanes, and it would measure nothing this diff changes. No before/after table is given.🤖 Generated with Claude Code