fix: feat: active-state files — per-cron guard with self-off semantics (#622)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
e041b20823
commit
e535ed776f
10 changed files with 47 additions and 1 deletions
|
|
@ -28,6 +28,8 @@ source "$FACTORY_ROOT/lib/env.sh"
|
|||
source "$FACTORY_ROOT/lib/agent-session.sh"
|
||||
# shellcheck source=../lib/formula-session.sh
|
||||
source "$FACTORY_ROOT/lib/formula-session.sh"
|
||||
# shellcheck source=../lib/guard.sh
|
||||
source "$FACTORY_ROOT/lib/guard.sh"
|
||||
|
||||
LOG_FILE="$SCRIPT_DIR/supervisor.log"
|
||||
# shellcheck disable=SC2034 # consumed by run_formula_and_monitor
|
||||
|
|
@ -42,6 +44,7 @@ SCRATCH_FILE="/tmp/supervisor-${PROJECT_NAME}-scratch.md"
|
|||
log() { echo "[$(date -u +%Y-%m-%dT%H:%M:%S)Z] $*" >> "$LOG_FILE"; }
|
||||
|
||||
# ── Guards ────────────────────────────────────────────────────────────────
|
||||
check_active supervisor
|
||||
acquire_cron_lock "/tmp/supervisor-run.lock"
|
||||
check_memory 2000
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue