Commit 5b95330
authored
fix(review): give shadow overrides the same expired-clear_at handling as live overrides (#10325)
auto-apply.ts's LIVE override read/write pair treats an already-lapsed clear_at as
cleared: loadOverride threads nowIso into rowToOverride, and writeLiveOverride drops
an expired clear_at rather than resurrecting it. The SHADOW pair only ported the
"preserve the column" half of the stale-clear-at fix, not the "drop it once expired"
half: writeShadowOverride had no nowIso param and re-persisted the existing row's
clear_at unconditionally, and loadShadowOverride called rowToOverride with no nowIso.
So a shadow override whose clear_at has lapsed was read back as active, and a stale
shadow tightening could still be promoted to live after its operator-set expiry passed.
Thread an optional nowIso through both, mirroring the live pair exactly:
loadShadowOverride passes nowIso to rowToOverride, and writeShadowOverride computes
clearAt via the same "existing row AND clear_at not expired, else null" rule
writeLiveOverride uses, plus rowToOverride with nowIso on the merge read. Both params
are optional, so every existing caller compiles and behaves exactly as before. The
live pair, the promotion/soak-gate decision logic, and every other behaviour are
unchanged.
Closes #102911 parent b73575f commit 5b95330
2 files changed
Lines changed: 30 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
279 | | - | |
| 279 | + | |
280 | 280 | | |
281 | | - | |
282 | | - | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
283 | 287 | | |
284 | 288 | | |
285 | 289 | | |
| |||
289 | 293 | | |
290 | 294 | | |
291 | 295 | | |
292 | | - | |
| 296 | + | |
293 | 297 | | |
294 | 298 | | |
295 | | - | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
296 | 302 | | |
297 | 303 | | |
298 | 304 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
612 | 612 | | |
613 | 613 | | |
614 | 614 | | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
615 | 634 | | |
616 | 635 | | |
617 | 636 | | |
| |||
0 commit comments