Commit 61e00a0
committed
feat(gsdc2023): divergence-gated acceptance for the 2-stage residual re-solve
Adds fgo_two_stage_divergence_p95_m (BridgeConfig, default 0 = disabled) and
CLI --fgo-two-stage-divergence-p95-m. When > 0, the 2-stage re-solve only fires
on chunks whose pass-1 fixed-linearization residual p95 (over active rows)
exceeds the threshold — i.e. only chunks where pass-1 diverged. Healthy chunks
are left at the pass-1 result, so the re-solve introduces no perturbation there.
Motivation: a per-chunk diagnostic probe across win / wash / regression trips
showed the unconditional re-solve's only net win (lax-o) is split into two parts:
a divergence rescue on a couple of chunks where pass-1 blew up to multi-km
residuals (pass-1 p95 ~39 km), and pervasive marginal NLOS masking on healthy
chunks (p95 ~30 m). Every regression trip (lax-t/mtv-b/mtv-pe1 +10..11 cm) does
only the marginal masking on a healthy fit (p95 <= ~50 m). The two are
indistinguishable by the marginal residuals themselves, but the divergence
chunks stand alone by orders of magnitude (pass-1 p95 38840 m vs <= 53 m
everywhere else, position move 16908 m vs <= 3 m).
Gating on pass-1 divergence (p95 > 500 m) cleanly captures the rescue and skips
the marginal masking. An 8-trip A/B (div500 vs baseline) confirms: every +10 cm
regression goes bit-identical to baseline, and lax-o keeps -9.3 cm (the
divergence-rescue portion of its -54.6 cm unconditional win). The marginal-mask
bulk of lax-o's win is inseparable from the regressions, so the gated lever is a
clean zero-regression rescue (1 win / 0 reg / 7 wash) rather than the larger but
net-wash unconditional lever.
The Huber guard cannot do this (the rescue raises the robust cost: lax-o
cost_ratio 1.32), so divergence gating is the correct discriminator. Default off
keeps legacy behaviour; independent of the guard flag. 2 new unit tests.1 parent eda5106 commit 61e00a0
4 files changed
Lines changed: 88 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
358 | 358 | | |
359 | 359 | | |
360 | 360 | | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
361 | 364 | | |
362 | 365 | | |
363 | 366 | | |
| |||
619 | 622 | | |
620 | 623 | | |
621 | 624 | | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
622 | 631 | | |
623 | 632 | | |
624 | 633 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
298 | 307 | | |
299 | 308 | | |
300 | 309 | | |
| |||
412 | 421 | | |
413 | 422 | | |
414 | 423 | | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
415 | 427 | | |
416 | 428 | | |
417 | 429 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2324 | 2324 | | |
2325 | 2325 | | |
2326 | 2326 | | |
| 2327 | + | |
2327 | 2328 | | |
2328 | 2329 | | |
2329 | 2330 | | |
2330 | 2331 | | |
2331 | 2332 | | |
2332 | 2333 | | |
| 2334 | + | |
| 2335 | + | |
| 2336 | + | |
| 2337 | + | |
| 2338 | + | |
| 2339 | + | |
| 2340 | + | |
| 2341 | + | |
| 2342 | + | |
| 2343 | + | |
| 2344 | + | |
2333 | 2345 | | |
2334 | 2346 | | |
2335 | 2347 | | |
2336 | 2348 | | |
2337 | 2349 | | |
2338 | 2350 | | |
2339 | 2351 | | |
2340 | | - | |
| 2352 | + | |
2341 | 2353 | | |
2342 | 2354 | | |
2343 | 2355 | | |
2344 | | - | |
2345 | | - | |
| 2356 | + | |
| 2357 | + | |
2346 | 2358 | | |
2347 | 2359 | | |
2348 | 2360 | | |
| |||
2356 | 2368 | | |
2357 | 2369 | | |
2358 | 2370 | | |
| 2371 | + | |
| 2372 | + | |
| 2373 | + | |
| 2374 | + | |
| 2375 | + | |
| 2376 | + | |
| 2377 | + | |
| 2378 | + | |
2359 | 2379 | | |
2360 | 2380 | | |
2361 | 2381 | | |
| |||
2687 | 2707 | | |
2688 | 2708 | | |
2689 | 2709 | | |
| 2710 | + | |
2690 | 2711 | | |
2691 | 2712 | | |
2692 | 2713 | | |
| |||
3251 | 3272 | | |
3252 | 3273 | | |
3253 | 3274 | | |
| 3275 | + | |
3254 | 3276 | | |
3255 | 3277 | | |
3256 | 3278 | | |
| |||
3708 | 3730 | | |
3709 | 3731 | | |
3710 | 3732 | | |
| 3733 | + | |
| 3734 | + | |
| 3735 | + | |
3711 | 3736 | | |
3712 | 3737 | | |
3713 | 3738 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
193 | 232 | | |
194 | 233 | | |
195 | 234 | | |
| |||
0 commit comments