Stop reporting skill-update no-op cycles as errors#3034
Merged
Conversation
UpdateSkillsSaga's download steps are intentionally non-fatal, but the validate step then hard-threw "No skills found from any source" whenever the staging dir ended up empty. A transient network blip during the periodic refresh therefore surfaced a misleading exception even though the user's existing skills cache and the bundled skills were fully intact. An empty download cycle is now a no-op when a skills cache already exists: log a warning, keep the existing cache, and skip the swap. Only when there is genuinely nothing to fall back on do we throw — and with a clear, actionable message explaining the likely cause, that bundled skills still work, and that it retries automatically. Also only emit `skillsUpdated` when the cache actually changed. Generated-By: PostHog Code Task-Id: bb2c77d6-b22b-4f39-89a5-69c5b1c63001
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
Contributor
|
Reviews (1): Last reviewed commit: "Stop reporting skill-update no-op cycles..." | Re-trigger Greptile |
Contributor
|
Reviews (2): Last reviewed commit: "Merge branch 'main' into posthog-code/fi..." | Re-trigger Greptile |
andrewm4894
approved these changes
Jun 30, 2026
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.
Problem
PostHog Code's
UpdateSkillsSagaruns on a periodic refresh (and around skill-store activity). Its two skill-download steps are intentionally non-fatal, but thevalidate-skillsstep then hard-threw"No skills found from any source"whenever the staging dir ended up empty. So a transient network blip surfaced a misleading, opaque exception viacaptureException— even though the user's existing skills cache and the bundled skills were fully intact and nothing was actually broken. This was the single most common skills-related error in error tracking.Why: raised from a support thread after the error was hit while creating a skill in the skill store — it's noise that masks real failures and reads as scary to users.
Changes
"No skills found from any source".skillsUpdatedis only emitted when the cache actually changed.How did you test this?
pnpm exec vitest runonposthog-plugin.test.ts— 26/26 pass, including a new regression test (empty cycle with an existing cache stays silent and preserves skills) and an updated test asserting the genuine no-cache failure reports the clear message, not the old opaque one.Automatic notifications
Created with PostHog from a Slack thread