perf(s3fs): register chroot roots as recursive subtree prefixes
Make each repository's Chroot root register itself as a recursive subtree
prefix with the listing cache. This revives the subtree-scan optimization
(previously dead in chrooted deployments) so the entire repo is answered
from one delimiter-less S3 ListObjectsV2 instead of a list per folder.
Eliminates ~256 loose-object negative-lookup lists per clone and collapses
the background warmer from O(folders) lists/tick to O(1).
Changes:
- listingcache.go: roots field is now atomic.Pointer[[]string] with
registerRoot() method for lock-free runtime registration
- chroot.go: calls registerRoot() when creating a chroot
- listingcache_test.go: updated TestListingCacheChrootShares and added
TestListingCacheChrootSubtreeCollapsesLooseLookups regression guard
Verification: all tests pass, including race detector and cmd/objgitd
protocol tests.
Plan: docs/plans/why-does-objgit-do-zazzy-bentley.md
Assisted-by: Claude Opus 4.8 via Claude Code