From dccc52ae1c94f8f36dfa6572d7f4640a74db7f22 Mon Sep 17 00:00:00 2001 From: acamilo Date: Sat, 26 Sep 2026 01:15:44 +0000 Subject: [PATCH] Document recovery and run its regressions in infra gate --- docs/loop-review.md | 4 +++- infra/tests/lint.sh | 7 +++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/loop-review.md b/docs/loop-review.md index 7540244..9ea2b86 100644 --- a/docs/loop-review.md +++ b/docs/loop-review.md @@ -8,7 +8,9 @@ the project." 1. The release watchdog (`infra/bin/fly-watchdog` check 10) flags a suspected loop: few distinct macros, a short sequence repeating, no growth in places explored. It exports - `fly_loop_suspected` and writes `/run/fly/wd/loop.json`. It never acts. + `fly_loop_suspected` and writes `/run/fly/wd/loop.json`. It never acts. The separate + `fly-loop-recover.timer` can restart only flysim after two fresh suspected probes; + see `infra/docs/loop-recovery.md`. This does not replace checkpoint-based review. 2. The coordinator session (Fable) checks that marker on a schedule. On a flag it pulls the live checkpoint read-only (`pct pull`, into `.local/checkpoints/`, never committed), and spawns a review agent with the trap brief: reproduce from the checkpoint with the real diff --git a/infra/tests/lint.sh b/infra/tests/lint.sh index 4deff06..4da888a 100755 --- a/infra/tests/lint.sh +++ b/infra/tests/lint.sh @@ -1483,6 +1483,13 @@ else echo " mention is genuinely legitimate, add it to infra/tests/de-pii-allow.txt with a reason." >&2 fi +echo "--- loop recovery tests ---" +if python3 -m unittest discover -s "$REPO_ROOT/infra/tests" -p 'test_loop_recover.py' >/dev/null 2>&1; then + pass "loop recovery: fresh probes, cooldown, and router refusal" +else + fail "loop recovery tests failed; run python3 -m unittest discover -s infra/tests -p test_loop_recover.py -v" +fi + echo "===" if [ "$FAILED" -eq 0 ]; then echo "lint.sh: ALL CHECKS PASSED"