feat: monitor agent loop health every 2 hours (#217) #227

Closed
guettlibot wants to merge 2 commits from issue-217-fix into main
guettlibot commented 2026-05-24 16:29:24 +00:00 (Migrated from codeberg.org)

Summary

  • Adds a heartbeat file (~/.sharedinbox-agent-heartbeat) written on every loop run.
  • Adds agent_loop.py monitor subcommand: exits 0 if healthy, exits 1 with WARNING if heartbeat is missing, stale (>2h), or corrupted.
  • Adds .forgejo/workflows/monitor.yml: scheduled every 2 hours; CI failure is the warning.
  • Adds 7 unit tests (66 total, all passing).

Test plan

  • All 66 tests pass
  • monitor exits 0 when recent, 1 when missing/stale/corrupted
  • _run_loop() updates heartbeat on each invocation

Generated with Claude Code

## Summary - Adds a heartbeat file (~/.sharedinbox-agent-heartbeat) written on every loop run. - Adds `agent_loop.py monitor` subcommand: exits 0 if healthy, exits 1 with WARNING if heartbeat is missing, stale (>2h), or corrupted. - Adds .forgejo/workflows/monitor.yml: scheduled every 2 hours; CI failure is the warning. - Adds 7 unit tests (66 total, all passing). ## Test plan - [x] All 66 tests pass - [x] monitor exits 0 when recent, 1 when missing/stale/corrupted - [x] _run_loop() updates heartbeat on each invocation Generated with Claude Code
guettlibot commented 2026-05-26 13:17:49 +00:00 (Migrated from codeberg.org)

The monitor.yml workflow is already in main. This branch is 33 commits behind main, has merge conflicts, and merging it would remove ~2000 lines of newer work. Closing as obsolete.

The monitor.yml workflow is already in main. This branch is 33 commits behind main, has merge conflicts, and merging it would remove ~2000 lines of newer work. Closing as obsolete.

Pull request closed

Please reopen this pull request to perform a merge.
Sign in to join this conversation.