Commit 7f6fcf8
committed
LEGLINK-958: Normalization never deletes the correlation key
Replace the ResourceCachePurgeScope enum with a single ownership rule:
Normalization deletes only its own input, the {correlationId}:{ResourceType}
acquisition keys. The {correlationId} key belongs to its reader - Measure
Eval deletes it after evaluation (keepCacheForSupplemental aside), and the
cache expiration policy reclaims keys whose message never got published.
Scope.All on the immediate dead-letter path was unsafe for SUPPLEMENTAL
messages: DataAcquisition reuses the correlationId across phases, so after
a reportable INITIAL pass the key holds kept, unrebuildable INITIAL data.
A malformed SUPPLEMENTAL message would have destroyed it and turned the
eventual evaluation into a silent false not-reportable. Its safety also
rested on a comment-enforced invariant (DeadLetterException is only thrown
before the produce) that no compiler or test could defend.
Removing the option instead of gating it deletes the enum, the scope
parameter, the correlation-id derivation, and the invariant comments.
The retry-exhausted path behaves exactly as before; the dead-letter path
now leaves {correlationId} to its owner.
Claude-Session: https://claude.ai/code/session_01KN565tFAuJUAEkK2DdRF1e1 parent ad9a7b9 commit 7f6fcf8
6 files changed
Lines changed: 29 additions & 129 deletions
File tree
- DotNet
- Normalization
- Application
- Error
- Services
- Listeners
- ServiceTests/UnitTests/Normalization
Lines changed: 1 addition & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | 83 | | |
90 | 84 | | |
91 | 85 | | |
92 | | - | |
| 86 | + | |
93 | 87 | | |
94 | 88 | | |
95 | 89 | | |
| |||
Lines changed: 13 additions & 54 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | 7 | | |
32 | 8 | | |
33 | 9 | | |
| |||
37 | 13 | | |
38 | 14 | | |
39 | 15 | | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
44 | 23 | | |
45 | 24 | | |
46 | 25 | | |
47 | 26 | | |
48 | | - | |
| 27 | + | |
49 | 28 | | |
50 | 29 | | |
51 | 30 | | |
| |||
60 | 39 | | |
61 | 40 | | |
62 | 41 | | |
63 | | - | |
| 42 | + | |
64 | 43 | | |
65 | 44 | | |
66 | 45 | | |
| |||
73 | 52 | | |
74 | 53 | | |
75 | 54 | | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | 55 | | |
90 | 56 | | |
91 | 57 | | |
92 | 58 | | |
93 | | - | |
| 59 | + | |
94 | 60 | | |
95 | 61 | | |
96 | 62 | | |
97 | | - | |
| 63 | + | |
98 | 64 | | |
99 | 65 | | |
100 | | - | |
| 66 | + | |
101 | 67 | | |
102 | 68 | | |
103 | 69 | | |
| |||
107 | 73 | | |
108 | 74 | | |
109 | 75 | | |
110 | | - | |
| 76 | + | |
111 | 77 | | |
112 | 78 | | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | 79 | | |
Lines changed: 3 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | | - | |
194 | | - | |
195 | | - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
196 | 191 | | |
197 | 192 | | |
198 | 193 | | |
199 | | - | |
200 | 194 | | |
201 | 195 | | |
202 | 196 | | |
| |||
Lines changed: 9 additions & 49 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
19 | 22 | | |
20 | 23 | | |
21 | 24 | | |
| |||
24 | 27 | | |
25 | 28 | | |
26 | 29 | | |
27 | | - | |
| 30 | + | |
28 | 31 | | |
29 | 32 | | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | 33 | | |
54 | 34 | | |
55 | 35 | | |
| |||
66 | 46 | | |
67 | 47 | | |
68 | 48 | | |
69 | | - | |
| 49 | + | |
70 | 50 | | |
71 | 51 | | |
72 | 52 | | |
73 | 53 | | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | 54 | | |
95 | 55 | | |
96 | 56 | | |
| |||
104 | 64 | | |
105 | 65 | | |
106 | 66 | | |
107 | | - | |
| 67 | + | |
108 | 68 | | |
109 | 69 | | |
110 | 70 | | |
| |||
116 | 76 | | |
117 | 77 | | |
118 | 78 | | |
119 | | - | |
| 79 | + | |
120 | 80 | | |
121 | 81 | | |
122 | 82 | | |
| |||
131 | 91 | | |
132 | 92 | | |
133 | 93 | | |
134 | | - | |
| 94 | + | |
135 | 95 | | |
136 | 96 | | |
137 | 97 | | |
| |||
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | | - | |
49 | 47 | | |
50 | | - | |
| 48 | + | |
51 | 49 | | |
52 | 50 | | |
53 | 51 | | |
| |||
Lines changed: 2 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
44 | 43 | | |
45 | | - | |
46 | | - | |
| 44 | + | |
| 45 | + | |
47 | 46 | | |
48 | 47 | | |
49 | 48 | | |
| |||
52 | 51 | | |
53 | 52 | | |
54 | 53 | | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | 54 | | |
60 | 55 | | |
61 | 56 | | |
| |||
0 commit comments