fix(pebble): catch YAML parse errors in discover_skills; log worker failures#71
Merged
Merged
Conversation
…ailures `_parse_skill` raises `yaml.scanner.ScannerError` (a `YAMLError`, not a `ValueError` or `OSError`) when a skill frontmatter contains an unquoted colon in a value (e.g. `Triggers: "..."` inside a description field). `discover_skills` only caught `(ValueError, OSError)`, so the error escaped, propagated out of `process_job` before the inner try/except, and was silently swallowed by `except Exception: pass` in `worker_loop` — with no log entry. Every subsequent command failed the same way, leaving the worker alive but effectively dead (blocked at `await queue.get()` after draining all failing jobs). - `discover_skills`: widen catch to `Exception` so any malformed skill file is warned and skipped instead of crashing the worker. - `worker_loop`: replace silent `pass` with `log.exception(...)` so unexpected errors from `process_job` are always visible in logs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
api-azureskill's frontmatter description containedTriggers: "..."unquoted —yaml.safe_loadraisedScannerError(aYAMLError, notValueError/OSError), whichdiscover_skillsdidn't catch. The error escapedprocess_jobbefore its inner try/except and was silently swallowed byworker_loop'sexcept Exception: passwith no log. The worker stayed alive but drained all pending jobs with silent failures, then blocked atawait queue.get().skills.py: widendiscover_skillscatch from(ValueError, OSError)toException— any malformed skill is warned and skipped, worker unaffected.worker.py: replacepasswithlog.exception(...)— unexpected errors fromprocess_jobare always visible.Note: the
api-azure/SKILL.mdfix (quoting the description) lives in the knowledge base, not this repo.Test plan
discover_skillslogs a warning and returns remaining skills without raising[job-id] unhandled error in process_jobwhenprocess_jobraises unexpectedly🤖 Generated with Claude Code