Skip to content

feat: full private repository support#220

Merged
AlienKevin merged 13 commits intoSWE-bench:mainfrom
mkaramuk:feat/full-private-repo-support
Feb 17, 2026
Merged

feat: full private repository support#220
AlienKevin merged 13 commits intoSWE-bench:mainfrom
mkaramuk:feat/full-private-repo-support

Conversation

@mkaramuk
Copy link
Contributor

Add private repository support across the pipeline. The system now detects repo visibility via GitHub API and automatically switches between HTTPS (public) and SSH (private) URLs for cloning, mirror creation, Docker image builds, and evaluation containers.

reisepass and others added 2 commits February 13, 2026 15:34
Add end-to-end private repository support across all profile types.
Visibility-aware git authentication ensures private repos get private
mirrors, SSH-based cloning, and BuildKit SSH forwarding during image
builds. Eval containers receive SSH keys via copy_to_container with
GIT_SSH_COMMAND override for git fetch operations.

Key changes:
- _is_repo_private() caches GitHub API visibility check
- mirror_url returns SSH URL for private repos, HTTPS for public
- create_mirror() preserves source repo visibility
- _prepare_dockerfile() injects BuildKit SSH mount into Dockerfiles
- _docker_ssh_arg conditionally passes --ssh default only when needed
- _find_ssh_key() discovers keys from GITHUB_USER_SSH_KEY or ~/.ssh/
- Threading lock prevents race condition in parallel SSH key copying
- All profile classes and JS/TS helpers use visibility-aware URLs

Co-Authored-By: Muhammed Karamuk <mkaramuk@proton.me>
Co-Authored-By: Rb <rubenwolff@gmail.com>
@mkaramuk mkaramuk force-pushed the feat/full-private-repo-support branch from abb767f to 72c51ca Compare February 13, 2026 12:35
@codecov
Copy link

codecov bot commented Feb 13, 2026

Codecov Report

❌ Patch coverage is 96.78284% with 12 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
swesmith/profiles/javascript.py 30.76% 9 Missing ⚠️
swesmith/profiles/base.py 98.70% 1 Missing ⚠️
tests/harness/test_utils_ssh.py 99.20% 1 Missing ⚠️
tests/profiles/test_base.py 98.76% 1 Missing ⚠️
Files with missing lines Coverage Δ
swesmith/harness/utils.py 82.63% <100.00%> (+7.25%) ⬆️
swesmith/profiles/golang.py 92.51% <ø> (ø)
swesmith/profiles/python.py 92.48% <100.00%> (+0.06%) ⬆️
swesmith/profiles/rust.py 98.67% <ø> (ø)
swesmith/profiles/typescript.py 78.43% <100.00%> (ø)
tests/profiles/test_profiles_javascript.py 100.00% <100.00%> (ø)
tests/profiles/test_profiles_python.py 100.00% <100.00%> (ø)
swesmith/profiles/base.py 82.86% <98.70%> (+3.84%) ⬆️
tests/harness/test_utils_ssh.py 99.20% <99.20%> (ø)
tests/profiles/test_base.py 96.85% <98.76%> (+0.34%) ⬆️
... and 1 more

... and 22 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@john-b-yang
Copy link
Member

This is so awesome, thank you so much for adding! Will take a more thorough review pass later today.

mkaramuk and others added 5 commits February 13, 2026 19:54
…pport

Use _source_read_url and _configure_ssh_env() instead of hardcoded
HTTPS/SSH URLs so private repos are cloned correctly.
Cover _find_ssh_key, SSH container logic, default_npm_install_dockerfile,
_is_repo_private error path, _configure_ssh_env, _prepare_dockerfile,
_docker_ssh_arg, and fix broken mock_open in test_python_profile_build_image.
@AlienKevin
Copy link
Collaborator

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: caaa82939f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@mkaramuk
Copy link
Contributor Author

Hey @AlienKevin, I have updated the approach that codex pointed out.

@AlienKevin
Copy link
Collaborator

@codex Fix the pre-commit.ci failures

@chatgpt-codex-connector
Copy link

Codex couldn't complete this request. Try again later.

@AlienKevin AlienKevin merged commit 4b9fc1c into SWE-bench:main Feb 17, 2026
6 checks passed
@AlienKevin
Copy link
Collaborator

Merged, thanks for your contributions!

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.

4 participants