Repository navigation
fix: skills-sync reports stale, not current, when the fetch failed - #79
Merged
Merged
Conversation
A checkout whose every fetch fails (dolza's josui gets a 401 from the gateway) compared HEAD with a local origin/main no fetch had refreshed and wrote state=current with fetched=0 for weeks (a268). When this pass's clone or fetch failed, HEAD equal to origin now writes state=stale, aged from drift_since, so check_skills_sync.sh warns after 1h and goes critical after 6h with no change on the nagios side. A read-only checkout, which never fetches, is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R7Y1jgQzPHsAyyjYY7kKir
fatherlinux
force-pushed
the
fix/skills-sync-stale-state
branch
from
November 18, 2026 02:59
93f43cd to
6d7fad0
Compare
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.
On dolza, every fetch of josui's skills checkout fails because the gateway answers 401.
developer-skills-syncstill compared HEAD with a localorigin/mainthat no fetch had refreshed, and wrotestate=currentwithfetched=0for weeks (a268).The fix: when this pass's clone or fetch fails and HEAD equals origin, the script now writes
state=stale. drift_since works as it does for any other drift: it carries over from the last pass, or starts now.check_skills_sync.shtreats every state other thancurrentas drift. A persistently failing fetch therefore WARNs after 1h and goes CRITICAL after 6h, with no change in nagios-agent. A single failed pass stays inside the 1h grace. A read-only checkout never fetches, so it is unchanged.Tests in
tests/test_skills_sync.py:stale. drift_since stays stable across passes andfetchedcarries over.current, withdrift_since=0and a newfetched.currentis removed. It encoded the bug.sdlc pytest: 149 passed. I skipped CodeQL locally on this 4 GB seat; CI runs it.Seat rule: I'm not merging this myself. It's for Prime after review.
🤖 Generated with Claude Code
https://claude.ai/code/session_01R7Y1jgQzPHsAyyjYY7kKir