Repository navigation
Clone the bare repo and mirrors without hardlinks - #127
Merged
moodmosaic merged 1 commit intoNov 3, 2026
Merged
Conversation
orsissimo
force-pushed
the
fix/bare-no-hardlinks
branch
from
November 2, 2026 23:13
dc4443d to
a5039b3
Compare
This was referenced Nov 3, 2026
Member
|
Thank you, @orsissimo! Can you rebase this? |
orsissimo
force-pushed
the
fix/bare-no-hardlinks
branch
from
November 3, 2026 16:14
a5039b3 to
4dbb314
Compare
orsissimo
force-pushed
the
fix/bare-no-hardlinks
branch
from
November 3, 2026 16:18
4dbb314 to
27e67f3
Compare
moodmosaic
added a commit
that referenced
this pull request
Nov 3, 2026
PR #127 moved the bare repo from /tmp/${PROJECT}-upstream.git into the private runtime directory (swarm_runtime_dir/upstream.git). runtime_pi.sh still used the legacy path, so the error and codex containers mounted a nonexistent upstream and the zero-exit error test failed. Point BARE at the runtime dir via swarm_runtime_dir, and clean up the whole runtime directory on teardown. Model: deepseek-v4-flash (m5m-ds4) Tools: Pi 1.4.0
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
chmodno longer changes the modes of the checkout's object files.cd7d006) including Avoid grep -q behind a pipe under pipefail in tests #128.Changes
launch.sh: add--no-hardlinks --dissociateto both bare clones so they copy objects, including those borrowed through alternates. Add comments explaining why copying is needed beforechmod -R a+rwX.tests/test_launch.sh: add section 35b using the livecreate_bare_repo,begin_engagementandmirror_submodulesfunctions with private runtime paths. Use agit clone --sharedsource with packs, a loose object made after gc, and a submodule with packs. Checkagent-work, the mirror's commit, unshared packs and loose object with unchanged modes, and noobjects/info/alternatesin the bare repo. Check that the borrowed commit remains readable after moving the lender repo away and that every bare clone copies objects.USAGE.md: remove bothupstream.gitandmirrorsfrom the private runtime directory through an alpine container. Remove the runtime directory and state file only after that succeeds, so files written by a different container UID cannot leave a partial cleanup. Docker and the alpine image are required.CHANGELOG.md: document the fix and remediation under Unreleased. Note that the bare repo and mirrors need their own space where earlier clones shared objects through hardlinks or alternates.Self-review checklist
Test plan
Validation after rebase onto
cd7d006(2026-11-03):608c5c5). The second rebase only resolved the changelog; the PR code patch is unchanged (git range-diff).git diff --checkpass.ANTHROPIC_API_KEYandCLAUDE_CODE_OAUTH_TOKENare not set in this session.Earlier validation, before this rebase:
bash tests/test_launch.sh: 245 passed. With master'slaunch.sh, nine checks in section 35b fail../tests/test.sh --unit: macOS Bash 3.2.57, 1399 tests; Ubuntu 24.04 Bash 5.2, 1411 tests as UID 501 and as UID 1000. Each run covered 13 files with 0 failures in the last two full rounds. In the first round one assertion unrelated to this change failed once under load: agrep -qbehind a pipe underpipefail, which master's tests have too../tests/test.sh --runtime: 16 passed on macOS with OrbStack and on Ubuntu as UID 501 and UID 1000../tests/test.sh --oauth: passed with a real agent on macOS and Ubuntu as UID 501 and UID 1000. The checkout's pack kept one link and its mode.costs.shandprogress.sh. Ran interactive sessions on the existing bare repo and a fresh bare repo after Cleanup, each followed by harvest. Rangit fsckon the checkout, submodule, bare repo and mirror. After every step, the checkout had no world-writable or multiply linked object file, and no object file changed mode.launch.shleft 10 world-writable, hardlinked object files. The Cleanup block fromUSAGE.mdand the commands from the CHANGELOG entry, run as written, removed the bare repo, mirrors and containers and restored the modes.git fsckpassed. A new session and harvest worked with no shared or world-writable object file.dfon a repository with a 900 MB.git: on macOS, the bare clone went from about 24 MB and 0.07 s to about 885 MB and under 1 s. On Ubuntu with the temporary directory on a separate tmpfs, the old clone already copied, so nothing changed../tests/test.sh --all: not run; phase 2 requires an API key.