Repository navigation
Commit 79186a8
committed
Extractor: classify self-rooted
The extractor half of the WalletWasabi precision win. The ignored-`.Subscribe()`
detector (WPF004) now classifies the chain root and stamps `source`: a self-rooted
`this.WhenAnyValue(p => p.SelfProp).….Subscribe(...)` is a GC-collectible
self-cycle (`source: "self"`, which the bridge drops), while any other root --
an external receiver, `EventBus.Subscribe`, an injected field, or a NESTED path
`p => p.A.B` that roots through `A` -- stays unclassified (`source: null`) and
remains a flagged leak.
`IsSelfRootedWhenAny` is purely syntactic (no SemanticModel): walk the fluent
chain to its leftmost invocation and require `this.WhenAnyValue(p => p.Member)`
with a single-hop self-member lambda. Conservative by design -- it silences only
the unambiguous self-cycle, never an external-source subscription.
Safe on the existing sample: `MessengerViewModel`'s `messenger.Subscribe(OnMessage)`
has a field receiver (not WhenAnyValue) -> `source: null` -> unchanged OWN001. The
bridge tiering that consumes `source` landed in the previous commit; together they
take the WalletWasabi mine's 118 raw findings down to the real (external-source)
leaks. CI-validated (no local dotnet).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rg8kSk1YT14x7A1vo5zgED.Subscribe() chains as source "self"1 parent 12cbaf7 commit 79186a8
1 file changed
Lines changed: 51 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
238 | 285 | | |
239 | 286 | | |
240 | 287 | | |
| |||
912 | 959 | | |
913 | 960 | | |
914 | 961 | | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
915 | 966 | | |
916 | 967 | | |
917 | 968 | | |
| |||
0 commit comments