The failure path says which socket it was, checked by running it

FLAN_CLANG=/bin/false against test_repl: 'the daemon exited with status
2 before binding /tmp/flan-repl-dev.sock' in 45ms, where the old wording
would have waited out the whole timer and then blamed the socket.
This commit is contained in:
Joseph Ferano 2026-09-13 14:06:46 +07:00
parent cdcdd70c4e
commit 0a6199b8df
4 changed files with 12 additions and 5 deletions

View File

@ -104,8 +104,9 @@ the check took it from 2/8 failures to 0/10, and closed a second race that was b
**The `the daemon never listened` flake is closed at the root, and the root was a cold cache.** The wait is not for
a socket but for an llc-and-link of the whole program before `flan dev` binds, and that build was cold on every
invocation because `Build.cachedir` sat under `$TMPDIR` — which dune makes private per run. The cache now lives under
`$XDG_CACHE_HOME/flan/objcache` (`$FLAN_CACHE_DIR` overrides). Measured on `dev-repl.flan`, launch to bound socket:
**2.0s cold, 0.48s warm**; whole-program `flan build` **1.44s cold, 0.06s warm**; full `dune test` 25.7s/30.1s before
`$XDG_CACHE_HOME/flan/objcache` (`$FLAN_CACHE_DIR` overrides). Measured on an idle machine, and so not comparable
with the 6.5-6.8s this file used to quote, which was a cold build under dune's own parallelism — on `dev-repl.flan`,
launch to bound socket: **2.0s cold, 0.48s warm**; whole-program `flan build` **1.44s cold, 0.06s warm**; full `dune test` 25.7s/30.1s before
against 24.0s after, with user CPU down from ~50s to ~34s — the wall gain is small because the suite is bound by
sequential test steps, not by compiles.

View File

@ -68,7 +68,9 @@ let listening ?(ms = 30000) ~pid path =
Printf.sprintf "exited with status %d before binding %s" n path
| Some (Unix.WSIGNALED n) ->
Printf.sprintf "was killed by signal %d before binding %s" n path
| Some (Unix.WSTOPPED n) -> Printf.sprintf "stopped on signal %d" n
(* Unreachable without WUNTRACED, and here only for exhaustiveness. *)
| Some (Unix.WSTOPPED n) ->
Printf.sprintf "stopped on signal %d without binding %s" n path
| None ->
Printf.sprintf
"was still running after %ds without binding %s, so it was the \

View File

@ -46,7 +46,9 @@ let listening ?(ms = 30000) ~pid path =
Printf.sprintf "exited with status %d before binding %s" n path
| Some (Unix.WSIGNALED n) ->
Printf.sprintf "was killed by signal %d before binding %s" n path
| Some (Unix.WSTOPPED n) -> Printf.sprintf "stopped on signal %d" n
(* Unreachable without WUNTRACED, and here only for exhaustiveness. *)
| Some (Unix.WSTOPPED n) ->
Printf.sprintf "stopped on signal %d without binding %s" n path
| None ->
Printf.sprintf
"was still running after %ds without binding %s, so it was the \

View File

@ -57,7 +57,9 @@ let listening ?(ms = 30000) ~pid path =
Printf.sprintf "exited with status %d before binding %s" n path
| Some (Unix.WSIGNALED n) ->
Printf.sprintf "was killed by signal %d before binding %s" n path
| Some (Unix.WSTOPPED n) -> Printf.sprintf "stopped on signal %d" n
(* Unreachable without WUNTRACED, and here only for exhaustiveness. *)
| Some (Unix.WSTOPPED n) ->
Printf.sprintf "stopped on signal %d without binding %s" n path
| None ->
Printf.sprintf
"was still running after %ds without binding %s, so it was the \