fix(skill_eval): conflict guard + descriptionOverride normalization (reworks #28)#32
Conversation
…escriptionOverride Reworks #28: the conflict guard now uses the shared runProcess helper (10s timeout, no Bun globals in compiled output) with a pure, unit-tested parser for `opencode debug skill` output. Empty descriptionOverride strings are treated as omitted in both skill_eval and skill_optimize_loop. Also gates the triggerOnly early return from #29 so a triggered run that ends in a failed process still throws when triggerOnly is false. Co-authored-by: Michael Ledin <mledin89@gmail.com> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
🏹 Robin✅ Review done. I flagged 4 things worth a look. Push fixes whenever you like, then comment |
There was a problem hiding this comment.
🏹 Robin
Heads up: this is a point-in-time review. Push fixes freely, then comment
/robinwhenever you want another pass.
Summary
The diff adds a conflict guard to prevent installed skills from shadowing eval-created synthetic skills, which is a solid defensive measure. The normalizeDescriptionOverride helper and the findSkillConflicts unit tests are well done. The main concern is a behavioral change in runSingleQuery that alters the early-return condition, which could affect eval results in non-triggerOnly mode if not carefully validated.
Robin — the Robin Hood of code review. Free for every PR.
Reworks #28 (credit @mxl for the original report and implementation — co-authored on the commit).
What changed
skill_evalandskill_optimize_loopnow fail fast with a clear error when a skill with the same base name is already visible to opencode (installed skill orskills.pathsentry), since it can steal triggers from the synthetic eval skill and produce false negatives.opencode debug skillthrough the sharedrunProcesshelper — 10s timeout (no hang if the CLI stalls) and noBunglobals in compiled output (package.test.mjsenforces this; directBun.spawnwas why fix(skill_eval): add conflict guard and normalize descriptionOverride #28's package tests failed after rebuild).findSkillConflicts()with unit tests (conflict found, missing location, no match, invalid JSON, non-array).descriptionOverridenormalization: empty/whitespace-only strings are treated as omitted in both tools.triggerOnlygating fix (follow-up to fix(skill_eval): add trigger-only mode #29): the early success return now respectstriggerOnly: false— a triggered run that ends in a failed process throws again, matching the flag's documented behavior.dist.Verification
npm run buildcleannpm test: 24/24 passnpm run test:ts: 49/49 passgrep -c '\bBun\b' dist/skill-creator.js→ 0Closes #28.
🤖 Generated with Claude Code