Skip to content

fix(control): repair repository cache origin - #278

Merged
AntoineToussaint merged 1 commit into
mainfrom
fix/repair-missing-origin-cache
Aug 9, 2026
Merged

fix(control): repair repository cache origin#278
AntoineToussaint merged 1 commit into
mainfrom
fix/repair-missing-origin-cache

Conversation

@AntoineToussaint

Copy link
Copy Markdown
Contributor

Closes #277.

PrepareRepositoryCheckout already owns and repairs its named cache projection. This change extends that recovery to the precise case where the cache is a valid Git repository but has no origin:

  • enumerate configured remotes through Codefly's isolated Git environment
  • add origin from the typed request's authoritative repository URL only when absent
  • preserve the existing fail-closed behavior for a present but mismatched origin
  • continue the normal exact-revision fetch, forced checkout, and clean flow

The production-capability test uses a real repository and bare remote. It proves missing-origin repair, exact revision, clean checkout, idempotent retry, and rejection of a mismatched existing source.

Verification:

  • focused checkout lifecycle tests: pass
  • go vet ./...: pass
  • go test ./... -count=1: pass
  • git diff --check: pass

No Git workaround is added to Mind; the capability remains owned by Codefly.

@AntoineToussaint
AntoineToussaint force-pushed the fix/repair-missing-origin-cache branch from 9a67cc2 to fe77834 Compare August 9, 2026 13:27
@AntoineToussaint
AntoineToussaint merged commit 4a79631 into main Aug 9, 2026
5 checks passed
@AntoineToussaint
AntoineToussaint deleted the fix/repair-missing-origin-cache branch August 9, 2026 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Repair owned repository caches that are missing origin

1 participant