fix(cache): Refresh unpinned repos after ref checkouts#88
Merged
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refresh git cache freshness tracking so unpinned installs recover after the cache has been moved off the default branch.
We were using
.git/FETCH_HEADmtime as the freshness signal for cached repos. That breaks when a pinned ref fetch or aminimum_release_agecheckout updates the cache without leaving it at the default branch head. In that state, later unpinnedaddandinstallcalls 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.