Start with one job and grow from there.
Free to start · No credit card required
cat .singulacomp/memory/flaky-test-ledger.md 2>/dev/null || echo "(no ledger yet)"
gh issue list --repo {{target_repo}} --state open \
--search 'in:title "Flaky test quarantine tracker"' \
--json number,title,url
gh pr list --repo {{target_repo}} --state open \
--search 'in:title "test(quarantine)"' \
--json number,title,headRefName,statusCheckRollup,url
gh run list --repo {{target_repo}} --branch main --limit 50 \
--json databaseId,conclusion,createdAt,headSha,workflowName > /tmp/runs.json
# For each run since the ledger's last processed run_id, pull the per-test
# report artifact the workflow produces (JUnit/XML or equivalent).
gh api repos/{{target_repo}}/actions/runs/<RUN_ID>/artifacts \
--jq '.artifacts[] | select(.name | test("test-results|junit")) | .id'
gh api repos/{{target_repo}}/actions/artifacts/<ARTIFACT_ID>/zip > /tmp/artifact.zip
unzip -o /tmp/artifact.zip -d /tmp/artifact-<RUN_ID>
(test_name, file, outcome, run_id, head_sha, timestamp) tuples. Only process runs newer than the ledger's last processed
run_id — don't re-score history already folded in.head_sha (a rerun) or of near-identical code (no change
touching the test or its subject between runs).{{quarantine_threshold}} that isn't already marked quarantined in the
ledger.// Jest / Vitest
it.skip('does the thing', () => { ... }); // FLAKY: quarantined <date>, see #<issue>
# Pytest
@pytest.mark.skip(reason="FLAKY: quarantined <date>, see #<issue>")
def test_does_the_thing(): ...
// Go
func TestDoesTheThing(t *testing.T) {
t.Skip("FLAKY: quarantined <date>, see #<issue>")
...
}
BRANCH="test/quarantine-$(date +%Y-%m-%d)"
git checkout -b "$BRANCH" origin/main
git add -p # stage only the skip-marker changes
git commit -m "test(quarantine): skip $(date +%Y-%m-%d) flaky tests"
git push origin "$BRANCH"
gh pr create --repo {{target_repo}} --base main --head "$BRANCH" \
--title "test(quarantine): skip flaky tests ($(date +%Y-%m-%d))" \
--label flaky-test \
--body "Quarantines the tests below at or above the flakiness threshold.
Each is skipped, not deleted, with a link to run evidence. See tracking issue
#<issue-number>. A human owns the merge and the eventual de-quarantine."
Flaky test quarantine tracker.
Create it if it doesn't exist; otherwise edit its body to the current state:gh issue create --repo {{target_repo}} \
--title "Flaky test quarantine tracker" \
--label flaky-test \
--body "<table: test, file, flakiness score, quarantined since, PR>"
# or, if it already exists:
gh issue edit <ISSUE_NUMBER> --repo {{target_repo}} --body "<updated table>"
{{alert_channel}}: how many tests newly crossed the threshold this
run, how many remain quarantined from before, and any tests stable enough to
recommend de-quarantining — with links to the PR and the tracking issue.
Never post raw run logs or the full ledger to Slack..singulacomp/memory/flaky-test-ledger.md (see <ledger-format>),
then open and self-merge a scoped change request for the ledger update only.