Commit 951d430
committed
fix(observability-map): credit a thrown ternary that classifies the error
catch (e) { throw e instanceof Response ? e : new ServerError(e); } read as
inert, while the same clause written with return passed. The walk set rethrows
and cut the path before the shared branch check ran, so the throw arm of that
condition was unreachable and a thrown conditional was never offered to
selectsAnErrorPath. That contradicted the CatchEvidence.branches contract in
types.ts, which names return and throw alike.
The check now runs in the throw arm, before the path is cut, through the same
selectsAnErrorPath predicate the return path uses. The same-arms rule comes
with it, so throw e instanceof Error ? e : e is refused for the reason
return x ? A : A is, and the asymmetry closes without a new laundering surface.
The shared check below narrows to return statements, since the throw case is
handled above.
wrap-body-in-same-arms-throw-ternary is the tree-scale guard, the A/B partner
of wrap-body-in-rethrow with the ternary as the only difference. Weakening the
arms test takes the tree from 19 to 44 and raises 224 routes, and the entry
fails; with the rule in place it reaches 391 files and 924 sites, raises none.
No published figure moves. The whole JSON report over apps/webapp/app/routes is
byte-identical before and after, global 19, measured 412, per-entry diffs 0,
because no route in the tree writes a thrown ternary.1 parent cff46a7 commit 951d430
3 files changed
Lines changed: 81 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
502 | 502 | | |
503 | 503 | | |
504 | 504 | | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
505 | 517 | | |
506 | 518 | | |
507 | 519 | | |
| |||
869 | 881 | | |
870 | 882 | | |
871 | 883 | | |
| 884 | + | |
872 | 885 | | |
873 | 886 | | |
874 | 887 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1974 | 1974 | | |
1975 | 1975 | | |
1976 | 1976 | | |
| 1977 | + | |
| 1978 | + | |
| 1979 | + | |
| 1980 | + | |
| 1981 | + | |
| 1982 | + | |
| 1983 | + | |
| 1984 | + | |
| 1985 | + | |
| 1986 | + | |
| 1987 | + | |
| 1988 | + | |
| 1989 | + | |
| 1990 | + | |
| 1991 | + | |
| 1992 | + | |
| 1993 | + | |
| 1994 | + | |
| 1995 | + | |
| 1996 | + | |
| 1997 | + | |
| 1998 | + | |
| 1999 | + | |
| 2000 | + | |
| 2001 | + | |
| 2002 | + | |
| 2003 | + | |
| 2004 | + | |
| 2005 | + | |
| 2006 | + | |
| 2007 | + | |
| 2008 | + | |
| 2009 | + | |
| 2010 | + | |
| 2011 | + | |
| 2012 | + | |
| 2013 | + | |
| 2014 | + | |
| 2015 | + | |
| 2016 | + | |
| 2017 | + | |
| 2018 | + | |
| 2019 | + | |
| 2020 | + | |
| 2021 | + | |
| 2022 | + | |
| 2023 | + | |
| 2024 | + | |
| 2025 | + | |
| 2026 | + | |
| 2027 | + | |
| 2028 | + | |
1977 | 2029 | | |
1978 | 2030 | | |
1979 | 2031 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
455 | 455 | | |
456 | 456 | | |
457 | 457 | | |
458 | | - | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
459 | 461 | | |
460 | 462 | | |
461 | 463 | | |
| |||
628 | 630 | | |
629 | 631 | | |
630 | 632 | | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
631 | 645 | | |
632 | 646 | | |
633 | 647 | | |
| |||
656 | 670 | | |
657 | 671 | | |
658 | 672 | | |
659 | | - | |
660 | | - | |
661 | | - | |
662 | | - | |
| 673 | + | |
663 | 674 | | |
664 | 675 | | |
665 | 676 | | |
| |||
0 commit comments