Skip to content

fix: review remote repos from a blobless clone without checkout

isidro requested to merge fix/review-clone-blobless into main

Summary

  • The com.tripleo.review-sync cron got 500 clone_timeout ... exceeded 240s on game/DoctrineStrike (Unity, 59,103 files): git clone --depth=50 checks out HEAD and never finishes inside the budget.
  • Remote sources now clone with --depth=50 --filter=blob:none --no-checkout (and GIT_LFS_SKIP_SMUDGE=1), keep the metadata-only fetch of the other branches, and check out only README / GDD / engine marker files (repo_tree.py). The clone is tagged with .git/cmo-metadata-only.
  • For tagged clones collect_project_snapshot walks git ls-tree -r -z --name-only HEAD (same _VENDOR_DIRS filter), detects the engine from path names, and passes the trailer/build size gates by name only because blob sizes are not downloaded (documented in _size_at_least). A failed tree listing raises tree_listing_failed instead of reporting a near-empty repo.
  • Local checkouts are unchanged: rglob and real sizes.

Measured locally on DoctrineStrike: clone 23 s, snapshot 0.6 s, engine unity, 57,868 files after vendor filtering, README read.

Test plan

  • tests/test_project_reviewer_partial_clone.py: real repo cloned over file:// with partial clone enabled: clone flags, materialised files, branch metadata, ls-tree walk, README, engine, local repo unchanged, loud failure, engine detection by name.
  • Full suite: 1363 passed, coverage 77.6 %; ruff and mypy (repo_tree.py added to the strict list) clean.
  • After deploy: POST /api/projects/review {"source":"game/DoctrineStrike"} returns 200 in under 240 s.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Hdp8WThUYoNtDBJYN4fW5D

Merge request reports