feat(tenant-quota): add ci-failure-patterns controller and results table #8006
All Vouch review confidence checks passed
Residual risk 0.22 = Change Risk (0.55) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.55 · 574 lines diff across 7 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.380
Shallow Review Depth
shallow_review_depth
0.289
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #8006"
general
weight: 0.35
ziccardi
Tracks AROSLSRE-2676 — Port deterministic failure-pattern extraction from CIHealth to an ARO-HCP CLI.
Follows #7945 (shared extractor and
hcpctlreplay tooling). This is the normal-reconciliation controller and its results table; the upgrade controller, activation table and ADX active-version helper are a later PR.Why
#7945 made failure-pattern extraction deterministic and reviewable offline. To use it for DEV CI telemetry the findings must be computed continuously and stored where users can join them with the raw CI tables, without every consumer re-running extraction.
How
A new
ciFailurePatternscontroller intooling/tenant-quota(pkg/cipatterns), next to the existingciJobOutcomescollector:interval; a paced history sweep (advances only while less than one page of work is outstanding) walks all retained builds newest to oldest, 128 IDs per step, then rests 12 h. No time cutoff or permanent completion marker, so late raw rows and name changes are picked up.ciTestResults/ciTestNames, runs the shared extractor in process, and submits complete findings through managed queued ingestion.ciFailurePatterns, deployed by the Kusto bicep module): identity, resolvedtestName,findings(dynamic),computedAt,producerCommit. Raw message and timings are not copied: joinciTestResultson(buildId, source, testId, messageHash);messageHashis the SHA-256 of the raw message, equal to Kusto'shash_sha256(message)(verified against the emulator and DEV), and disambiguates tests that fail more than once in a run. In a live measurement the message was 82% of the stored bytes.tooling/tenant-quota/pkg/kusto; the hcpctl complete-query helper is reused for strict response handling.Verification
go vetandgo test -race -p 1for tenant-quota, plus the hcpctl packages touched.hcp-dev-us-2with a throwaway results table (dropped afterwards): about 1.0 finding per failed row, no ingestion failures, no duplicate result keys, every result joined exactly one raw row, and all finding offsets fell inside the joined message. The history sweep over about 2.8k failed builds was projected at about one hour with 4 workers.Operational notes
config/config-dev-ci.yamlconfigures it for DEV-CI (interval: 5m,workers: 4) andciJobOutcomesconnection settings are required. It writes only to the new results table.cifailurepatterns.Versionlater writes a second version side by side until PR 3 adds activation.resultKeyuntil the planned active-version helper exists.PR Checklist