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:
openhands 2026-03-23 21:46:59 +00:00
parent e041b20823
commit e535ed776f
10 changed files with 47 additions and 1 deletions

View file

@ -24,6 +24,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/predictor.log"
# shellcheck disable=SC2034 # consumed by run_formula_and_monitor
@ -38,6 +40,7 @@ SCRATCH_FILE="/tmp/predictor-${PROJECT_NAME}-scratch.md"
log() { echo "[$(date -u +%Y-%m-%dT%H:%M:%S)Z] $*" >> "$LOG_FILE"; }
# ── Guards ────────────────────────────────────────────────────────────────
check_active predictor
acquire_cron_lock "/tmp/predictor-run.lock"
check_memory 2000