Rewrite git-sync into focused packages
Commit

Break the monolithic syncer.go (3143 lines) into 7 focused packages:
- internal/gitproto: pkt-line, smart HTTP, capability negotiation, v1/v2 fetch/push
- internal/planner: mapping validation, planning, relay eligibility, checkpoints
- internal/auth: credential resolution, Entire DB tokens, git credential helper
- internal/strategy/bootstrap: one-shot + batched bootstrap, GitHub preflight
- internal/strategy/incremental: incremental relay execution
- internal/strategy/materialized: materialized fallback push with size guard
- internal/syncer: slim orchestrator (734 lines), stats, measurement
Addresses all 22 issues from docs/rewrite-issue-list.md:
Correctness: tag ref creation independent of pack (#1), duplicate target mapping rejection (#2), cross-kind mapping rejection (#3), sideband-64k preference (#4), pack reader close discipline (#5), include-tag capability gating (#6), OAuth refresh error propagation (#7).
Concurrency: mutex-protected stats (#8), bounded response reads (#9), flock-based file token store locking (#10).
Architecture: package decomposition (#11), shared session setup (#12), explicit Params structs (#13).
Performance: commit-count batch sizing heuristic (#14), materialized object count guard (#15), bounded ancestry checks with ErrAncestryDepthExceeded (#16), reusable pkt-line buffer (#17).
Testing: 73 test functions, 7 benchmarks, coverage 41-58% on core packages. Protocol malformed-input tests (#18-20), behavioral edge cases (#21), benchmarks for planning/protocol hot paths (#22).
Co-Authored-By: Claude Opus 4.6 (1M context) noreply@anthropic.com Entire-Checkpoint: 27633b8ca595