Skip to content

Commit 0195026

Browse files
committed
docs(spec): archive ABC-5 clone cache work
1 parent a47e794 commit 0195026

3 files changed

Lines changed: 50 additions & 3 deletions

File tree

.kanban/changes/ABC-5/design.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,24 @@ The bare mirror path remains:
6464
## Recommended Implementation Constraint
6565

6666
Prefer minimal changes to the existing bare mirror flow first. Treat "git pull под нужную нам ветку" as the externally visible invariant: cache is refreshed, then workspace is checked out to the requested branch. Add a working-copy cache only if e2e verification shows the bare mirror flow cannot satisfy the requirement.
67+
68+
## Final Design Decision
69+
70+
The implementation kept the existing bare mirror cache and did not introduce a separate working-copy cache. This preserved the established cache root and state-repo ignore contract while satisfying the branch-refresh invariant:
71+
72+
1. Refresh `/home/<sshUser>/.docker-git/.cache/git-mirrors/<repo-cache-key>.git` with branch/tag-only refspecs.
73+
2. Clone warm-cache workspaces from that local mirror.
74+
3. Restore `origin` to the authenticated repository URL before network fetch/pull.
75+
4. Run `git pull --ff-only origin <repoRef>` for normal branch refs, or `git pull --ff-only` for no-ref default-branch clones.
76+
5. Keep PR/MR refs on explicit fetch into deterministic local branches.
77+
6. Keep issue refs as deterministic local branches after fallback clone.
78+
79+
No new cache directory was added, so the existing `.cache/git-mirrors/` ignore and untrack behavior remains sufficient.
80+
81+
## Archive Invariants
82+
83+
- Cache key remains derived from canonical `REPO_URL`, not `AUTH_REPO_URL`.
84+
- Broad cache refresh remains limited to `refs/heads/*` and `refs/tags/*`.
85+
- Tokenized auth URLs are used for network operations only; final remote normalization still runs through the existing fork/upstream remote block.
86+
- Clone completion/failure markers remain `/run/docker-git/clone.done` and `/run/docker-git/clone.failed`.
87+
- CLI/API contracts are unchanged.

.kanban/changes/ABC-5/proposal.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,11 @@ GitHub issue #138:
4242
- Cache paths remain ignored and untracked by state repository sync.
4343
- Existing clone flows continue to work for normal branches, issue URLs, GitHub PR refs, GitLab MR refs, and no-ref clones.
4444
- Tests document the cache reuse and branch-refresh contract.
45+
46+
## Archive Status
47+
48+
- Status: implemented
49+
- Spec commit: `f961baa docs(spec): add ABC-5 clone cache plan`
50+
- Implementation commit: `a47e794 feat(clone): reuse repository cache for branch pulls`
51+
- Final behavior: warm-cache clones use the refreshed bare mirror as the local clone source, then restore the authenticated origin and run branch-aware `git pull --ff-only` for normal branch/default branch flows.
52+
- E2E note: `bun run e2e:clone-cache` is updated but could not run in the local review environment because the host CLI cannot auto-discover the controller when `DOCKER_HOST=tcp://host.docker.internal:2375` and `DOCKER_GIT_API_URL` is unset.

.kanban/changes/ABC-5/tasks.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,24 @@
3434

3535
## Open Questions
3636

37-
- Should the final implementation use only the existing bare mirror cache, or introduce a separate working-copy cache to match the literal "git pull" wording?
38-
- Should concurrent clone cache refreshes use a lock file in the shared cache volume?
39-
- Should failed cache refresh be a warning with fallback or a hard clone failure?
37+
- Resolved: use the existing bare mirror cache; no separate working-copy cache was added.
38+
- Deferred: concurrent clone cache refreshes still do not use a lock file.
39+
- Preserved: failed cache refresh remains a warning/fallback behavior rather than a hard clone failure.
40+
41+
## Archive Verification
42+
43+
- [x] `bun run --filter @effect-template/lib test -- tests/core/templates.test.ts` (48 tests passed)
44+
- [x] `bun run --filter @effect-template/lib test` (51 files, 268 tests passed)
45+
- [x] `bun run --filter @prover-coder-ai/docker-git test` (73 files, 463 tests passed)
46+
- [x] `bun run typecheck`
47+
- [x] `bun run lint`
48+
- [x] `bun run build`
49+
- [x] Local git repro for warm-cache branch path: bare mirror refresh, clone from mirror, restore origin, `git pull --ff-only origin <branch>`.
50+
- [ ] `bun run e2e:clone-cache` blocked by local Docker/controller discovery: `DOCKER_HOST=tcp://host.docker.internal:2375` with no reachable `DOCKER_GIT_API_URL`.
51+
52+
## Archive Result
53+
54+
- Completed branch: `vk/d6b8-abc-5-github-138`
55+
- Spec commit: `f961baa docs(spec): add ABC-5 clone cache plan`
56+
- Implementation commit: `a47e794 feat(clone): reuse repository cache for branch pulls`
57+
- Merge status: not merged to `main`.

0 commit comments

Comments
 (0)