/bigquery-ci-data:chai-presubmit-override-decisionsfrom bigquery-ci-data
Queries BigQuery to analyze CHAI presubmit agent decisions (override, retest, report-only) on PR failures and estimates CI cost savings from overrides.
Ships in bigquery-ci-data. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Query openshift-gce-devel.ci_analysis_us.chai_presubmit_decision_log to monitor decisions made by the CHAI agent when evaluating PR presubmit failures. The primary goal is understanding the decision breakdown: how many failures are being overridden vs retested vs just reported on, and estimating CI cost savings from overrides.
Follow the foundations skill for cost safety, caching, and execution workflow.
Use one week unless the user specifies otherwise.
Each overridden presubmit failure saves an estimated $3 per job run in CI costs (cloud compute for the retest that was avoided). When reporting override counts, always calculate and display the estimated savings:
estimated_savings = override_count * $3.00
ci_analysis_us.chai_presubmit_decision_logProject: openshift-gce-devel
Each row represents one decision the CHAI agent made about a PR presubmit failure.
| Column | Type | Notes |
|---|---|---|
| logged_at | TIMESTAMP | When the record was appended (UTC) |
| persona | STRING | The persona that appended the record |
| session_id | STRING | The conversation session ID |
| repo | STRING | The PR's repository |
| pr_number | INTEGER | The PR number |
| head_sha | STRING | The live PR HEAD SHA the decision was made against |
| run_sha | STRING | The SHA the failed run tested, when known |
| revision_match | BOOLEAN | Whether the failed run tested the live PR HEAD SHA |
| status_context | STRING | Full GitHub status context (e.g. ci/prow/e2e-gcp-ovn-upgrade) |
| prow_job_name | STRING | Full Prow job name |
| prow_build_id | STRING | Prow build ID of the failed run |
| prow_job_url | STRING | Prow job URL of the failed run |
| run_finished_at | TIMESTAMP | When the failed run finished |
| decision | STRING | The action taken: override, retest, report_only, no_action_required |
| job_classification | STRING | Whether the job is an override-eligible long-running e2e or integration job |
| tests_executed | BOOLEAN | Whether the failed run executed tests |
| failing_tests | STRING (REPEATED) | The failing test names |
| job_pass_rate | FLOAT | Fleet-wide pass rate for this job (0-100) |
| linked_bugs | STRING (REPEATED) | Jira bugs linked to failing tests (e.g. OCPBUGS-12345) |
| pr_overlap | STRING | The PR's overlap with the failing test or tested surface |
| rationale | STRING | Why this decision was made, in a short paragraph |
| Decision | Meaning |
|---|---|
override | Agent overrode the failure — the PR can merge without retesting. Saves CI cost. |
retest | Agent triggered a retest of the job. |
report_only | Agent reported on the failure but took no action (e.g. waiting for human review). |
no_action_required | Agent determined no action was needed (e.g. failure already resolved). |
A healthy system should show a mix of all decision types. The breakdown reveals whether the agent is being too aggressive (too many overrides) or too conservative (mostly report_only).
This is the primary query to run when the user asks about CHAI decisions without a specific question. Always break down per repo — the agent is being rolled out to repos incrementally, so per-repo consistency is a key signal.
SELECT
repo,
COUNT(*) AS total_decisions,
COUNTIF(decision = 'override') AS overrides,
COUNTIF(decision = 'retest') AS retests,
COUNTIF(decision = 'report_only') AS report_only,
COUNTIF(decision = 'no_action_required') AS no_action,
ROUND(COUNTIF(decision = 'override') * 100.0 / COUNT(*), 1) AS override_pct,
ROUND(COUNTIF(decision = 'retest') * 100.0 / COUNT(*), 1) AS retest_pct,
ROUND(COUNTIF(decision = 'report_only') * 100.0 / COUNT(*), 1) AS report_only_pct,
COUNTIF(decision = 'override') * 3 AS estimated_savings_usd
FROM `openshift-gce-devel.ci_analysis_us.chai_presubmit_decision_log`
WHERE logged_at >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 7 DAY)
GROUP BY repo
ORDER BY total_decisions DESC
After running this, always report:
Use alongside the per-repo query for a quick aggregate view:
SELECT
COUNT(DISTINCT repo) AS enabled_repos,
COUNT(*) AS total_decisions,
COUNTIF(decision = 'override') AS overrides,
COUNTIF(decision = 'retest') AS retests,
COUNTIF(decision = 'report_only') AS report_only,
COUNTIF(decision = 'no_action_required') AS no_action,
COUNTIF(decision = 'override') * 3 AS estimated_savings_usd
FROM `openshift-gce-devel.ci_analysis_us.chai_presubmit_decision_log`
WHERE logged_at >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 7 DAY)
SELECT
prow_job_name,
decision,
COUNT(*) AS count,
ROUND(AVG(job_pass_rate), 1) AS avg_pass_rate
FROM `openshift-gce-devel.ci_analysis_us.chai_presubmit_decision_log`
WHERE logged_at >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 7 DAY)
GROUP BY prow_job_name, decision
ORDER BY count DESC
SELECT
DATE(logged_at) AS day,
repo,
COUNTIF(decision = 'override') AS overrides,
COUNTIF(decision = 'retest') AS retests,
COUNTIF(decision = 'report_only') AS report_only,
COUNTIF(decision = 'no_action_required') AS no_action,
COUNT(*) AS total,
COUNTIF(decision = 'override') * 3 AS daily_savings_usd
FROM `openshift-gce-devel.ci_analysis_us.chai_presubmit_decision_log`
WHERE logged_at >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 7 DAY)
GROUP BY day, repo
ORDER BY day, repo
SELECT
logged_at,
repo,
pr_number,
prow_job_name,
job_pass_rate,
rationale
FROM `openshift-gce-devel.ci_analysis_us.chai_presubmit_decision_log`
WHERE logged_at >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 7 DAY)
AND decision = 'override'
ORDER BY logged_at DESC
SELECT
logged_at,
prow_job_name,
decision,
job_pass_rate,
revision_match,
rationale
FROM `openshift-gce-devel.ci_analysis_us.chai_presubmit_decision_log`
WHERE logged_at >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 7 DAY)
AND repo = @repo
AND pr_number = @pr_number
ORDER BY logged_at DESC
SELECT
logged_at,
repo,
pr_number,
prow_job_name,
revision_match,
head_sha,
run_sha,
rationale
FROM `openshift-gce-devel.ci_analysis_us.chai_presubmit_decision_log`
WHERE logged_at >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 7 DAY)
AND decision = 'override'
AND revision_match = false
ORDER BY logged_at DESC
SELECT
test,
COUNT(*) AS decision_count,
COUNTIF(decision = 'override') AS override_count,
COUNTIF(decision = 'report_only') AS report_only_count
FROM `openshift-gce-devel.ci_analysis_us.chai_presubmit_decision_log`,
UNNEST(failing_tests) AS test
WHERE logged_at >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 7 DAY)
GROUP BY test
ORDER BY decision_count DESC
LIMIT 20
SELECT
bug,
COUNT(*) AS decision_count,
COUNTIF(decision = 'override') AS override_count
FROM `openshift-gce-devel.ci_analysis_us.chai_presubmit_decision_log`,
UNNEST(linked_bugs) AS bug
WHERE logged_at >= TIMESTAMP_SUB(CURRENT_TIMESTAMP(), INTERVAL 7 DAY)
GROUP BY bug
ORDER BY override_count DESC
When presenting results, always include:
What SKILL.md sets; muted values are Claude Code's defaults
4 skills in this plugin
/autodlUse when querying auto-collected CI data from test runs in BigQuery (ci_data_autodl dataset) including risk analysis, disruption, CPU metrics, audit logs, operator state, retry statistics, and control plane pod placement and memory/foundationsUse when executing any BigQuery CI data query — provides the shared safety protocol, cost controls, bq CLI patterns, and caching workflow/jobs-and-testsUse when querying OpenShift CI prow job runs and junit test results in BigQuery (ci_analysis_us dataset) with deduplication, variant joins, and infrastructure failure filteringnpx claudepluginhub openshift-eng/ai-helpers --plugin bigquery-ci-dataOther plugins' skills for the same job