Skip to content

fix(pebble): catch YAML parse errors in discover_skills; log worker failures#71

Merged
max-tet merged 1 commit into
mainfrom
fix/pebble-yaml-skill-parse-error
May 16, 2026
Merged

fix(pebble): catch YAML parse errors in discover_skills; log worker failures#71
max-tet merged 1 commit into
mainfrom
fix/pebble-yaml-skill-parse-error

Conversation

@ClaydeCode
Copy link
Copy Markdown
Owner

Summary

  • Root cause: api-azure skill's frontmatter description contained Triggers: "..." unquoted — yaml.safe_load raised ScannerError (a YAMLError, not ValueError/OSError), which discover_skills didn't catch. The error escaped process_job before its inner try/except and was silently swallowed by worker_loop's except Exception: pass with no log. The worker stayed alive but drained all pending jobs with silent failures, then blocked at await queue.get().
  • skills.py: widen discover_skills catch from (ValueError, OSError) to Exception — any malformed skill is warned and skipped, worker unaffected.
  • worker.py: replace pass with log.exception(...) — unexpected errors from process_job are always visible.

Note: the api-azure/SKILL.md fix (quoting the description) lives in the knowledge base, not this repo.

Test plan

  • Add a skill file with a YAML colon in an unquoted value; verify discover_skills logs a warning and returns remaining skills without raising
  • Verify worker logs [job-id] unhandled error in process_job when process_job raises unexpectedly
  • Existing test suite passes

🤖 Generated with Claude Code

…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>
@max-tet max-tet merged commit c6558bd into main May 16, 2026
2 checks passed
@max-tet max-tet deleted the fix/pebble-yaml-skill-parse-error branch May 16, 2026 19:36
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.

2 participants