Skip to content

Conversation

@iangmaia
Copy link
Contributor

@iangmaia iangmaia commented Jan 5, 2026

Fixes AINFRA-1695

Description

Adds to the project Claude Build Analysis, similarly to what has been done on Android (with the follow-up on wordpress-mobile/WordPress-Android#22459).
Claude will then from now on run and analyze any build job that has failed, adding a report annotation about the build failure. We'll also add a PR comment mentioning the Claude build analysis.

This PR is built on top of #25120, which was something I implemented in order to make the logs more compact. If we decide to not use it, we can retarget this PR to trunk.

Testing

See failed test build with annotation:

Screenshot 2026-01-08 at 12 25 03

If you want, you can also check the annotation by creating a Pull Request based on this branch and breaking any of the jobs in the build.

@iangmaia iangmaia added this to the 26.6 milestone Jan 5, 2026
@iangmaia iangmaia self-assigned this Jan 5, 2026
@iangmaia iangmaia added the Tooling Build, Release, and Validation Tools label Jan 5, 2026
@dangermattic
Copy link
Collaborator

1 Message
📖 This PR is still a Draft: some checks will be skipped.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Jan 5, 2026

App Icon📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack
ConfigurationRelease-Alpha
Build Number30331
VersionPR #25104
Bundle IDcom.jetpack.alpha
Commit0b0f017
Installation URL0vp4fmcb8t7q0
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Jan 5, 2026

App Icon📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress
ConfigurationRelease-Alpha
Build Number30331
VersionPR #25104
Bundle IDorg.wordpress.alpha
Commit0b0f017
Installation URL7ue2f52sooot8
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@iangmaia iangmaia force-pushed the iangmaia/claude-build-analysis branch 12 times, most recently from dfddb66 to 7cf07fb Compare January 7, 2026 15:47
@wpmobilebot
Copy link
Contributor

wpmobilebot commented Jan 7, 2026

🤖 Build Failure Analysis

This build has failures. Claude has analyzed them - check the build annotations for details.

@iangmaia iangmaia force-pushed the iangmaia/claude-build-analysis branch 3 times, most recently from 263a056 to daf0d87 Compare January 7, 2026 18:08
@iangmaia iangmaia force-pushed the iangmaia/claude-build-analysis branch from 7601812 to e349939 Compare January 8, 2026 10:33
@iangmaia iangmaia changed the base branch from trunk to iangmaia/disable-wiremock-logs-on-ci January 8, 2026 10:34

export IMAGE_ID="xcode-$XCODE_VERSION"
export CI_TOOLKIT_PLUGIN="automattic/a8c-ci-toolkit#$CI_TOOLKIT_PLUGIN_VERSION"
export CLAUDE_PLUGIN="iangmaia/claude-summarize#iangmaia/add-build-log-mode"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've created a Pull Request to the claude-summarize-buildkite-plugin project introducing the build_log_mode attribute, allowing us to send to for analysis Claude only failed jobs, saving a lot of the tokens usage.
Hopefully it won't take long to merge it and we can revert to the main repo again.

Copy link
Contributor

Choose a reason for hiding this comment

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

Otherwise, we can always keep using or fork, whic I think you mentioned this elsewhere, too.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 8, 2026

@iangmaia iangmaia requested review from mokagio and twstokes January 8, 2026 16:44
@iangmaia iangmaia marked this pull request as ready for review January 8, 2026 16:45
build_log_mode: "failed"
trigger: "on-failure"
max_log_lines: 1500
custom_prompt: "Do not mention successful points, focus on failures and recovery to keep the analysis succint. Only add the `Best Practices` section if the changes in this PR are directly relevant to it. Only add a `Root Cause` section when you're sure about the issues' causes."
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
custom_prompt: "Do not mention successful points, focus on failures and recovery to keep the analysis succint. Only add the `Best Practices` section if the changes in this PR are directly relevant to it. Only add a `Root Cause` section when you're sure about the issues' causes."
custom_prompt: "Do not mention successful points, focus on failures and recovery to keep the analysis succinct. Only add the `Best Practices` section if the changes in this PR are directly relevant to it. Only add a `Root Cause` section when you're sure about the issues' causes."

Comment on lines +222 to +223
queue: upload

Copy link
Contributor

Choose a reason for hiding this comment

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

Nitipick, no trailing newline.

Suggested change
queue: upload
queue: upload


export IMAGE_ID="xcode-$XCODE_VERSION"
export CI_TOOLKIT_PLUGIN="automattic/a8c-ci-toolkit#$CI_TOOLKIT_PLUGIN_VERSION"
export CLAUDE_PLUGIN="iangmaia/claude-summarize#iangmaia/add-build-log-mode"
Copy link
Contributor

Choose a reason for hiding this comment

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

Otherwise, we can always keep using or fork, whic I think you mentioned this elsewhere, too.

Comment on lines -116 to +127
- label: "🔬 Keystone Unit Tests"
command: .buildkite/commands/run-unit-tests-for-scheme.sh Keystone
# Disabled till https://github.com/wordpress-mobile/WordPress-iOS/pull/24537 is completed
#
# The boolean value has to be a string explicitly.
# See validation error against schema.
if: "false"
plugins: [$CI_TOOLKIT_PLUGIN]
artifact_paths:
- "build/results/*"
notify:
- github_commit_status:
context: "Unit Tests Keystone"
# Disabled till https://github.com/wordpress-mobile/WordPress-iOS/pull/24537 is completed
# - label: "🔬 Keystone Unit Tests"
# command: .buildkite/commands/run-unit-tests-for-scheme.sh Keystone
# plugins: [$CI_TOOLKIT_PLUGIN]
# artifact_paths:
# - "build/results/*"
# notify:
# - github_commit_status:
# context: "Unit Tests Keystone"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why commenting the whole step?

I mean, it makes sense so the parser doesn't have to bother with something that is hardcoded if: "false" and the result is the same, but was it to help with this PR or something that stood out?

Perhaps given the commit it the change is in, e349939, it was to reduce the logs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Tooling Build, Release, and Validation Tools

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants