Commit 98e0f2c
fix: detach_skill removes intents by skill_id prefix, not substring
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>1 parent e063f0c commit 98e0f2c
2 files changed
Lines changed: 46 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
304 | 304 | | |
305 | 305 | | |
306 | 306 | | |
307 | | - | |
| 307 | + | |
| 308 | + | |
308 | 309 | | |
309 | 310 | | |
310 | | - | |
311 | 311 | | |
312 | | - | |
| 312 | + | |
313 | 313 | | |
314 | 314 | | |
315 | 315 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
0 commit comments