lore-proto, lore-server: add RepositoryCount RPC - #178
Open
lorelab-graham wants to merge 1 commit into
Open
Conversation
## Summary Adds RepositoryService.RepositoryCount(RepositoryCountRequest) -> RepositoryCountResponse for callers that want a repository count without paying RepositoryList's per-entry cost. RepositoryList streams a full Repository proto per entry, which is orders of magnitude more expensive than the count itself. The new RPC mirrors RepositoryList's filter surface (optional string creator). - Unfiltered path returns candidate_ids.len() directly and skips every per-repo metadata read, deserialization, and proto encoding that RepositoryList performs - Filtered path still walks metadata (the creator filter is applied after load, same as RepositoryList) and uses the same JoinSet fan-out to keep tail latency down - list_candidate_ids promoted to pub(super) so both handlers share the auth-service-vs-list_local split - Not added to ForwardedRepositoryService; cross-server count aggregation is a separate concern ## Test Plan - Unit tests in repository_count.rs: empty store, N repos with no filter, N repos with creator filter matching M, filter matching none - Proto shape test in v1_repository.rs destructures the new request and response - cargo test --workspace passes (no regressions) - Exercised against live servers. Counts match RepositoryList Signed-off-by: Graham Plumb <graham@lorelab.io>
lorelab-graham
force-pushed
the
repository_count
branch
from
August 29, 2026 12:45
17ab0b3 to
00abbbc
Compare
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.
Summary
Adds RepositoryService.RepositoryCount(RepositoryCountRequest) -> RepositoryCountResponse for callers that want a repository count without paying RepositoryList's per-entry cost.
RepositoryList streams a full Repository proto per entry, which is orders of magnitude more expensive than the count itself.
The new RPC mirrors RepositoryList's filter surface (optional string creator).
Test Plan