Repository navigation
Commit 12cbaf7
committed
Bridge: source-lifetime tiering for
The bridge half of the WalletWasabi precision win (118 raw -> the real leaks).
The ignored-`.Subscribe()` detector was a flat OWN001 ("always a leak"), but a
self-rooted `this.WhenAnyValue(x => x.SelfProp).Subscribe(...)` is a
GC-collectible self-cycle (the observable, its handler and `this` form one cycle
the GC collects together) -- NOT a leak. Only an EXTERNAL source (EventBus, an
injected model/field) holds the component from a longer-lived root.
Tier the `subscribe` finding by `source`, mirroring the `+=` else branch:
- source == "self" -> dropped in to_module/to_own (silent, no finding)
- source == "injected" -> OWN001 WARNING (unknown lifetime, "may outlive")
- source == "static"/external/unannotated -> OWN001 leak (error, unchanged)
Additive + zero regression: an unannotated `subscribe` (every current fixture)
stays an OWN001 error. The extractor half -- classifying the `.Subscribe()` chain
root and stamping `source` -- is CI-validated next; this engine is what makes the
self-cycles go silent once it does. ownir 77/77, full suite, ruff, mypy --strict.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rg8kSk1YT14x7A1vo5zgEDsubscribe (ignored .Subscribe() result)1 parent feb4e4e commit 12cbaf7
2 files changed
Lines changed: 67 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
41 | 44 | | |
42 | 45 | | |
43 | 46 | | |
| |||
425 | 428 | | |
426 | 429 | | |
427 | 430 | | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
428 | 438 | | |
429 | 439 | | |
430 | 440 | | |
| |||
552 | 562 | | |
553 | 563 | | |
554 | 564 | | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
555 | 571 | | |
556 | 572 | | |
557 | 573 | | |
| |||
932 | 948 | | |
933 | 949 | | |
934 | 950 | | |
935 | | - | |
936 | | - | |
937 | | - | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
938 | 966 | | |
939 | 967 | | |
940 | 968 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
173 | 208 | | |
174 | 209 | | |
175 | 210 | | |
| |||
0 commit comments