Repository navigation
Import large repositories in the software-project pack - #18
Merged
Merged
Conversation
Running the software-project pack on a large private repository (about 40k files, 485 MB of packed history, Git LFS pointers) needed three manual workarounds; the pack now handles each case: - Edge proxy: Git pushes (git-receive-pack) have no body-size limit, so the driver's push of the imported history no longer fails with HTTP 413. Other requests keep the 100 MiB limit; Gitea authenticates pushes. - Git LFS: the prepare, sync and export hooks clone with the LFS filter off (kept in each clone's config), so pointers whose objects are missing pass through, git-lfs installs no pre-push hook, and the seed push, sync merge and delivery push carry pointers as they are (GIT_LFS_SKIP_SMUDGE=1 alone still installs the hook, and the push fails). - Evaluation: the acceptance container trusts the delivered checkout (safe.directory) before running a check, so git in acceptance.main no longer fails with "detected dubious ownership". Tests: unit tests run the hooks under a failing LFS filter and evaluate under a fake container that does not own the checkout; the software-project smoke run imports an upstream whose history is over 100 MiB and runs git in acceptance.main. Co-Authored-By: Claude <noreply@anthropic.com>
Yan Xia (sd983527)
added a commit
to sd983527/Agensh
that referenced
this pull request
Nov 3, 2026
Conflicts kept both sides: - evaluate.py: microsoft#18's safe.directory wrapper (TRUSTED_RUN) with the private data mount, now after the checkout mount; the team network's profile name falls back to the profile file, so the hook also runs without AGENSH_PROFILE (as microsoft#18's unit test calls it) - prepare.py: the snapshot-aware import message with microsoft#18's NO_LFS clone - run_smoke.sh: microsoft#18's git check in the evaluation now also runs in [acceptance] final, which the evaluate hook uses when it is set - export.py: the snapshot replay's upstream clone turns off LFS too Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Yan Xia (sd983527)
added a commit
to sd983527/Agensh
that referenced
this pull request
Nov 3, 2026
The merge added microsoft#18's git check to [acceptance] final, so the evaluation now runs four commands; the git check finds its result by command, not position. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Running the software-project pack on a large private repository (about 40k files, 485 MB of packed history, Git LFS pointers) needed three host-side workarounds. This PR removes the need for each one.
Changes
client_max_body_sizeis 100 MiB.docker/nginx-edge/conf.d/gitea.confnow lifts the limit for Git pushes only (location ~ /git-receive-pack$). Other requests keep the 100 MiB limit, and Gitea still requires a login to push.GIT_LFS_SKIP_SMUDGE=1alone is not enough: git-lfs still installs a pre-push hook, so the next push fails. The prepare, sync and export hooks now clone with the LFS filter turned off (NO_LFSinhooks/common.py, saved in each clone's config). git-lfs never runs, LFS files stay pointer files, and the seed push, sync merge and delivery push carry them unchanged.evaluate.pymounts the delivered checkout, owned by the host user, into a container that runs as root. The container now runsgit config --global --add safe.directory "*"before each check, as the worker's own git config does. This works on older git versions too, which ignore-candGIT_CONFIG_COUNTfor this setting.Docs:
docker/README.md,tasks/software-project/README.md,docs/acceptance_testing.md(known limitation: LFS content is never fetched, so checks that need it fail) andtests/smoke/README.md.Tests
tests/unit/test_software_project.py:LfsTestruns prepare, sync and export with a failing LFS filter (GIT_CONFIG_GLOBAL).EvaluateTestruns evaluate in a fake container that does not own the checkout (GIT_TEST_ASSUME_DIFFERENT_OWNER=1).tests/smoke/run_smoke.sh(software-project):acceptance.mainrunsgit log -1 --format=%H, and the run checks its output against the delivered head.GIT_LFS_SKIP_SMUDGE=1clone fails on push. TheNO_LFSclone pushes cleanly.python3 -m unittest discover -s tests/unitpassed (78 tests), andSMOKE_PACK=software-project bash tests/smoke/run_smoke.shpassed.🤖 Generated with Claude Code