fix(gate): no admission lock in a tree without .mam; MAM_UPDATE_MONITOR_STOP_S in the knob table (Issue #72)
mam_update_admit created .mam/ to hold its lock, so a checkout running its own run_loop.sh got a .mam (test_loop_marker_isolation L1, test_issue17 W1). A tree without .mam is not an installed workspace, the only kind the update runs in, so the gate admits there without a lock. The update's monitor-stop wait is a normalised integer knob and is listed in INT_KNOBS (test_issue26_ints B5). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8f325de979
commit
595e34b2d1
2 files changed
+8
-2
No files matched your search
@@ -3264,11 +3264,15 @@ mam_control_plane_prefix() {
|
||||
# fd 7 (`7>&-` on such a child, as pane_lock's fd 9). The wait is bounded by
|
||||
# MAM_UPDATE_ADMISSION_WAIT_S (default 120).
|
||||
#
|
||||
# mam_update_admit [workspace]: rc 0 admitted (fd 7 held), 1 refused (stderr).
|
||||
# mam_update_admit [workspace]: rc 0 admitted (fd 7 held, unless the workspace
|
||||
# has no .mam), 1 refused (stderr).
|
||||
mam_update_admit() {
|
||||
local root="${1:-$WORKSPACE_ROOT}"
|
||||
local lock="$root/.mam/update-admission.lock" marker="$root/.mam/update-in-progress" st
|
||||
if ! { mkdir -p "$root/.mam" && exec 7>>"$lock"; }; then
|
||||
# No .mam: not an installed workspace, which is all the update runs in (and a
|
||||
# checkout running its own scripts gets no .mam from this).
|
||||
[ -d "$root/.mam" ] || return 0
|
||||
if ! exec 7>>"$lock"; then
|
||||
echo "ERROR: cannot open the update admission lock $lock" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
@@ -59,6 +59,8 @@ INT_KNOBS = {
|
||||
# once) and the wrapper's registry wait (0: decide at once - clear or busy)
|
||||
"MAM_ONBOARD_WAIT_S": (1, "600"),
|
||||
"MAM_DISPATCH_WAIT_S": (0, "600"),
|
||||
# Issue #72: how long the update waits for the monitor to stop after SIGTERM
|
||||
"MAM_UPDATE_MONITOR_STOP_S": (1, "30"),
|
||||
# delegate_wait_started's ack_s (MAM_ONBOARD_ACK_S / DELEGATE_JOB_ACK_S via create_session.sh)
|
||||
"delegate_wait_started:ack_s": (0, "180"),
|
||||
# wrapper flags
|
||||
|
||||
Reference in new issue
Block a user