proscenium 0.25.0-aarch64-linux → 0.25.1-aarch64-linux

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9ecce0f5e55655dd38615696d91e11cd677738764ab48a8e839306f7d56c017a
4
- data.tar.gz: 3452d2cb7695959d7e9edc764feb1dda9ba3512f52bddbad8f39aaf85228ae65
3
+ metadata.gz: d23908bfb07f9a96c2e0db6bb611fd675a22472d3c2d28167c5cddd9279a5c2d
4
+ data.tar.gz: 3e284c4b24cec6804bb5c3729b8610ced1a44415cdb912bc245692341f1f4f8f
5
5
  SHA512:
6
- metadata.gz: 5b652f1bd328ecab574b46c6566a052f78b9a91e0026fe2d3e28c7c7f7bfc2a34c9d9316f0ed4acdfa6198b266e0d2a9944d90f25c4d138f798d7888b43f39de
7
- data.tar.gz: 93273ba54a3d5bec4630863b973106271d5ba0ab5cf6764cc14218d60ecd599f66578aa63dcfc418b3332633a7c5901a172f1c5a2a6a421042127f5c1300e61e
6
+ metadata.gz: f32120576c31bd621a6cf6408545ccaee2855371e9dafa6559957f5103c764d8d1e1d0087976529e0fd3b1a56dd58afbcb25338d48931c1d8e8b6920551afc4a
7
+ data.tar.gz: f40aa21301ec9da6d37e80bcad44c7c2aa7f47f25d2a6570ebdc1012f0af8b1b39b6797471996ccf0bbca6515d26e05e62cb5cb7aad4fad7fa86754c4f29fdd6
Binary file
@@ -4,7 +4,7 @@
4
4
  // protocol, the spawn, and the failure handling all live here and travel with the gem rather than
5
5
  // being copy-pasted into every app and drifting.
6
6
 
7
- import { mkdtempSync, rmSync } from "node:fs";
7
+ import { mkdirSync, mkdtempSync, rmSync } from "node:fs";
8
8
  import { join } from "node:path";
9
9
 
10
10
  const DEFAULT_TIMEOUT_MS = 30_000;
@@ -101,8 +101,16 @@ class Daemon {
101
101
  * named error with Rails' own stderr already on the terminal.
102
102
  */
103
103
  async function spawnDaemon({ env, timeoutMs }) {
104
- // Not os.tmpdir(): a unix socket path is capped at ~104 bytes, and a sandboxed or CI TMPDIR can
105
- // spend most of that on its own. `/tmp/proscenium-XXXXXX/d.sock` spends 29 of them.
104
+ // A path relative to this process' cwd, not an absolute one. A unix socket path is capped at 104
105
+ // bytes on macOS and 108 on Linux - `sun_path` is a fixed-size array inside `sockaddr_un`, sized
106
+ // to fit a 4.2BSD mbuf and frozen ever since by ABI - and the kernel only ever sees the bytes
107
+ // handed to `bind`/`connect`. So `tmp/proscenium/d-XXXXXX/d.sock` spends 30 of them wherever the
108
+ // app lives, where the absolute equivalent spends 30 plus the app's own path and a CI checkout or
109
+ // a nested monorepo package clears the cap on its own.
110
+ //
111
+ // `Bun.spawn` below is given no `cwd`, so the daemon inherits this one and both ends resolve the
112
+ // same relative path by construction. A `chdir` between here and `connect` would break that, and
113
+ // surfaces as the startup timeout further down.
106
114
  //
107
115
  // The directory is created exclusively and 0700, and the socket lives inside it, because the
108
116
  // name alone is no protection: the full path is passed as `rails runner` argv below, so `ps`
@@ -110,7 +118,8 @@ async function spawnDaemon({ env, timeoutMs }) {
110
118
  // seconds Rails takes to boot, with no way to tell its own child from a squatter. Whoever binds
111
119
  // first answers every `build`, and a `build` reply is JavaScript this process executes. Same
112
120
  // reasoning, and the same fix, as the gem-dir file in the preload template.
113
- const socketDir = mkdtempSync(join("/tmp", "proscenium-"));
121
+ mkdirSync("tmp/proscenium", { recursive: true });
122
+ const socketDir = mkdtempSync(join("tmp", "proscenium", "d-"));
114
123
  // Must match Server::SOCKET_NAME. The daemon is handed the directory, not the path.
115
124
  const socketPath = join(socketDir, "d.sock");
116
125
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Proscenium
4
- VERSION = '0.25.0'
4
+ VERSION = '0.25.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: proscenium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.25.0
4
+ version: 0.25.1
5
5
  platform: aarch64-linux
6
6
  authors:
7
7
  - Joel Moss