diff --git a/skills/lib.sh b/skills/lib.sh index b56b404..9341a47 100644 --- a/skills/lib.sh +++ b/skills/lib.sh @@ -193,8 +193,21 @@ env_python() { # The mutation source is passed via env and exec()'d — it is never string # spliced and untrusted data never lands in Python source (P0-B / P1-B). # --------------------------------------------------------------------------- +# Check if the workspace is on NFS — flock is unreliable on NFS +_atomic_dump_yaml_check_nfs() { + local f="$1" + local mountpoint + mountpoint="$(df --output=target "$f" 2>/dev/null | tail -1)" || return 0 + if mount | grep -q "$mountpoint.*nfs\|$mountpoint.*cifs\|$mountpoint.*fuse.sshfs"; then + echo "WARNING: $mountpoint appears to be a network filesystem (NFS/CIFS/SSHFS)." >&2 + echo "WARNING: fcntl.flock-based atomic writes are unreliable on network filesystems." >&2 + echo "WARNING: Consider migrating to SQLite WAL for registry storage (see FUTURE_WORKS.md FW-02)." >&2 + fi +} + atomic_dump_yaml() { local yaml_path="$1"; shift + _atomic_dump_yaml_check_nfs "$yaml_path" local -a envs=("YAML_PATH=$yaml_path" "HOME_DIR=$HOME_DIR" "CLAUDE_PROJECT_DIR=$CLAUDE_PROJECT_DIR" "LOCAL_BIN=$LOCAL_BIN") while [ $# -gt 0 ]; do case "$1" in diff --git a/skills/tmux-agent-orchestrate-delegate-job/requirements.txt b/skills/tmux-agent-orchestrate-delegate-job/requirements.txt index 416b1c1..62c484f 100644 --- a/skills/tmux-agent-orchestrate-delegate-job/requirements.txt +++ b/skills/tmux-agent-orchestrate-delegate-job/requirements.txt @@ -1 +1,2 @@ paho-mqtt>=2.0.0 +pyyaml