From c32c4f47659f87f3d23aed384097aa8ed8aa4036 Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Tue, 29 Sep 2026 10:44:49 -0400 Subject: [PATCH] Set a short TMPDIR on the macOS CI job `TwoCellsTest` flaked on the macOS job. The per-user `TMPDIR` is about 48 bytes, and a `HotCell::TestCell` socket path beneath it reached 105 bytes, over macOS's 104, whenever the test process's pid had five digits. Set `TMPDIR` to `/tmp` on the macOS job, and say in the `TestCell` comment that a macOS suite needs a short `TMPDIR`. [Fix #27] --- .github/workflows/ci.yml | 3 +++ hotcell-server/lib/hot_cell/test_cell.rb | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1afc351..60d6ab4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -78,6 +78,9 @@ jobs: runs-on: macos-latest continue-on-error: true timeout-minutes: 15 + # The per-user TMPDIR leaves a HotCell::TestCell socket path a few bytes from macOS's 104-byte limit. + env: + TMPDIR: /tmp permissions: contents: read steps: diff --git a/hotcell-server/lib/hot_cell/test_cell.rb b/hotcell-server/lib/hot_cell/test_cell.rb index 09baf09..bfb31d8 100644 --- a/hotcell-server/lib/hot_cell/test_cell.rb +++ b/hotcell-server/lib/hot_cell/test_cell.rb @@ -26,6 +26,9 @@ module HotCell # which is the only place such a library may be loaded. # # HotCell::TestCell.boot(operations: -> { require "active_storage/hot_cell/server" }) + # + # The cell's sockets go beneath `Dir.tmpdir`, and a Unix socket path holds 104 bytes on macOS, whose per-user + # `TMPDIR` spends about half of that. A suite on macOS should set a short `TMPDIR`, such as `/tmp`. class TestCell READY = "up"