Files
Kathy Wu 3c977bc2ef fix(skills): skip search results that fail frontmatter validation
`GCPSkillRegistry.search_skills` built a `Frontmatter` for every hit with no
per-item error handling. `Frontmatter.name` must be kebab-case (or snake_case
behind the feature flag), but the catalog holds names outside that set -- the
first-party entry `cloud.google.com-agent-platform-eval-flywheel` has dots. The
first such hit raised a pydantic `ValidationError` and took down the whole
call, so search returned nothing at all against any catalog that holds one
non-conforming entry. An entry with an empty description did the same.

Skip the entry and log a warning instead. The caller does not control what the
catalog holds, so one entry it never asked about must not break discovery for
everything else.

A name that is not a string gets the same treatment. `.split` on it raises
before validation is reached, which would sink the call the same way.

Fixes #6838

Co-authored-by: Kathy Wu <wukathy@google.com>
PiperOrigin-RevId: 968161389
2026-08-20 17:49:58 -07:00
..