diff --git a/.agents/skills/lib.sh b/.agents/skills/lib.sh index a5c4933..c65686a 100644 --- a/.agents/skills/lib.sh +++ b/.agents/skills/lib.sh @@ -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 diff --git a/tests/test_issue26_ints.py b/tests/test_issue26_ints.py index 703bf3d..b613a3f 100644 --- a/tests/test_issue26_ints.py +++ b/tests/test_issue26_ints.py @@ -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