Commit 31617e9
committed
fix(window): hard per-factor gates — wind and cold hours are never recommended
The window's floor is a normalized SUM, so strong factors buy bad ones a
pass: sun and 24C with a 10 m/s blow still scores ~81 — above the floor
and, on a uniformly windy day, above the relative bar too — while the
map is warning "viento fuerte" for that same wind. A clear calm 15C day
passed the same way; the temperature curve only rejects cold when it is
also cloudy.
Each hour now also faces hard gates on the RAW values: wind above
8 m/s (the map's own warning threshold — the window must never recommend
an hour another screen warns about) or temperature below 17C make it
unrecommendable whatever its total, exactly like the existing rain rule.
An unknown value does not condemn the hour; only a measured bad one
does. A day with every hour gated has NO best time — the field goes
null and the interface stays honestly silent, instead of dressing the
least bad hour up as advice.
Gated hours also end a stretch (naming the factor, e.g. arrecia_viento)
and count against it in the motive. Zero extra provider calls.
Tests: uniformly windy sunny day -> null; clear cold day -> null; cold
morning warming into the afternoon -> afternoon recommended with
sube_temperatura as the motive.
Claude-Session: https://claude.ai/code/session_01C4ffvC8qXXWYF9mGemXTvi1 parent 58ae415 commit 31617e9
2 files changed
Lines changed: 61 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
163 | 191 | | |
164 | 192 | | |
165 | 193 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
48 | 63 | | |
49 | 64 | | |
50 | 65 | | |
| |||
79 | 94 | | |
80 | 95 | | |
81 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
82 | 100 | | |
83 | 101 | | |
84 | 102 | | |
| |||
102 | 120 | | |
103 | 121 | | |
104 | 122 | | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
105 | 130 | | |
106 | 131 | | |
107 | 132 | | |
108 | 133 | | |
109 | 134 | | |
110 | 135 | | |
| 136 | + | |
111 | 137 | | |
112 | 138 | | |
113 | 139 | | |
| |||
168 | 194 | | |
169 | 195 | | |
170 | 196 | | |
171 | | - | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
172 | 200 | | |
173 | 201 | | |
174 | 202 | | |
| |||
184 | 212 | | |
185 | 213 | | |
186 | 214 | | |
187 | | - | |
| 215 | + | |
188 | 216 | | |
189 | 217 | | |
190 | 218 | | |
| |||
306 | 334 | | |
307 | 335 | | |
308 | 336 | | |
| 337 | + | |
| 338 | + | |
309 | 339 | | |
310 | | - | |
| 340 | + | |
311 | 341 | | |
312 | 342 | | |
313 | 343 | | |
| |||
0 commit comments