mirror of
https://github.com/floci-io/floci.git
synced 2026-11-28 08:09:43 -05:00
* fix(ecr): join the ECR API with the backing registry Hostname-style ECR repository URIs resolve to loopback and hit the raw registry:2 container directly, so a docker push stores the image under the bare repository name while every API lookup (ListImages, DescribeImages, BatchGetImage, BatchDeleteImage, best-effort tag listing) only ever resolved the namespaced (account/region/repo) form. Name mismatch meant pushed images were silently invisible, no error. Adds resolveRegistryRepoName(): prefers the namespaced form, falls back to the bare name when nothing is stored there, with a cross-account/ cross-region ambiguity guard using the storage backend's unfiltered scan so the guard sees other scopes' claims in production, not just the calling account. Wired into every read path above. Force-delete resolves the name first (bare vs namespaced) and routes storage cleanup through #2982's filesystem-cleanup mechanism (EcrRegistryManager.deleteRepositoryStorageByInternalName) instead of its own per-tag HEAD-then-DELETE loop, so hostname-style bare-name content is actually removed instead of #2982's original code silently missing it. Tag/catalog/digest discovery during force-delete uses strict variants that throw on a genuine registry error (ServerException, matching service-2.json); any failure (unreachable registry included) now aborts the delete with metadata intact rather than assuming the repository empty, except when no HTTP client is wired at all (a pure test double with no backing registry to clean up). Catalog pagination follows the registry's Link header rather than assuming a single page. Closes #2444. * fix(ecr): explicit type and no em dashes per AGENTS.md hasOtherScopeClaim used var for the cast to AccountAwareStorageBackend<Repository>; AGENTS.md requires explicit types (KenkoGeek review). Also replaced a few em dashes introduced in new comments across the review's final round of tests, which AGENTS.md forbids repo-wide and CI enforces. --------- Co-authored-by: anmolxlight <anmolxlight@users.noreply.github.com>