Commit 3a51d4e
authored
fix(operator-trend): use any() for rererestore freshness signal flag (T3-2 phase 5b) (#81)
The rererestore freshness builder computed `has_fresh_aligned_recent_evidence` as
`freshness_status == "fresh" and aligned_recent_event_count >= 2` -- a count
threshold plus a global-freshness gate. Every one of its sibling freshness
builders (reset_reentry, reset_reentry_rebuild, reacquisition, rebuild_reentry,
rebuild_reentry_restore, rebuild_reentry_restore_rerestore) uses an `any(...)`
existential over the first two recent events instead. rererestore was the lone
outlier, and the flag is load-bearing (gates churn_status / persistence decisions
across 49 read sites).
Convert it to the sibling `any(...)` form over rererestore's own aligned predicate
and drop the now-dead aligned_recent_event_count sum(). The flag now fires on any
recent aligned event like its siblings (previously required both of the first two
AND overall freshness == "fresh").
Caught and pinned by the phase-4 composer golden: a 3-line diff (the flag flips
false -> true in 3 scenarios). No existing test pinned the old value -- the path
was uncharacterized, which is why the drift survived. Full suite 2539 passed,
ruff + mypy clean.1 parent f3d4aaf commit 3a51d4e
2 files changed
Lines changed: 10 additions & 18 deletions
File tree
- src
- tests/golden
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4671 | 4671 | | |
4672 | 4672 | | |
4673 | 4673 | | |
4674 | | - | |
4675 | | - | |
4676 | | - | |
4677 | | - | |
4678 | | - | |
4679 | | - | |
4680 | | - | |
4681 | | - | |
4682 | | - | |
4683 | | - | |
4684 | | - | |
4685 | | - | |
4686 | | - | |
4687 | 4674 | | |
4688 | 4675 | | |
4689 | 4676 | | |
| |||
4714 | 4701 | | |
4715 | 4702 | | |
4716 | 4703 | | |
4717 | | - | |
4718 | | - | |
| 4704 | + | |
| 4705 | + | |
| 4706 | + | |
| 4707 | + | |
| 4708 | + | |
| 4709 | + | |
| 4710 | + | |
4719 | 4711 | | |
4720 | 4712 | | |
4721 | 4713 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
723 | 723 | | |
724 | 724 | | |
725 | 725 | | |
726 | | - | |
| 726 | + | |
727 | 727 | | |
728 | 728 | | |
729 | 729 | | |
| |||
759 | 759 | | |
760 | 760 | | |
761 | 761 | | |
762 | | - | |
| 762 | + | |
763 | 763 | | |
764 | 764 | | |
765 | 765 | | |
| |||
768 | 768 | | |
769 | 769 | | |
770 | 770 | | |
771 | | - | |
| 771 | + | |
772 | 772 | | |
773 | 773 | | |
774 | 774 | | |
| |||
0 commit comments