Repository navigation
feat(git): Add bin/git-server to check the relay against real providers - #161
Merged
Merged
Conversation
vaind
force-pushed
the
ivan/git-dev-server
branch
6 times, most recently
from
October 21, 2026 09:36
722becb to
75da3a4
Compare
vaind
marked this pull request as ready for review
October 21, 2026 09:39
vaind
force-pushed
the
ivan/git-dev-server
branch
3 times, most recently
from
October 22, 2026 06:26
edff5ce to
ba90324
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ba90324. Configure here.
vaind
force-pushed
the
ivan/git-dev-server
branch
2 times, most recently
from
October 22, 2026 13:43
043047b to
6eb1e91
Compare
The unit tests run the relay against a canned local server, so nothing showed that a real git client gets through GitServer to GitHub or GitLab: git's own request sequence, protocol v2, chunked pushes, and how it shows our refusals. bin/git-server stands in for Sentry's endpoint with the same credentials as bin/github-server and bin/gitlab-server. It serves a repository and prints grants for it, or with --check runs git against it and exits non-zero on a failure, so it can move to CI once there are credentials for a test repository. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
vaind
force-pushed
the
ivan/git-dev-server
branch
from
October 22, 2026 15:16
6eb1e91 to
4bf39a6
Compare
cmanallen
approved these changes
Oct 22, 2026
3 tasks done
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.

Stacked on #156. Part of CW-2221.
The unit tests run the relay against a canned local server. None of them shows that a real
gitclient gets throughGitServerto GitHub or GitLab, with git's own request sequence, protocol v2, chunked pushes, and how git shows our refusals.Approach
bin/git-serverstands in for Sentry's git endpoint. It looks up the repository, signs grants and supplies the token. The realGitServerandGitRelaydo the rest.bin/github-serverandbin/gitlab-serverread, from.credentials, env vars or flags. It loads those scripts to reuse their token handling.bin/git-server github --repository OWNER/REPOserves the repository and prints a fetch grant, a push grant, and thegit cloneandgit pushcommands that use them.--checkserves on a free port, runs git against it, and exits non-zero if any check fails. Nothing is prompted and the user's git config isn't used, so it can run in CI once there are credentials for a test repository. It checks that:ls-remoteand a shallow clone work with a fetch grantremote:messageRepository not found., which the relay passes on--push: also pushes a 256 KiB commit to a new branch and then deletes it. The commit is larger thanhttp.postBuffer, so git sends it chunked. This writes to the repository, so it's opt-in.Testing
--push, pass in GitLab mode against a local HTTPSgit http-backendwith Basic auth. The backend received the push chunked, and the test branch was deleted afterwards.--push, pass against an internal test repository through a GitHub App installation token. The test branch was deleted afterwards.🤖 Generated with Claude Code