Skip to content

Add MR verification agent - #858

Draft
diaasami wants to merge 1 commit into
packit:mainfrom
diaasami:mr_verification_agent
Draft

diaasami wants to merge 1 commit into
packit:mainfrom
diaasami:mr_verification_agent

Conversation

@diaasami

@diaasami diaasami commented Oct 4, 2026

Copy link
Copy Markdown

TODO:

  • Write new tests or update the old ones to cover new functionality.
  • Update doc-strings where appropriate.
  • Update or write new documentation in packit/packit.dev.
  • ‹fill in›

Fixes

Related to

Merge before/after

RELEASE NOTES BEGIN

Packit now supports automatic ordering of ☕ after all checks pass.

RELEASE NOTES END

@TomasKorbar TomasKorbar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This agent should not focus on the review of the changes. The task is to verify results of the CI pipeline if there is a failure. You should not check whether patches apply what changelog entries there are etc. Changelog entries and Patch additions are done by 90% from deterministic steps, thus rerunning them would result in the same failure and loop. The task of the MR verification agent is to wait until CI finishes and review its result only when there is a failure. Also if you would be checking spec file changes, you would have to verify that they conform to package rules, because maintainer can request his own formats/processes etc, which is something that should be done in the particular steps already.

Comment on lines +12 to +15
The MR verification agent performs that mechanical pass first. It reads the MR,
checks it against a fixed list of RHEL packaging invariants, and posts a review
comment. It does not replace the human reviewer and it does not merge anything.
Its value is that a maintainer opening a Ymir MR already knows where to look.

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.

There's heavy overlap here with the proposals in https://gitlab.cee.redhat.com/linux-engineering/wg-ai-sdlc/-/merge_requests/10

I think it makes more sense to have an agentic review process in RoG that runs on every MR.

that another AI agent opened against a dist-git repository. Your job is to decide whether a
human maintainer could merge it as-is, and to report every problem you find.

You are a REVIEWER, not an author. You must never modify the working tree, never create or

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.

Personally I think constraints like this are better enforced in code than in text. If we want the working tree to be read-only we can...just mount -o remount,ro on it or so.

Comment on lines +18 to +19
- Every `PatchN:` tag has a matching `%patchN` / `%autopatch` application (or the package
uses `%autosetup -S git`, in which case tag order is what matters).

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.

I think nowadays there's an rpmlint check for this? We should really try to make most checks use deterministic tools where possible.

And of course the initial drafter agent should be running those same tools too...

Also an important thing to note is that we still have fully deterministic CI in RoK that is likely running some of this stuff already too.


2. **Patch provenance and content**
- Each added `.patch` file carries an upstream commit reference (`commit <sha>` header,
`Upstream Status:`, or a URL) — a patch with no provenance is a blocker.

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.

This exists as https://docs.fedoraproject.org/tr/packaging-guidelines/PatchUpstreamStatus/

This one is interesting because we have a lot of history here and people do it different ways, but I think this could be a deterministic check ideally - at least if there aren't prior non-compliant patches.

CVE fix that touches forty files is suspicious.
- The patch does not carry unrelated hunks, refactors, or version bumps.
- The patch applies: use `run_package_prep` to confirm, when the task tells you the source
tarballs are available. A patch that applies with heavy fuzz, or fails, is a blocker.

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.

Again though, if the patch fails the build fails; it's not clear to me that it's valuable to have this patch agent also rerunning rhpkg prep...

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.

3 participants