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
Give each TestBuilder row one cleanup owner instead of hand-threaded event ownership #7379
TestBuilder still passes class-row cleanup ownership between fetches, temporary instances and executable tests by hand. Introduce an explicit cleanup owner so each row has one clear hand-off and cleanup happens once, including rows that never become executable tests.
The prerequisites have shipped: #7381 delivers per-row builder-context events, #7327 removes the unused streaming builder, #7373 isolates discarded method-row lifecycle subscriptions, and #7383 preserves session ownership of scopes lent to temporary instances. Preserve those behaviors while replacing the remaining manual cleanup hand-offs in UnclaimedClassRow.
Proposal
Use a small row-cleanup owner with one claim and idempotent asynchronous release. Pass it with the row and release unclaimed owners in finally. Keep method and class rows' cleanup separate so discarded method subscriptions cannot become constructor subscriptions. Cleanup for a rejected method row must use that row's state. Keep temporary-instance constructor scopes alive until session end when later method rows still borrow them.
Acceptance criteria
An explicit owner replaces manual event take/return/lend hand-offs, with exactly-once cleanup on success, incompatible rows and discovery failures.
Class-row subscriptions survive reuse; discarded method-row subscriptions do not reach subsequent tests' lifecycle events.
Release cleanup when an empty method source produces no test and does not request a skipped placeholder.
Preserve per-test retry lifetimes and the session lifetime of scopes lent to temporary instances.
Validate relevant _7205 and _7210 regressions in source-generated and reflection modes; add focused cleanup ownership tests.
Triage: replaced the broad #7205 dependency with #7381, keeping #7327. Updated the proposal to match replacement PR #7384 rather than the abandoned #7328 helpers and tests. Session-lifetime behavior remains a coordination requirement with #7383, not a reason to block on the entire parent.
Activity
thomhurst commentedon Nov 2, 2026
Triage: replaced the broad #7205 dependency with #7381, keeping #7327. Updated the proposal to match replacement PR #7384 rather than the abandoned #7328 helpers and tests. Session-lifetime behavior remains a coordination requirement with #7383, not a reason to block on the entire parent.
Keep cleanup-only row contexts out of class tests (#7379)
Preserve class row identity for cleanup failures (#7379)
Give TestBuilder rows explicit cleanup owners (#7637)