Persist unreported fleet node load honestly - #307
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe PR records fleet node load semantics and adds conformance tests for unreported heartbeat loads, API exposure, provider persistence, finite load reporting, and placement selection. ChangesNode load conformance
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
aa0185a to
747c609
Compare
What changed
node.heartbeat.loadand constrain measured values to[0,1]load_reportedbit for nodes and providers via migration0034load: nullwhen a node-wide load is not fully measuredmax_agents: 0as unlimited across provider aggregatesWhy
Unbounded providers use
max_agents: 0. Existing heartbeats and persistence converted the undefined utilization ratio intoload: 0, so a node with 25 active agents appeared identical to one with 4 and consumers rendered both as confidently idle.loadnow has one definition: managed-agent capacity utilization (active_agents / max_agents), bounded to[0,1]. CPU, memory, queue depth, and dispatch latency are separate metrics. When no finite denominator exists—or any constituent provider is unmeasured—the aggregate load is explicitly unavailable.The migration also keeps old unbounded-provider
load: 0heartbeats unreported during a rolling upgrade, so legacy senders cannot revive the false idle state.Impact
GET /v1/nodesnow returnsload: nullwhen utilization is unavailable. SDK consumers must handle the nullable field. Finite-capacity nodes continue returning a numeric ratio.Companion Relay broker PR: AgentWorkforce/relay#1445
Validation
0034backfill exercised against finite, unbounded, mixed-provider, and direct-node fixturesXCTest