Restart flysim, then reset to the current rung's milestone, then to the archive below the best rung (never lower), one step per confirmed trap that outlives the previous one. Two resets a day, three-hour restarts once they are spent; the ladder starts over at a new best rung or after six quiet hours. State and history live in the unit's StateDirectory so a reboot does not forget where the ladder stood. A router model list confirms each step; a 'not stuck' answer delays it at most three probes and no answer leaves the watchdog to decide alone. Each step is announced 60 s ahead in /run/fly/wd/recovery-notice.json for the stage's recovery splash. fly-loop-reset is the one new root surface (a sudoers line); 05-deploy now converges config/fly-sudoers so a release can add it.
12 lines
413 B
Desktop File
12 lines
413 B
Desktop File
[Unit]
|
|
Description=Recover confirmed macro loops: flysim restart, then milestone resets
|
|
|
|
[Service]
|
|
Type=oneshot
|
|
User=fly
|
|
EnvironmentFile=-/etc/fly/loop-recovery.env
|
|
# The ladder's state and history outlive a reboot (/run does not).
|
|
StateDirectory=fly-loop-recover
|
|
# A step is a 60 s on-stream countdown, up to 90 s of model calls and 4 min to verify.
|
|
TimeoutStartSec=12min
|
|
ExecStart=/opt/fly/bin/fly-loop-recover
|