Policy-based CI quality gate that analyzes JUnit/pytest results and CI logs to classify flaky vs deterministic failures and output an auditable release decision (PASS, SOFT_BLOCK, HARD_BLOCK).
CI failures are often not product regressions (flaky tests, infra noise, retries, parallel shards). Teams lose trust and start “rerun until green”. RQG turns noisy signals into a decision with evidence and next actions.
- JUnit XML (pytest, Maven/Gradle, Jest JUnit output)
- CI logs (one or more files)
- Run metadata (commit, branch, job, attempt, environment key)
- Normalizes results into a common model
- Fingerprints failures by sanitizing timestamps/UUIDs/ports/durations to form stable clusters
- Computes explainable flake score + confidence from history
- Applies
rqg.ymlpolicy to decide:PASS/SOFT_BLOCK/HARD_BLOCK - Generates recommendations: targeted rerun, quarantine candidates, infra hotspots
rqg/decision.jsondecision record (policy hash, evidence, reasons, missing inputs)rqg/summary.mdshort human-readable summary- Exit codes for CI gating:
0PASS,10SOFT_BLOCK,20HARD_BLOCK
pip install -e .
pytest --junitxml=report/junit.xml | tee ci.log
rqg collect --junit-glob "report/junit.xml" --log-glob "ci.log"
rqg analyzerqg collectdiscovers artifacts, parses JUnit, collects logs/metadata, produces a run bundlerqg analyzeloads bundle + history (SQLite), scores, decides, writes outputs, returns gate exit coderqg explain <test_id|fingerprint>prints evidence behind a classificationrqg uploadoptional bundle upload (MVP works locally)
version: 1
mode: pr
history: { lookback_runs: 50, lookback_days: 14 }
inputs:
junit_globs: ["**/junit*.xml", "**/TEST-*.xml"]
log_globs: ["**/ci.log", "**/console.log"]
identity:
test_id_strategy: "classname::name"
env_key_fields: ["os", "browser", "device", "runner_pool"]
gating:
hard_block:
new_failure_min_repro: 2
critical_paths: ["payments", "auth", "checkout"]
required_suites: ["smoke"]
max_new_failure_clusters: 0
soft_block:
max_known_flaky_failures: 5
max_infra_failures: 10Run after tests:
- tests produce JUnit + logs
rqg collectrqg analyzegates the deploy stage via exit code- archive
rqg/artifacts