Merge branch 'worktree-agent-a47ac6844d7e0f8a9' into dev-loop

This commit is contained in:
Joseph Ferano 2026-09-19 21:06:22 +07:00
commit ec1a5358b1

View File

@ -4665,7 +4665,7 @@ let () =
let gpid =
Unix.create_process_env flan
[| flan; "dev"; "programs/dev-loop.flan"; "-s"; gsock |]
(Array.append (Unix.environment ()) [| "FLAN_DEV_CLIENT_GRACE=0.2" |])
(Array.append (Unix.environment ()) [| "FLAN_DEV_CLIENT_GRACE=0.1" |])
Unix.stdin gfd Unix.stderr
in
Unix.close gfd;
@ -4684,9 +4684,11 @@ let () =
let r = request c "(:op \"describe\")" in
if status r <> "ok" then fail "the orphan-grace daemon: %s" (status r);
(* Still there while a client is holding the socket, which is the half
that keeps an editor left open overnight alive. Three seconds against
a program that is running, so the threshold in force is the longer one
6 × 0.2s and the wait is past it with room to spare; a hold
that keeps an editor left open overnight alive. One second against a
program that is running, so the threshold in force is the longer one
6 × 0.1s = 0.6s, itself three ticks past the accept loop's own 0.2s
poll interval so the number is not fighting the loop's own
granularity and the wait is past it with room to spare; a hold
shorter than that would pass whether or not the clock ran under an
attached client, and would pin nothing.
@ -4695,7 +4697,7 @@ let () =
[Wire.recv] while the accept loop is not cycling at all. This is the
guard for the refactor that serves a connection off the accept path
and turns a structural guarantee back into an arithmetic one. *)
ignore (await ~ms:3000 reaped);
ignore (await ~ms:1000 reaped);
if reaped () then
fail "the daemon ended while a client was still connected to it";
(* The kill, spelled as the kernel spells it: the fd goes away and