ps auto-service: report + math-fix queue watcher
This commit is contained in:
1 parent
807a96693b
commit
53f12f207e
2 files changed
+94
No files matched your search
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
# Queue watcher: launch the engine-math-fixes DSH job once no dsh-run is active
|
||||
# and the retire-planner tree is clean; retries on DSH_QUEUE_BUSY.
|
||||
cd /home/ubuntu/projects/retire-planner || exit 1
|
||||
LOG=/home/ubuntu/projects/retire-planner/dsh-math-fix.log
|
||||
PROMPT='Read /home/ubuntu/projects/.hermes/plans/2026-10-09_engine-math-fixes-fire40.md FIRST — it is the complete spec for the engine math fixes (GIS age-65 floor, OAS clawback only when OAS payable, couple mixed-phase row footnote, FIRE retirement age 40 with fillDefaults guard). Execute it end-to-end including every acceptance check and the deploy. The user pre-approved every step: ask ZERO questions. When done, MATH-FIX-REPORT.md must exist in the workspace root and your FINAL output line must be exactly: MATH_FIX_DONE (or DSH_QUEUE_BUSY if the git tree was dirty at start).'
|
||||
for i in $(seq 1 240); do
|
||||
if pgrep -f "dsh-run" >/dev/null; then sleep 60; continue; fi
|
||||
if ! git diff --quiet || [ -n "$(git status --porcelain --untracked-files=normal | grep -v '^?? ')" ]; then sleep 60; continue; fi
|
||||
echo "[watcher] launching math-fix job (iteration $i)" | tee -a "$LOG"
|
||||
~/.local/bin/dsh-run /home/ubuntu/projects/retire-planner "$PROMPT" >> "$LOG" 2>&1
|
||||
rc=$?
|
||||
if grep -q "DSH_QUEUE_BUSY" "$LOG"; then echo "[watcher] queue busy, retrying" | tee -a "$LOG"; sleep 60; continue; fi
|
||||
echo "[watcher] math-fix job finished rc=$rc" | tee -a "$LOG"
|
||||
exit $rc
|
||||
done
|
||||
echo "[watcher] gave up after 240 minutes" | tee -a "$LOG"; exit 1
|
||||
Reference in new issue
Block a user