Skip to content

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

Merged
aditya-qti merged 4 commits intoqualcomm:mainfrom
zeel2104:feat/ai-git-tools
Apr 28, 2026
Merged

Agent: add git tools for AI to navigate commit history#78
aditya-qti merged 4 commits intoqualcomm:mainfrom
zeel2104:feat/ai-git-tools

Conversation

@zeel2104
Copy link
Copy Markdown
Contributor

@zeel2104 zeel2104 commented Apr 23, 2026

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 zeel2104 requested a review from aditya-qti as a code owner April 23, 2026 16:01
@zeel2104 zeel2104 marked this pull request as draft April 23, 2026 16:01
@zeel2104 zeel2104 changed the title ai_code_review: add git history tools Agent: add git tools for AI to navigate commit history 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
Comment thread patchwise/patch_review/ai_review/ai_code_review/tool_definitions.py
Comment thread patchwise/patch_review/ai_review/ai_code_review/tool_definitions.py
@zeel2104 zeel2104 force-pushed the feat/ai-git-tools branch from 5be1c88 to a74eea3 Compare April 24, 2026 02:03
Comment thread patchwise/docker.py Outdated
@zeel2104
Copy link
Copy Markdown
Contributor Author

zeel2104 commented Apr 25, 2026

Hey @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-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

trsoni commented Apr 27, 2026

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 <[email protected]>
@zeel2104
Copy link
Copy Markdown
Contributor Author

@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-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-qti merged commit 3ee30ed into qualcomm:main Apr 28, 2026
10 checks passed
@aditya-qti
Copy link
Copy Markdown
Contributor

Merged, thanks!

@aditya-qti aditya-qti linked an issue Apr 28, 2026 that may be closed by this pull request
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.

Agent: add git tools for AI to navigate commit history

3 participants