Skip to content

Agent: add git tools for AI to navigate commit history - #78

Merged
Aditya Chillara (aditya-qti) merged 4 commits into
qualcomm:mainfrom
zeel2104:feat/ai-git-tools
Apr 28, 2026
Merged

Agent: add git tools for AI to navigate commit history#78
Aditya Chillara (aditya-qti) merged 4 commits into
qualcomm:mainfrom
zeel2104:feat/ai-git-tools

Conversation

@zeel2104

@zeel2104 Zeel Desai (zeel2104) commented Apr 23, 2026

Copy link
Copy Markdown
Contributor

Addressed review feedback:

  • added --no-pager for git tool invocations
  • extended git_show to support :
  • added name_only support to git_show
  • added git_cat_file(rev, path, start?, end?)
  • updated tool docs and tests

Validation:

  • pytest tests/ai_code_review/test_tools.py -k "git_log or git_show or git_cat_file" -v -s
  • all selected tests passed locally on Windows after fixing fixture/container setup issues
@zeel2104
Zeel Desai (zeel2104) marked this pull request as draft April 23, 2026 16:01
@zeel2104 Zeel Desai (zeel2104) changed the title ai_code_review: add git history tools Apr 23, 2026
Comment thread patchwise/patch_review/ai_review/ai_code_review/ai_code_review.py Outdated
Comment thread patchwise/patch_review/ai_review/ai_code_review/tool_definitions.py Outdated
Signed-off-by: Zeel <desaizeel2128@gmail.com>
Signed-off-by: Zeel <desaizeel2128@gmail.com>
Comment thread patchwise/docker.py Outdated
Signed-off-by: Zeel <desaizeel2128@gmail.com>
@zeel2104

Zeel Desai (zeel2104) commented Apr 25, 2026

Copy link
Copy Markdown
Contributor Author

Hey Aditya Chillara (@aditya-qti)

Addressed the review comments:

  • added --no-pager to git tool invocations
  • documented and supported <commit-id>:<relative/path> for git_show
  • added name_only support to git_show
  • added git_cat_file(rev, path, start?, end?)
  • removed the native Windows Docker Desktop workaround from docker.py

I also reran validation attempts in WSL. The remaining local issue is Docker overlay-volume mounting in my environment, so the unsupported Windows-specific workaround is not included in the PR.

Let me know if anything more is required

@aditya-qti
Aditya Chillara (aditya-qti) marked this pull request as ready for review April 26, 2026 15:32
Comment thread patchwise/docker.py Outdated
Comment thread patchwise/patch_review/ai_review/ai_code_review/ai_code_review.py Outdated
Comment thread patchwise/patch_review/ai_review/ai_code_review/ai_code_review.py Outdated
Comment thread patchwise/patch_review/ai_review/ai_code_review/ai_code_review.py Outdated
@trsoni

Copy link
Copy Markdown

Thank you for the contributions. Can you please add more details in your commit text as well? I see that PR is described well, but the commit text is lacking.

Drop the Docker container path normalizer now that container paths are represented directly as POSIX Path values inside the container.

Let kernel path validation raise ValueError directly instead of catching and rewrapping the same exception. Also avoid the extra git rev-list --count call in git_log; the capped git log result already tells us whether the response is truncated.

Signed-off-by: Zeel <desaizeel2128@gmail.com>
@zeel2104

Copy link
Copy Markdown
Contributor Author

Trilok Soni (@trsoni)
Thanks for pointing that out. I added a follow-up commit with a more detailed commit message describing the Docker cleanup, validation simplification, and git_log performance change.

@zeel2104

Copy link
Copy Markdown
Contributor Author

Aditya Chillara (@aditya-qti)

Addressed the latest comments:

  • removed _container_path()
  • removed the redundant ValueError try/except wrappers
  • removed the extra git rev-list --count call from git_log
  • added a follow-up commit with detailed commit text

I reran the focused pytest command from WSL using the existing virtualenv. The tests reach AiCodeReview fixture setup but fail before tool assertions because my Docker backend is still Docker Desktop:

Operating System: Docker Desktop
Kernel Version: 6.6.87.2-microsoft-standard-WSL2

The remaining failure is the same local overlay-volume mount issue:
error while mounting volume ... upperdir=.../_data/upper,workdir=.../_data/work,metacopy=on: no such file or directory

So I could not complete Docker-backed validation locally, but the latest code-review items are addressed.

@aditya-qti
Aditya Chillara (aditya-qti) merged commit 3ee30ed into qualcomm:main Apr 28, 2026
10 checks passed
@aditya-qti

Copy link
Copy Markdown
Contributor

Merged, thanks!

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

Labels

None yet

3 participants