Skip to content

Only ask the AI to resolve actual patch conflicts - #432

Merged
tomrittervg merged 1 commit into
masterfrom
2026-10-15-tjr-ai-only-for-conflicts
Oct 19, 2026
Merged

tomrittervg merged 1 commit into
masterfrom
2026-10-15-tjr-ai-only-for-conflicts

Conversation

@tomrittervg

Copy link
Copy Markdown
Collaborator

./mach vendor --patch-mode only applies the mozilla patches and then runs the post-patch actions, and we gave any failure of it to the AI. A failed post-patch action (e.g. libjpeg's update.py on the dev instance) isn't something the AI can fix by editing the patches. mach logs "Could not apply " only when a patch didn't apply, so only involve the AI then; anything else is reported as before.

`./mach vendor --patch-mode only` applies the mozilla patches and then runs
the post-patch actions, and we gave any failure of it to the AI. A failed
post-patch action (e.g. libjpeg's update.py on the dev instance) isn't
something the AI can fix by editing the patches. mach logs "Could not apply
<patch>" only when a patch didn't apply, so only involve the AI then; anything
else is reported as before.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

The focused guard preserves failure reporting and has regression coverage for both routing paths, with no blocking issues identified.

No open issues 🎉

What changed in this PR

Limits AI patch resolution to failures containing mach’s “Could not apply” message, while preserving reporting for other vendoring failures.

Changes:

  • Skips AI resolution for non-conflict patch-step failures.
  • Adds regression coverage and updates conflict test messages.
File Description
tests/​functionality_all_platforms.py Verifies AI invocation for conflicts and avoidance for other failures.
tasktypes/​vendoring.py Adds conflict detection before invoking AI resolution.

Review effort: Balanced

@tomrittervg
tomrittervg merged commit 2d5c043 into master Oct 19, 2026
17 checks passed
@tomrittervg
tomrittervg deleted the 2026-10-15-tjr-ai-only-for-conflicts branch October 19, 2026 16: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