Commit 29062f5
fix(gxt-backend): cap classic-tag reactor fires to break runaway leaks
Diagnostic instrumentation (commit 34f9515) confirmed leaked
classic-tag reactors firing 9,000+ times across unrelated tests when
their self-unsub heuristics don't trip. The runaway saturates the
runloop and produces the testem 1200s browser-timeout that turned
13-minute Basic Test runs into 41-minute hangs.
This commit doesn't fix the leak source — multiple prior attempts
to drain reactors at test boundaries (commits 401df7b, 276a1a4,
6deded4, ef6ce28, all reverted) regressed CI badly because the
leaked reactors are doing load-bearing work for unrelated tests in
some way that hasn't been identified. What this commit does is bound
the cost of the runaway: every reactor self-destructs after firing
10,000 times globally, which is two orders of magnitude above any
plausible real-app bound and far past where a leaked reactor's work
becomes pure overhead. The cap fires inside _fireClassicReactors so
the unsub is synchronous and the reactor leaves _classicReactors
immediately.
Local cumulative reproducer with the cap in place: 9 reactors
reached the 10,000-fire mark and were unsubscribed cleanly. The
browser stays responsive instead of saturating.
Smoke (14 modules / 333 tests) green.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>1 parent 7e9bb9e commit 29062f5
1 file changed
Lines changed: 31 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
701 | 701 | | |
702 | 702 | | |
703 | 703 | | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
| 708 | + | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
704 | 715 | | |
705 | 716 | | |
706 | 717 | | |
707 | 718 | | |
708 | 719 | | |
709 | 720 | | |
710 | 721 | | |
711 | | - | |
712 | | - | |
713 | | - | |
714 | | - | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
715 | 742 | | |
716 | 743 | | |
717 | 744 | | |
| |||
0 commit comments