Skip to content

feat(ci): preliminary AI analysis of testrun failures - #3460

Merged
mkoura merged 1 commit into
masterfrom
prelim_ai_failure_analysis
May 15, 2026
Merged

feat(ci): preliminary AI analysis of testrun failures#3460
mkoura merged 1 commit into
masterfrom
prelim_ai_failure_analysis

Conversation

@mkoura

@mkoura mkoura commented May 14, 2026

Copy link
Copy Markdown
Collaborator

Add a regression-workflow step that, on testrun failure, invokes anthropics/claude-code-base-action against the still-uncompressed allure-results/, latest_artifacts/ symlink, errors_all.log and friends, producing failure_analysis.md. The analysis is uploaded with testrun files and inlined into the failure mail body.

To keep originals available without untarring, save_artifacts.sh now creates a latest_artifacts symlink to the renamed artifacts_/ dir, and create_results.sh no longer wipes allure-results/ after archiving.

@mkoura
mkoura requested a review from saratomaz as a code owner May 14, 2026 13:38
@mkoura
mkoura requested review from Copilot and removed request for saratomaz May 14, 2026 13:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds CI support for preliminary AI-assisted analysis of failed regression test runs, preserving uncompressed failure artifacts so they can be inspected before upload and mail notification.

Changes:

  • Adds a Claude analysis step to the reusable regression workflow and includes its output in artifacts/mail.
  • Keeps allure-results/ after archiving and creates a latest_artifacts symlink.
  • Passes the Claude OAuth token through regression and nightly workflow callers.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
runner/save_artifacts.sh Creates latest_artifacts symlink to the timestamped artifacts directory.
runner/create_results.sh Preserves allure-results/ after creating the archive.
.github/workflows/regression.yaml Passes Claude token to reusable regression workflow.
.github/workflows/regression-dbsync.yaml Passes Claude token to db-sync regression workflow.
.github/workflows/regression_reusable.yaml Adds Claude failure analysis, uploads output, and includes it in failure emails.
.github/workflows/nightly.yaml Passes Claude token to nightly regression workflow.
.github/workflows/nightly_pv11.yaml Passes Claude token to PV11 nightly workflow.
.github/workflows/nightly_dbsync.yaml Passes Claude token to db-sync nightly workflow.
.github/workflows/nightly_cli.yaml Passes Claude token to CLI nightly workflow.
Comments suppressed due to low confidence (2)

.github/workflows/regression_reusable.yaml:161

  • This step has the same implicit success() guard problem: once the test step has failed, the read step is skipped, so FAILURE_ANALYSIS is never populated for the mail body even if the analysis file exists. Include an explicit failure-tolerant status check here, matching the later upload/mail steps.
        if: steps.testing-step.outcome == 'failure'

.github/workflows/regression_reusable.yaml:168

  • This writes AI-generated Markdown to $GITHUB_ENV with a fixed delimiter. If the analysis (or quoted test output) contains __EOF_ANALYSIS__ on its own line, the env command is terminated early and the remaining lines can be parsed as separate environment assignments or make the step fail. Use a delimiter that cannot appear in the content, or pass the file content to the mail step without re-encoding it through $GITHUB_ENV.
              echo 'FAILURE_ANALYSIS<<__EOF_ANALYSIS__'
              cat failure_analysis.md
              echo '__EOF_ANALYSIS__'
            } >> "$GITHUB_ENV"

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/regression_reusable.yaml Outdated
Comment thread .github/workflows/regression_reusable.yaml Outdated
@mkoura
mkoura force-pushed the prelim_ai_failure_analysis branch 3 times, most recently from 4432a7e to c281431 Compare May 14, 2026 16:21
Add a regression-workflow step that, on testrun failure, invokes
anthropics/claude-code-base-action against the still-uncompressed
allure-results/, latest_artifacts/ symlink, errors_all.log and friends,
producing failure_analysis.md. The analysis is uploaded with testrun
files and inlined into the failure mail body.

To keep originals available without untarring, save_artifacts.sh now
creates a latest_artifacts symlink to the renamed artifacts_<timestamp>/
dir, and create_results.sh no longer wipes allure-results/ after archiving.
@mkoura
mkoura force-pushed the prelim_ai_failure_analysis branch from c281431 to a398d4f Compare May 15, 2026 08:40
@mkoura
mkoura merged commit 3831818 into master May 15, 2026
1 of 2 checks passed
@mkoura
mkoura deleted the prelim_ai_failure_analysis branch May 15, 2026 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants