Repository navigation
Flaky Test Issues 2026 11 01
Part of the mainstream-adoption work (Specs & ADRs); gap G3 in Feature Gaps and Quick Wins - 2026-10-31.
Trunk, BuildPulse and Datadog open a ticket when a test turns flaky, assign it to the test's owner and close it once the test is fixed. QASight already found flaky tests (qasight flaky), knew their owners (CODEOWNERS, qasight/services/test_ownership.py) and offered a prefilled new-issue link, but someone had to click it. The GitHub Action's flaky-issues input opens issues, but only inside that action, matches them by title, and never closes them.
-
Off unless configured, by environment.
TESTO_ISSUES=githubturns it on, like the alert webhooks. Token fromTESTO_GITHUB_TOKENorGITHUB_TOKEN; repository fromTESTO_ISSUES_REPO, else therepositorythe cycle's runs recorded. Options:TESTO_ISSUES_LABELS,TESTO_ISSUES_ASSIGN,TESTO_ISSUES_CLOSE_AFTER,TESTO_UI_URL,GITHUB_API_URL. The variables are listed in Command Reference § qasight issues sync. -
One hook, in
CycleRunService. After a persisted run's reporters,flaky_issues.sync_after_rundoes one pass for the run's cycle. Every way a run is recorded (qasight run,qasight ingest, the server's ingest and runs) goes throughCycleRunService, so there is no second path.qasight issues sync --cycle C [--dry-run] [--new]runs the same pass by hand. -
A hidden marker identifies issues. The body starts with
<!-- testo-flaky:<cycle>:<test key> -->, both parts percent-encoded so a name can't end the comment or split it. Open issues are listed by label (one call, up to 1000 issues) and matched on the marker exactly; the search API was rejected because it tokenizes the phrase and is rate-limited separately. An open issue with the same title also counts as a duplicate, so issues the action opened aren't repeated. -
Open one issue per test
newly_flaky_testsreports for the run (the hook), or per flaky test (the command), at most 5 per pass. TitleFlaky test: <name> (<cycle>); the body has counts, flip history, the last failure in a code fence longer than any backtick run in it, owners, the test page link and a footer. WithTESTO_ISSUES_ASSIGN=1CODEOWNERS@userowners are assigned; a 422 retries unassigned. -
Close an open marker issue, with a comment and
state_reason: completed, when its test is not flaky in the last 20 runs and passed each of its last N runs (TESTO_ISSUES_CLOSE_AFTER, default 10). Issues without the marker are never touched. -
Standard library, best-effort.
qasight/services/github_issues.pyusesurllib.requestwith a 10 s timeout, a User-Agent andAccept: application/vnd.github+json. The first GitHub error ends the pass as oneqasight issues:line on stderr; the hook catches everything and never changes the exit code. No SQL and no new table: everything comes from the run snapshotsflaky_servicealready reads.
-
Search API (
in:body "testo-flaky:..."). Rejected for the reason in 3. - Store issue numbers in the database. Rejected: a new table for something GitHub already holds, and it goes stale when someone closes an issue by hand.
-
Replace the action's
flaky-issues. Deferred: the action may install an olderqasight. Both can be on; the title match keeps them from doubling. - Jira and Linear. Later, as plugins behind the same pass.
- "Not flaky in the last 20 runs" means an issue closes only once the flips have left that window; with the default N=10 the 20-run window is usually what decides. A test that was removed never closes its issue on its own.
- The hook makes one GitHub request per persisted run even when nothing is flaky (the list), and more only when it opens or closes something.
- Owners in the body are
@mentions, so they are notified even withoutTESTO_ISSUES_ASSIGN. - Tests:
tests/unit/qasight/test_flaky_issues.py(fake client and fake opener: opens once, no duplicate, closes after N green runs, assignees and the 422 retry, dry run makes no writes, errors never raise, the CLI).
Generated from docs/Specs & ADRs/Flaky Test Issues - 2026-11-01.md. Edit it there; changes made in the wiki are overwritten.
Architecture
CLI Commands
Processes & Guides
- CI-CD Pipeline Setup
- E2E Harness Operations Guide
- GitLab Pages Demo
- Publishing Docker Images
- Publishing to Artifactory
- Publishing to PyPI
- Setup Snippets
- Shared Resource Pools
- Team Server
Prompts & Snippets
Roadmap & Strategy
- Feature Gaps and Quick Wins - 2026-10-31
- New User Journey Audit - 2026-11-01
- Paid Features to Offer Free - 2026-10-31
- Product Roadmap
Specs & ADRs
- Affected Test Selection - 2026-10-30
- Alerts Where Developers Look - 2026-10-22
- Architecture Consolidation - 2026-10-06
- Architecture Review - 2026-10-31
- BehaveX Reports - 2026-10-21
- Better Flaky Signal - 2026-11-01
- Command Adapter and JUnit Import - 2026-09-25
- Config JSON Schema - 2026-10-22
- Crash Detection - 2026-10-31
- Delta Comparison Policy
- Docs Site - 2026-10-19
- Docs Vault and Wiki Sync - 2026-10-07
- Easy Setup - 2026-11-01
- Engine Fixes - 2026-11-01
- Engineering Health Review - 2026-10-31
- Exporting Results - 2026-11-01
- Flaky Test Issues - 2026-11-01
- Flaky Test Quarantine - 2026-10-22
- Free Copies of Paid Features - 2026-11-01
- GitHub Action PR Comment - 2026-10-19
- Human-Run Resource Provider - 2026-10-30
- Importer and Integration Bug Hunt - 2026-10-31
- Ingest and Team Server - 2026-10-22
- Interview Readiness Fixes - 2026-10-07
- Library Packaging
- Lifecycle Fixes - 2026-11-02
- MCP Server - 2026-11-01
- New User Journey Automation - 2026-11-01
- Open Source Features - 2026-10-19
- OpenTelemetry Export - 2026-10-30
- Phase 3 Delta Comparison Engine Plan
- Phase 3 Unified Dashboard Plan
- Phase 4 BYOK and Failure Analysis
- Phase 5 UI Redesign - Cycles-First Navigation
- Playwright Adapter - 2026-10-19
- Playwright JSON Import - 2026-10-22
- Plugin API - 2026-10-19
- Product Roadmap Work - 2026-10-25
- Product to Ten - 2026-10-25
- Project Health - 2026-10-26
- QASight Logo - 2026-11-05
- Qualflare Follow-ups - 2026-10-26
- Quarantine From the UI - 2026-11-01
- Specs & ADRs
- Rename to QASight - 2026-11-04
- Repository Pattern - Database-Agnostic Refactor
- Resource Lifecycle Hooks - 2026-10-26
- Resource Pools and Leases - 2026-10-26
- Run Deletion and Stop - 2026-11-02
- Runner Coverage - 2026-10-26
- Scale Runs and Stages - 2026-10-24
- Security and Install Review - 2026-10-31
- Switchable Team Features - 2026-10-24
- Test Delivery Metrics - 2026-11-02
- Test Labels, Environments and Releases - 2026-11-02
- Test Source in AI Summaries - 2026-11-01
- Throwaway Stage Containers - 2026-10-24
- Tidy Cards and Demo Examples - 2026-11-05
- UI Design Review - 2026-10-31
- UI Polish - 2026-11-08
- UI Restyle - 2026-10-19
- UI Review Fixes - 2026-11-01
Testing Workflows
Vault