fix(persona): pack validate errors on skills the runtime would silently skip - #3532
fix(persona): pack validate errors on skills the runtime would silently skip#3532vedantggwp wants to merge 1 commit into
Conversation
…ly skip Signed-off-by: Vedant Gawande <iamvedant7@gmail.com>
Chessing234
left a comment
There was a problem hiding this comment.
Good PF-2 validate tighten-up. Surfacing missing name:/description: and missing skill directories as hard validate errors matches what the runtime already silently drops — better to fail the pack than ship a persona that quietly loses skills. Would be nice to include a tiny fixture-based test case in the PR description (or point at the ones in the diff) so reviewers can see the exact error strings operators will hit.
|
Good call. Added a "What operators see" section to the description with real output from a build off this branch, plus pointers to the tests covering each error path. Included the case where the naming warning shows up alongside the new errors, since that's the behaviour most worth eyeballing. |
Implements the PF-2 remainder from PERSONA_PACK_SPEC.md section 16. No issue filed since
the spec documents this as remaining validate work, but happy to split one out if you
prefer tracking it that way. No duplicate found in open PRs.
The runtime silently skips any skill whose SKILL.md lacks
name:ordescription:(parse_frontmatter returns None, no fallback to the directory name). And a persona
skills:entry pointing at a directory that doesn't exist is silently dropped duringvalidation's collection pass. So
buzz pack validatecurrently says Valid. for packsthat will quietly lose skills at deploy time. That's the worst kind of pass.
With this change, validate errors on:
skills:entry that doesn't resolve to a directory underskills/name:ordescription:(or either being empty)Unchanged: name-vs-directory mismatch stays a warning, same as before. Hooks path
verification (the other half of PF-2's remainder) is left for a follow-up to keep this
diff reviewable.
Tests cover each new error path plus one asserting the mismatch warning didn't get
promoted to an error.
DCO signed. AI-assisted, human-reviewed line by line.
What operators see
Real output from
buzz pack validatebuilt off this branch, against a pack with one badskills reference and one SKILL.md missing its description:
And the no-frontmatter case:
Each new error path has a matching unit test in validate.rs
(
validate_pack_skill_ref_missing_dir_errors,validate_pack_skill_missing_name_errors,validate_pack_skill_missing_description_errors,validate_pack_skill_no_frontmatter_errors),and the pre-existing
validate_pack_skill_name_mismatch_warnspins the mismatch case toa warning so this change can't silently promote it.