Repository navigation
Rebase agent older z-stream support and restrictions on Sources - #674
Conversation
There was a problem hiding this comment.
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.
opohorel
left a comment
There was a problem hiding this comment.
LGTM as is. I would think about following this up with the self-review similar to what we have in the backport agent
There are 2 main changes here:
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.
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.