Move issues (01–29) and PRD from .scratch/distributed-inference-network/ into docs/issues/ and docs/. Update ralph_progress.py DEFAULT_PRD path and rewrite docs/agents/issue-tracker.md to reflect the new layout. The distributed_inference_network.egg-info/docs/ mirror is a build artifact already covered by *.egg-info/ in .gitignore — not committed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1.1 KiB
1.1 KiB
US-023 — Heartbeat stats payload: request counters + dynamic reassignment response
Status: done Priority: Medium Stage: Implemented
Context
Node heartbeats are currently empty POSTs. The tracker has no visibility into per-node load, making load balancing and assignment decisions blind. Heartbeats should carry cumulative stats. The heartbeat response channel is also the natural place for the tracker to deliver reassignment instructions without requiring a node restart.
Acceptance criteria
- Heartbeat POST body includes:
total_requests,failed_requests,queue_depth,uptime_seconds,status TorchNodeServertracks the three counters with athreading.Lock- Tracker stores the last heartbeat payload per node
- Heartbeat response may include
new_assignment: {model, shard_start, shard_end}; node logs it - Stats survive tracker outage: buffered locally, flushed on next successful heartbeat
python -m pytestpasses
Notes
Hot-reload (loading a new shard without restart) is deferred to a future story. The response field is wired so trackers can send the signal; nodes log it but don't act yet.