Skip to content

fix(tests): stop persistence cleanup from throwing on unlinked sockets - #21

Open
Aforno wants to merge 1 commit into
mainfrom
fix/ci-persistence-socket-cleanup
Open

fix(tests): stop persistence cleanup from throwing on unlinked sockets#21
Aforno wants to merge 1 commit into
mainfrom
fix/ci-persistence-socket-cleanup

Conversation

@Aforno

@Aforno Aforno commented Aug 30, 2026

Copy link
Copy Markdown
Owner

Problem

Main CI failed on macos-15 release tests after merging #19:

SessionPersistenceTests.testRuntimeDoesNotPromoteProviderTelemetryForRejectedProtocol threw NSCocoaErrorDomain code 4 (“an-….sock” couldn’t be removed, POSIX ENOENT).

stop() already unlinks the event socket. Fixture teardown then called FileManager.removeItem on that same path. Debug and macos-14 passed; this showed up in the release suite.

Fix

  • Put the test socket inside a short unique directory so bind/cleanup never touch the shared temp directory (and stay under Darwin’s unix-socket path limit).
  • Unlink the socket and lock file directly instead of asking FileManager to delete them.
  • Wait for the socket and for protocolMismatchDetected instead of a fixed 150ms sleep.

Verified locally: swift test, swift test -c release, ./script/check_repository.sh.

FileManager.removeItem on a unix socket whose path stop() already unlinked
failed the macos-15 release suite with NSCocoaErrorDomain code 4.
Copilot AI lite review requested due to automatic review settings August 30, 2026 12:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants