Commit aa93ad3
fix(platform-integrations): make bob custom-mode merge robust (#263)
The Bob custom_modes.yaml merge had two faults that combined to silently drop
the evolve-lite mode while still reporting success:
- Sentinel detection used a substring check (`if start in existing`). The
install-evolve-lite marketplace mode documents the literal
`# >>>evolve:evolve-lite<<<` in its customInstructions, so the merge thought a
block already existed, took the replace branch, found no matching end
sentinel, and no-op'd. Detection is now a line-anchored start..end regex.
- The inserted block hardcoded 2-space list indentation. A target written with
0-indent sequence items (yaml.safe_dump / marketplace tooling) ended up with
mixed indentation = invalid YAML. The block now matches the indentation
already used under customModes:.
remove_yaml_custom_mode is likewise line-anchored. Adds a regression test
reproducing the exact failure (0-indent target + sentinel literal in another mode).
Co-authored-by: Punleuk Oum <5661986+illeatmyhat@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent cbcf6b1 commit aa93ad3
2 files changed
Lines changed: 74 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
342 | 342 | | |
343 | 343 | | |
344 | 344 | | |
345 | | - | |
346 | 345 | | |
347 | 346 | | |
348 | 347 | | |
| |||
353 | 352 | | |
354 | 353 | | |
355 | 354 | | |
356 | | - | |
357 | | - | |
358 | | - | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
359 | 383 | | |
360 | 384 | | |
361 | 385 | | |
| |||
370 | 394 | | |
371 | 395 | | |
372 | 396 | | |
| 397 | + | |
| 398 | + | |
373 | 399 | | |
374 | | - | |
375 | | - | |
| 400 | + | |
| 401 | + | |
376 | 402 | | |
377 | 403 | | |
378 | 404 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
140 | 141 | | |
141 | 142 | | |
142 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
143 | 185 | | |
144 | 186 | | |
145 | 187 | | |
| |||
0 commit comments