Skip to content

feat: test isolation verification and resource leak detection #4904

@thomhurst

Description

@thomhurst

Description

Object lifecycle is managed via ObjectLifecycleService, but there's no verification that resources are properly cleaned up between tests — no leak detection for unclosed connections, unregistered event handlers, or open file handles.

Proposed Approach

  • Create IResourceLeakDetector monitoring unmanaged handle counts, open file handles, active subscriptions
  • Implement ResourceSnapshot before/after each test
  • Add --detect-leaks command-line option
  • Create [RequireCleanup] attribute for verification
  • Generate resource leak reports

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions