Repository navigation
Commit 65ae2e8
CM-71972: Resolve the skills directory at call time, not at import
CI caught a real bug. The skills directory was a module-level constant, so
Path.home() was evaluated when the module was imported - pinning it to
whatever home the process started with. A test filesystem that redirects
home could then never be seen, which is why the collection test passed on
my machine and on some runners and failed on others: it depended on
whether the fake home happened to match the real one.
Every other home-relative directory in this module is already a function
for exactly this reason, so this follows _plugins_cache_dir.
The regression test patches home and asserts the directory follows; it
fails against the old constant, so the bug cannot come back silently.
Also fixes the lint failure: a lambda returning an empty list is just list.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 79006fb commit 65ae2e8
3 files changed
Lines changed: 28 additions & 3 deletions
File tree
- cycode/cli/apps/ai_guardrails/ides
- tests/cli/commands/ai_guardrails
- ides
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | 37 | | |
39 | 38 | | |
40 | 39 | | |
| |||
171 | 170 | | |
172 | 171 | | |
173 | 172 | | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
174 | 182 | | |
175 | 183 | | |
176 | 184 | | |
| |||
398 | 406 | | |
399 | 407 | | |
400 | 408 | | |
401 | | - | |
| 409 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
0 commit comments