fix: detach_skill removes intents by skill_id prefix, not substring - #102
fix: detach_skill removes intents by skill_id prefix, not substring#102JarbasAl wants to merge 1 commit into
Conversation
handle_detach_skill selected intents to remove with `skill_id in i`, a substring test over the full "<skill_id>:<name>" intent name. A skill whose id is a substring of another skill's id (e.g. "me" against "skill-a.me") wiped the other skill's intents when it detached, and an unregistered id like "skill" cleared every intent containing that text. The entity branch of the same handler already matched on the "<skill_id>:" prefix, as do adapt and padatious. Intents are now selected with startswith(skill_id + ":"), the colon being the intent-name namespace separator (OVOS-MSG-1 §2.1.1), so the owner of "a.b:c" is exactly "a.b". Regression test test/test_detach_skill_prefix.py: 2 failed before the fix (registered_intents emptied to [] in both cases), 2 pass after. Full suite: 90 passed, 2 skipped. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Hello! The automated checks have been performed. 👋I've aggregated the results of the automated checks for this PR below. 📋 Repo HealthChecking the repo's cholesterol levels (aka code bloat). 🥩 ✅ All required files present. Latest Version: ✅ 🔌 Plugin DetectionI've verified the plugin's 'security' signature. ✍️ ❌ Plugin Status: ERRORS (1) Plugin Info:
OPM Detection:
Entry Point Validation:
⊘ No Issues:
🔌 Skill Tests (ovoscope)Checking the skill's 'poker face' during errors. 😐 ❌ 8/20 passed, 12 failed ❌ **TestDetach** — 0/2
❌ **TestEntityExtraction** — 0/1
❌ **TestLegacyStillConsumed** — 0/1
❌ **TestRegisteredIntentMatch** — 1/4
❌ **TestSessionBlacklist** — 0/2
❌ **TestSessionBlacklistAlias** — 0/3
🚌 Bus CoverageEnsuring the bus logic is battle-tested. ⚔️ 🏷️ Release PreviewEvaluating the overall quality of the next release. ✨ Current:
✅ PR title follows conventional commit format. 🚀 Release Channel Compatibility Predicted next version:
🔒 Security (pip-audit)Scanning for any potential SQL injection points. 💉 ✅ No known vulnerabilities found (49 packages scanned). 🔍 LintHere's the latest update on this check. 🗞️ ❌ ruff: issues found — see job log 📊 CoverageEnsuring the logic is battle-tested. ⚔️ ✅ 82.0% total coverage Per-file coverage (3 files)
Full report: download the 🔨 Build TestsI've laid the bricks for your new logic. 🧱 ✅ All versions pass
Built by scripts, maintained by community 🤝 |
handle_detach_skillinpadacioso/opm.pypicked the intents to remove withskill_id in i, a substring test over the whole<skill_id>:<name>intent name. When a skill with idmedetaches,skill-a.me:oneandskill-b.me:bonego with it; adetach_skillforskillclears bothvictim.skill:onandotherskill:on. The entity branch of the same handler, and adapt and padatious, already match on the<skill_id>:prefix.The intent selection now uses
startswith(skill_id + ":"). The colon is the intent-name namespace separator (OVOS-MSG-1 §2.1.1), so the owner ofa.b:cis exactlya.b. The handler'sskill_idresolution is untouched; this PR is independent of #101 and does not overlap its lines.test/test_detach_skill_prefix.pyasserts the roster values for both scenarios above. With the source change reverted both tests fail (registered_intentsends up[]instead of the two surviving intents); with it applied both pass. Full suite: 90 passed, 2 skipped (the two ovoscope e2e modules, skipped identically on dev because ovoscope is not installed in the test venv).Verified against source by the authoring model only: the defect line on origin/dev, the fail-before flip, and the suite counts. No human has reviewed this change.