Problem
download_repository(..., refresh=\"always\") runs git fetch but, when the source has no explicit ?ref=, never merges/resets to the remote default branch tip. Cached template banks stay on an old commit forever (until deleted).
Impact
After renames in cpa-templates (e.g. extensions/github-setup → extensions/all-github-setup), users with a warm cache hit ManifestLoadError: template directory not found: .../all-github-setup even with --refresh always / --no-cache path that still reuses the git cache entry.
Expected
Match CNA git.ts behavior: on refresh, checkout + pull/reset to the tracked remote tip so HEAD advances.
Acceptance
Problem
download_repository(..., refresh=\"always\")runsgit fetchbut, when the source has no explicit?ref=, never merges/resets to the remote default branch tip. Cached template banks stay on an old commit forever (until deleted).Impact
After renames in
cpa-templates(e.g.extensions/github-setup→extensions/all-github-setup), users with a warm cache hitManifestLoadError: template directory not found: .../all-github-setupeven with--refresh always/--no-cachepath that still reuses the git cache entry.Expected
Match CNA
git.tsbehavior: on refresh,checkout+pull/resetto the tracked remote tip so HEAD advances.Acceptance
refadvances HEAD toorigin/HEAD(ororigin/main)subdirforces a refresh even if meta says cache is fresh