<feed xmlns='http://www.w3.org/2005/Atom'>
<title>soryu/makima/migrations/20260201000000_supervisor_heartbeats.sql, branch contract-drag-reorder</title>
<subtitle>soryu-co/soryu mirror</subtitle>
<id>http://src.eirin.xyz/soryu/atom?h=contract-drag-reorder</id>
<link rel='self' href='http://src.eirin.xyz/soryu/atom?h=contract-drag-reorder'/>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/'/>
<updated>2026-02-01T00:25:43+00:00</updated>
<entry>
<title>feat: Implement Phase 3 Tasks 3.1 and 3.2 - SupervisorState enum and Heartbeat Infrastructure</title>
<updated>2026-02-01T00:25:43+00:00</updated>
<author>
<name>soryu</name>
<email>soryu@soryu.co</email>
</author>
<published>2026-02-01T00:20:55+00:00</published>
<link rel='alternate' type='text/html' href='http://src.eirin.xyz/soryu/commit/?id=bb14010db99b40792372bfcb4348cf4984f30b3f'/>
<id>urn:sha1:bb14010db99b40792372bfcb4348cf4984f30b3f</id>
<content type='text'>
Task 3.1: Enhanced Supervisor State Enum
- Add SupervisorStateEnum with states: Initializing, Idle, Working, WaitingForUser,
  WaitingForTasks, Blocked, Completed, Failed, Interrupted
- Implement Display, FromStr, Default, and serde serialization
- Add SupervisorHeartbeatRecord and SupervisorHeartbeatRequest structs

Task 3.2: Heartbeat Infrastructure
- Create supervisor_heartbeats migration with proper indexes and constraints
- Add heartbeat storage functions to repository.rs:
  - create_supervisor_heartbeat
  - get_latest_supervisor_heartbeat
  - get_supervisor_heartbeats
  - get_contract_supervisor_heartbeats
  - cleanup_old_heartbeats (24 hour TTL support)
  - find_stale_supervisors (for dead supervisor detection)
- Add SupervisorHeartbeat message to protocol.rs with enhanced fields
- Update mesh_daemon.rs to process and store supervisor heartbeats
- Add unit tests for SupervisorStateEnum and heartbeat serialization

Co-Authored-By: Claude Opus 4.5 &lt;noreply@anthropic.com&gt;
</content>
</entry>
</feed>
