Skip to content

Rebase agent older z-stream support and restrictions on Sources - #674

Merged
antbob merged 3 commits into
packit:mainfrom
antbob:rebase_older_zstreams
Jul 10, 2026
Merged

antbob merged 3 commits into
packit:mainfrom
antbob:rebase_older_zstreams

Conversation

@antbob

@antbob antbob commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

There are 2 main changes here:

  1. Add support for older z-stream re-bases. The leading z-stream, if available, is used as reference. Older z-streams now check out all the branches but that should not be a problem for disk space or processing time as those contain mostly patch files and such and not the actual source code.

  2. More restrictive instructions on Source files and their URLs. Currently this is a problem because the agent can DuckDuckGo and bring in whatever junk it finds so whatever sources it ends up with are of an unknown provenance. Not only it can derail the re-base itself but it can also get malicious sources which it then uploads to look-aside cache, effectively poisoning it.

This patch does not solve the problem described in (2) completely, it just tightens up the instructions. The proper solution should be creating a deterministic tool (ie something that can count the r's in strawberry) for this problem that the agent can use to verify the provenance of Source files and URLs, including check-sums etc but it is outside the scope for this patch.

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request introduces support for identifying and utilizing a leading z-stream branch as a reference during package rebases. It updates the rebase prompt template to guide the user on verifying Source URLs against this branch, resolves the leading z-stream branch in the rebase agent, and adjusts the repository cloning tasks. The review feedback suggests adding a unit test to verify that the prompt template renders correctly when the leading z-stream branch is provided.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread ymir/agents/tests/unit/test_jinja2_templates.py
@opohorel
opohorel self-requested a review July 10, 2026 09:39

@opohorel opohorel 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.

LGTM as is. I would think about following this up with the self-review similar to what we have in the backport agent

@antbob
antbob merged commit 0792e2c into packit:main Jul 10, 2026
11 checks passed
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