fix: validate full skill files during evolution#32
Open
alexzhu0 wants to merge 1 commit intoNousResearch:mainfrom
Open
fix: validate full skill files during evolution#32alexzhu0 wants to merge 1 commit intoNousResearch:mainfrom
alexzhu0 wants to merge 1 commit intoNousResearch:mainfrom
Conversation
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
SKILL.md, not just the markdown bodyRoot cause
evolve_skill.pywas callingConstraintValidator.validate_all()onskill["body"]andevolved_body, butskill_structurevalidation expects a full skill file with YAML frontmatter. This caused false constraint failures likeSkill missing: YAML frontmatter (---), name field, description fieldeven when the reassembled evolved skill was structurally valid.A naive switch to validating the full file fixed structure checks but weakened growth validation by measuring against the full file instead of the mutable body. This patch separates those concerns.
What changed
validate_skill_constraints()inevolution/skills/evolve_skill.pyskill_structureon the full baseline or reassembled evolved skillConstraintValidator.validate_all()to treatbaseline_text=""as a provided baseline so growth checks still run for empty-body skillsVerification
pytest tests/ -q→143 passedpython -m evolution.skills.evolve_skill --skill github-auth --iterations 1 --eval-source synthetic ...Notes
This PR intentionally does not change the separate GEPA compatibility issue (
max_steps/ metric signature mismatch). That looks like a follow-up PR.