perf(#2351): batch path-existence checks via Git Trees API#2360
Open
fullsend-ai-coder[bot] wants to merge 1 commit into
Open
perf(#2351): batch path-existence checks via Git Trees API#2360fullsend-ai-coder[bot] wants to merge 1 commit into
fullsend-ai-coder[bot] wants to merge 1 commit into
Conversation
Add forge.Client.ListRepositoryFiles to retrieve all file paths in a repository's default branch with a single Git Trees API call (refs → commit → tree?recursive=1). This replaces the O(N) GetFileContent pattern used by ComparePathPresence, reducing 100+ sequential API calls to 3 fixed calls regardless of path count. Changes: - forge.Client: add ListRepositoryFiles(ctx, owner, repo) - github.LiveClient: implement using Git Trees API (reuses the same refs/commits/trees pattern as CommitFiles) - forge.FakeClient: implement using FileContents map keys - scaffold.ComparePathPresence: new batch implementation that calls ListRepositoryFiles once and checks membership locally - Tests: 6 ComparePathPresence tests including a guard that GetFileContent is never called; error injection and thread safety coverage for the new forge method PR #1954 introduces a naive ComparePathPresence in vendormanifest.go that loops GetFileContent per path. When that PR merges, its version should be replaced with this batch implementation. Closes #2351
E2E tests did not runE2E tests run automatically for org/repo members and collaborators on pull requests. For other contributors, a maintainer must add the See E2E testing guide for details. |
Site previewPreview: https://0324b99c-site.fullsend-ai.workers.dev Commit: |
|
🤖 Finished Review · ✅ Success · Started 7:30 PM UTC · Completed 7:41 PM UTC |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
ReviewFindingsMedium
Low
Info
|
This was referenced Jun 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add forge.Client.ListRepositoryFiles to retrieve all file paths in a repository's default branch with a single Git Trees API call (refs → commit → tree?recursive=1). This replaces the O(N) GetFileContent pattern used by ComparePathPresence, reducing 100+ sequential API calls to 3 fixed calls regardless of path count.
Changes:
same refs/commits/trees pattern as CommitFiles)
calls ListRepositoryFiles once and checks membership locally
GetFileContent is never called; error injection and thread
safety coverage for the new forge method
PR #1954 introduces a naive ComparePathPresence in vendormanifest.go that loops GetFileContent per path. When that PR merges, its version should be replaced with this batch implementation.
Closes #2351
Post-script verification
agent/2351-batch-path-presence)32f73a4f93301493d2c31be3970aa4c51a26acc7..HEAD)