This repository was archived by the owner on Jun 26, 2026. It is now read-only.
Repository navigation
Commit a815790
committed
fix(console): bail on shrink for nested-immutable arrays, handle root wildcard
Two concrete data-corruption shapes surfaced in review:
1. When the user shrinks an array with a per-element-nested-immutable
path (e.g. disks[].name), index-aligned overlay re-anchors source
names onto the surviving entries — silently changing which element
was deleted. We now detect length shrink at the wildcard segment
and skip the overlay for that path with a console.warn. The UI's
ui:disabled still prevents interactive edits; admission stays as
the authoritative enforcer for YAML/devtools bypass.
2. A top-level wildcard immutable path (root array or map carrying the
rule on items/additionalProperties) used to no-op silently — the
overlay loop discarded the wildcard return value. Mirror the
root-immutable handling: warn and replace wholesale.
Existing tests for grow and same-length nested overlay still pass;
the shrink and root-wildcard cases get explicit regression tests.
Link the three remaining known-broken behaviours from FIXME tests to
the tracking issues filed for them (#8, #9, #10).
Assisted-By: Claude <[email protected]>
Signed-off-by: Aleksei Sviridkin <[email protected]>1 parent 3dffc2e commit a815790
2 files changed
Lines changed: 101 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
| 143 | + | |
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| |||
278 | 278 | | |
279 | 279 | | |
280 | 280 | | |
281 | | - | |
282 | | - | |
283 | | - | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
284 | 286 | | |
285 | 287 | | |
286 | 288 | | |
| |||
290 | 292 | | |
291 | 293 | | |
292 | 294 | | |
293 | | - | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
294 | 330 | | |
295 | 331 | | |
296 | 332 | | |
| |||
338 | 374 | | |
339 | 375 | | |
340 | 376 | | |
341 | | - | |
| 377 | + | |
342 | 378 | | |
343 | 379 | | |
344 | 380 | | |
| |||
353 | 389 | | |
354 | 390 | | |
355 | 391 | | |
356 | | - | |
| 392 | + | |
357 | 393 | | |
358 | 394 | | |
359 | 395 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
91 | 102 | | |
92 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
93 | 118 | | |
94 | 119 | | |
95 | 120 | | |
96 | 121 | | |
97 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
98 | 156 | | |
99 | 157 | | |
100 | 158 | | |
| |||
0 commit comments