Repository navigation
Conversation
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 32 out of 34 changed files in this pull request and generated no new comments.
Suppressed comments (11)
.github/ci-quality-monitor/collect-ci-evidence.mjs:84
- The full dossier is promoted to a job output, but its configured bounds can exceed GitHub Actions' 1 MB-per-job output limit: one Helix item can contribute 20 failures with an 80,000-character KBE diagnostic, and up to 20 items are collected. On a sufficiently noisy failure,
needs.collect.outputs.dossierwill be truncated/rejected and the investigator will never run. Add a global serialized-size bound or transfer the dossier as an artifact while keeping only small control values in job outputs.
await appendFile(outputPath, `dossier<<${delimiter}\n${compactDossier}\n${delimiter}\n`);
.github/ci-quality-monitor/issue-deduplication.mjs:33
- Tracked fingerprints are removed only from build failures. An actionable heartbeat remains in
pipelineHealth, soshouldRunAgent()activates the model again on every daily miss even after an issue containing that heartbeat fingerprint has been filed. Filter tracked pipeline-health observations too, otherwise a prolonged outage repeatedly spends tokens contrary to the deduplication policy.
export function suppressTrackedIssueCandidates(dossier, trackedFingerprints) {
for (const failure of dossier.failures) {
failure.issueCandidates = (failure.issueCandidates ?? [])
.filter(candidate => !trackedFingerprints.has(candidate.fingerprint));
.github/ci-quality-monitor/helix/client.mjs:115
- Returning immediately when any TRX failure exists drops independent work-item evidence. A Helix item can contain a failed assertion and then hang or crash during teardown; in that case the timeout/crash observation is never produced, so a KBE can hide an unrelated mechanism in the same run. Preserve the test observations, then independently emit a work-item observation when the console/exit evidence establishes a distinct post-test failure.
if (testResults.failures.length > 0) {
return testResults.failures.map(test => createTestObservation(reference, test, testResults.summary));
.github/ci-quality-monitor/helix/client.mjs:41
- The TRX outcome is ignored when classifying a named failure.
parse-test-results.pydeliberately includesTimeoutandAbortedresults, but an empty or generic timeout message reaches this call and is labeledtest-assertion, producing the wrong fingerprint and RCA. Passtest.outcomeinto the classifier and prioritize explicit timeout/aborted outcomes before message heuristics.
const failureType = classifyTestFailureType(test.errorMessage);
.github/ci-quality-monitor/azure/observations.mjs:24
- The generic
checkoutmatch runs before the authentication and network checks, so a checkout task reporting401 Unauthorizedor503 Service Unavailableis always mislabeledsource-unavailable. That collapses the independent failure-type axis and can route/deduplicate the incident incorrectly. Apply the specific auth/network classifications before the checkout fallback;inferTaskPhase()already preservessource-checkoutas the phase.
if (/checkout|couldn't find remote ref|repository not found/i.test(text)) {
return { phase: "source-checkout", failureType: "source-unavailable", diagnosticCode };
.github/ci-quality-monitor/collector-policy.mjs:9
- A build queued after the commit is treated as coverage regardless of its reason or source version. Consequently, manually queuing an older
maincommit after the current head landed suppresses the heartbeat and hides a missing CI trigger. Limit the queue-time batching fallback to CI-triggered builds; exactsourceVersion === head.shacan continue to cover other reasons.
const covered = builds.some(build => build.sourceVersion === head.sha || Date.parse(build.queueTime) >= committedAt);
.github/ci-quality-monitor/helix/client.mjs:91
- This selects whichever
.xmlor.trxentry happens to appear first. If a work item lists an unrelated XML artifact before its TRX, the TRX parser returns no named failures (or throws) and the actual test evidence is skipped. Prefer.trxexplicitly, using.xmlonly as a fallback.
const testFile = (workItem.Files ?? []).find(file => /\.(?:trx|xml)$/i.test(file.FileName));
.github/ci-quality-monitor/pipeline-health-monitor.mjs:24
- A failed heartbeat retrieval leaves the prior
heartbeatMissescount intact. Thus miss → API failure → miss becomes actionable even though the two misses were not consecutive daily checks as required. Reset the tracked heartbeat on evidence-collection failure before returning the non-actionable observation.
} catch (error) {
return {
.github/ci-quality-monitor/pipelines.json:30
- The PR description limits the implemented stage to
mainand lists release-branch auditing as future work, but everyrelease/*entry here is accepted byselectEventCandidate()for merged-PR investigation. This enables automatic release-branch incidents now. Keep onlymaininstableBranchesuntil that expansion is intended and documented.
"refs/heads/release/dnup",
.github/ci-quality-monitor/README.md:9
- The credential description contradicts the workflow: lines 159–178 of
ci-quality-monitor.mdselectCOPILOT_GITHUB_TOKENfromCOPILOT_PAT_0…9in thecopilot-pat-poolenvironment. This workflow therefore depends on PAT secrets for inference, not solely on the GitHub Actions token; document that operational prerequisite while retaining the credential-free Azure evidence boundary.
service hook or credential. The workflow uses the GitHub Actions token for Copilot
inference through the scoped `copilot-requests: write` permission and keeps all
.github/ci-quality-monitor/README.md:88
- This failure-model section is incomplete: the three axis names and bullets are missing, and “them” has no antecedent. As written, readers cannot map the listed examples to
phase,failureType, andevidenceSources, despite those distinctions driving issue policy.
The collector models each observation on independent axes:
`source-checkout`, `dependency-restore`, `compilation`, `signing`, or
`test-execution`
`process-crash`
|
Azure Pipelines: Successfully started running 2 pipeline(s). 1 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
this would otherwise prevent failure to re file a regression in flakes
|
I reconfirmed the analysis works and also tested the scenario where a build failure regresses, such that the issue is re-filed if it was closed previously: nagilson#163. Thanks for your review! |
|
Confirmed it's still working e2e, with an example here: nagilson#168 |
|
Thank you 🥳 |
CI Quality Investigator
Summary
An agentic workflow that investigates CI 'evidence' and files actionable build, test, and infrastructure issues with a root cause analysis.
This completes an 'agentic engineering loop' between the already added triager and assigner.
Stages
Currently Implemented
mainCI;mainis the only branch rerunning flows every time a merge commit occurs; release/* branches only have checks run on the dev's branch, which means the mechanism to auto-trigger the workflow is not as straightforward to authorDetects:
Future Potential Expansions
mainTests
Tests were executed by invoking the workflow directly and pointing it to specific builds to validate behavior rather than trying to get
mainto include a specific failure to evaluate.Some builds are expired but the failure artifacts generated by the analyzer got picked by up, so the failure were saved. Root cause analysis logic remains tested. Due to the short lifetime of CI runs and that many of the build failure were fixed, most of the recent validation re-runs used existing 'evidence' collected by the agent.
To see a new failing scenario in
mainthe workflow found on its own that is still live in CI right now, see 162pipeline-validation / configuration-errorsource-checkout / source-unavailabledependency-restore / network-failurecompilation / compiler-errorsigning / tool-execution-errortest-execution / network-failuretest-execution / timeoutcompilation / build-task-errorHow it Works
[DESIGN.md] and [README.md] elaborate more. But briefly, it uses deterministic web requests that do not require authentication to collect 'evidence' - e.g. logs, pipeline results, trx results, test failures/results, helix work item records, etc. The logic runs whenever there is a failure that is detected in main CI. Evidence per run is recorded as a pipeline artifact that can inform other agents in the next CI investigation workflow and be used to analyze future flakes without needing to spend time re-analyzing what was already analyzed.
The deterministic javascript parses those as 'evidence' to the agent which is then given a prompt to analyze with a RCA. It does not duplicate the existing ci-analysis skill.
The agentic workflow itself then runs with safe_outputs to file the issue, if there is not already such an issue with a similar 'fingerprint' - otherwise we can skip and not waste AI token spend on something we already analyzed. Builds are not re-analyzed because the workflow is currently only triggered off a main CI run, and only looks at that run. To add later stages more work will be needed to reduce waste.
Logic could be simplified with maintenance and handling logic for an AzDo internal token, however, this adds complexity and on-going cost (weekly or daily PAT renewal for the workflow to continue passing + more security needed), and in my belief should be added later.
Expected Impact
broken or repeatedly retried CI.
Success Criteria
speculative, or low-quality issues.
verifiable build evidence with links to the relevant build, task, test,
console output, or artifact.
the signal is only a downstream cascade, or when an existing issue already
covers the same mechanism.
that has already been processed. A retry or trusted priority promotion is
audited only under the context-qualified rules below.
caused only by the PR's own changes.
cookielabel and enters the Issue Monster queue automatically. Stable live incidents and technical or infrastructure debt may also receive their corresponding allowlisted labels.not hide or permit unrelated failures in the same CI run.
occur before any job or timeline record exists.
them from test assertion failures or post-test harness failures.
to distinguish independent test mechanisms.
without waiting for a maintainer to notice or request an investigation.