Skip to content

feat: add shared mirror cache for repeated repository clones - #51

Merged
skulidropek merged 5 commits into
ProverCoderAI:mainfrom
skulidropek:issue-48
Feb 16, 2026
Merged

feat: add shared mirror cache for repeated repository clones#51
skulidropek merged 5 commits into
ProverCoderAI:mainfrom
skulidropek:issue-48

Conversation

@skulidropek

@skulidropekskulidropek commented Feb 16, 2026

Copy link
Copy Markdown
Member

Summary

  • adds a shared git mirror cache under ~/.docker-git/.cache/git-mirrors for clone acceleration across containers
  • uses git clone --reference-if-able ... --dissociate when a mirror exists
  • bootstraps mirror from the freshly cloned repo when cache is missing
  • logs cache reuse explicitly ([clone-cache] using mirror: ...) for runtime verification
  • skips .docker-git in project config traversal to avoid scanning cache/state directories
  • updates managed state .gitignore to ignore .cache/git-mirrors/
  • adds a dedicated CI e2e scenario scripts/e2e/clone-cache.sh

Proof

Tests

  • pnpm --filter @effect-template/lib test -- tests/usecases/docker-git-config-search.test.ts tests/usecases/state-repo-gitignore.test.ts
  • pnpm --filter @effect-template/docker-git test -- tests/core/templates.test.ts
  • bash scripts/e2e/clone-cache.sh (executed in CI job E2E (Clone cache))

E2E cache assertions

clone-cache.sh performs two independent docker-git clone runs for the same repo URL and checks:

  • first run emits [clone-cache] mirror created: ...
  • mirror directory exists in host state .docker-git/.cache/git-mirrors/<hash>.git
  • second run emits [clone-cache] using mirror: ...

Closes#48

@skulidropek
skulidropek merged commit 233b416 into ProverCoderAI:mainFeb 16, 2026
11 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant

@skulidropek