test(core): use disposable session fixtures - #45745
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Three Session test boundaries manually reproduce the async-disposal protocol already implemented by
Effect.acquireDisposable. The prompt image case additionally bypasses the shared temporary-directory fixture, losing its canonical path and busy-directory cleanup behavior.What Changes
Effect.acquireDisposablefor the twosession-createacquisitions and the replay acquisition insession-message-update.fixture/tmpdirhelper instead of directmkdtemp/rm.Scope
This completes the still-unowned TESTS-03 occurrences. #45637 owns the same cleanup in move, remove, revert, and view tests, with no file overlap. #45680 touches the active-session assertion in
session-prompt.test.ts, not this image fixture.Open same-file PRs have no behavioral dependency: #45735 adds a
session-createcase that calls the existingwithTmpboundary; #45336 adds a latersession-message-updatecase; neither changes these acquisitions. #45575 changes other prompt fixtures and its import hunk adds newmkdtempusers, so whichever PR lands second must reconcile that import block while preserving both independent fixture changes.Verification
The focused suites passed 90 tests with 271 assertions. Core typecheck, structural scan, whitespace checks, and the normal pre-push 33-package workspace typecheck passed. Oxlint reported no errors and six existing warnings. Prettier accepts every changed line but its full-file check still flags an unrelated pre-existing multiline expression in
session-prompt.test.ts; that formatter-only change was deliberately excluded from this PR.