Commit 1a507ff
committed
fix(operator-trend): floor rererestore persistence magnitude (T3-2 phase 5)
The rererestore persistence builder decremented per-event `magnitude` without the
`max(0.0, ..)` floor its rebuild sibling applies. `magnitude` is per-event evidence
strength (non-negative by concept; `sign` carries the direction), so an
over-penalized confirmation event went negative and -- after `sign` -- counted
against its own side, producing a spurious clearance-leaning persistence_score.
Floor the 4 decrements to match rebuild. On the same structural input the two tiers
now agree (persistence_score 0.31 == 0.31, was 0.31 vs 0.24), and the rerererestore
wrapper that delegates to it no longer yields a spurious negative (-0.08 -> 0.09).
The phase-4 composer golden caught this exactly: the regenerated golden diff is 3
score lines, and the anchor test flips from pinning the divergence to pinning the
convergence (test_magnitude_floor_unifies_rebuild_and_rererestore_tiers). No
existing test pinned the buggy value -- the negative-magnitude path was
uncharacterized, which is why the bug survived.1 parent 2371338 commit 1a507ff
4 files changed
Lines changed: 42 additions & 39 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5773 | 5773 | | |
5774 | 5774 | | |
5775 | 5775 | | |
5776 | | - | |
| 5776 | + | |
5777 | 5777 | | |
5778 | | - | |
| 5778 | + | |
5779 | 5779 | | |
5780 | | - | |
| 5780 | + | |
5781 | 5781 | | |
5782 | 5782 | | |
5783 | 5783 | | |
5784 | 5784 | | |
5785 | 5785 | | |
5786 | 5786 | | |
5787 | 5787 | | |
5788 | | - | |
| 5788 | + | |
5789 | 5789 | | |
5790 | 5790 | | |
5791 | 5791 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
637 | 637 | | |
638 | 638 | | |
639 | 639 | | |
640 | | - | |
| 640 | + | |
641 | 641 | | |
642 | 642 | | |
643 | 643 | | |
| |||
894 | 894 | | |
895 | 895 | | |
896 | 896 | | |
897 | | - | |
| 897 | + | |
898 | 898 | | |
899 | 899 | | |
900 | 900 | | |
| |||
929 | 929 | | |
930 | 930 | | |
931 | 931 | | |
932 | | - | |
| 932 | + | |
933 | 933 | | |
934 | 934 | | |
935 | 935 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
28 | 31 | | |
29 | 32 | | |
30 | 33 | | |
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
35 | | - | |
| 38 | + | |
36 | 39 | | |
37 | 40 | | |
38 | 41 | | |
| |||
373 | 376 | | |
374 | 377 | | |
375 | 378 | | |
376 | | - | |
377 | | - | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
378 | 382 | | |
379 | 383 | | |
380 | 384 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
104 | 103 | | |
105 | 104 | | |
106 | | - | |
| 105 | + | |
0 commit comments