Skip to content

fix(cache): Refresh unpinned repos after ref checkouts#88

Merged
gricha merged 1 commit intomainfrom
gricha/fix/git-cache-head-marker
Apr 19, 2026
Merged

fix(cache): Refresh unpinned repos after ref checkouts#88
gricha merged 1 commit intomainfrom
gricha/fix/git-cache-head-marker

Conversation

@gricha
Copy link
Copy Markdown
Member

@gricha gricha commented Apr 19, 2026

Refresh git cache freshness tracking so unpinned installs recover after the cache has been moved off the default branch.

We were using .git/FETCH_HEAD mtime as the freshness signal for cached repos. That breaks when a pinned ref fetch or a minimum_release_age checkout updates the cache without leaving it at the default branch head. In that state, later unpinned add and install calls can treat the cache as fresh and miss newer upstream skills.

This switches the cache to record the last known default-branch commit for unpinned refreshes and invalidates that marker whenever the cache is moved to a pinned or age-gated commit. I also added regression coverage for normal unpinned reuse, recovery after pinned ref fetches, and recovery after age-gated checkouts.

Track freshness for default-branch cache state instead of relying on FETCH_HEAD mtime. Pinned ref fetches and minimum_release_age checkouts can move the cached checkout away from the default branch without invalidating the old freshness signal, which left add/install using stale skills.

Invalidate the default-head marker whenever the cache is moved off the default branch, and record it again after unpinned refreshes. Add regression coverage for fresh reuse, pinned-ref recovery, and minimum_release_age recovery.

Co-Authored-By: OpenAI Codex <codex@openai.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 19, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dotagents Ready Ready Preview, Comment Apr 19, 2026 10:03pm

Request Review

@gricha gricha marked this pull request as ready for review April 19, 2026 22:04
@gricha gricha merged commit 8e1069f into main Apr 19, 2026
18 checks passed
@gricha gricha deleted the gricha/fix/git-cache-head-marker branch April 19, 2026 22:06
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.

1 participant