Commit 44868e4
committed
fix(skills): tighten review nits from refactor
Two small follow-ups from reviewing the refactor:
- Load: add a FilePath tiebreaker to the sort. slices.SortedFunc uses
pdqsort which is unstable, so two skills sharing a Name (e.g. a local
and a remote source both exposing 'foo') would otherwise have
non-deterministic relative ordering across runs. FilePath is unique,
so this gives Load a fully deterministic output.
- local.go: clarify the symlink behavior of loadSkillsFlat (skips
symlinks explicitly) and loadSkillsRecursive (filepath.WalkDir does
not follow symlinks; the visited map is defensive against bind
mounts and symlinked roots, not symlinks inside the tree).
Assisted-By: docker-agent1 parent 94f3b37 commit 44868e4
2 files changed
Lines changed: 19 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | | - | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
138 | 140 | | |
139 | 141 | | |
140 | 142 | | |
| |||
154 | 156 | | |
155 | 157 | | |
156 | 158 | | |
157 | | - | |
158 | | - | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
159 | 168 | | |
160 | 169 | | |
161 | 170 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
76 | 82 | | |
77 | 83 | | |
78 | 84 | | |
| |||
0 commit comments