You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 9f7fd8f
Browse filesBrowse the repository at this point in the historyBrowse files
feat(di): DI002 transitive — singleton weakly holding a transient that drags in a scoped (#64)
Extend DI002 to the transitive case: a singleton holding a WeakReference<T>
whose transient strongly depends on a scoped service. The weak edge enters the
transient, but the scoped it drags in is still root-resolved and app-lived — a
captive one hop below the weak reference, surfaced as a warning with the full
path (WeakReport -> UnitOfWork -> AppDbContext).
find_weak_captive_dependencies now runs the same strong-edge DFS DI001 does,
rooted at each weak dep: a scoped reached directly (WeakReference<Scoped>) or
through a weakly-held transient's strong deps is reported; transients followed,
singleton edges another singleton's own pass, cycles guarded. Core-only — the
extractor already emits weak_deps and the transient's strong deps.
Pinned end-to-end by DiCaptiveSample.cs (WeakReport, exactly-3 DI002 with the
transitive path) and at the graph level by tests/test_ownir.py.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Rg8kSk1YT14x7A1vo5zgED
0 commit comments