Repository navigation
GH-5163 Unplaced agents carry an UnplacedReason; leader logs agents awaiting capacity - #5176
Merged
Merged
Conversation
…waiting capacity AssignmentGrid.Agent.UnplacedReason (AwaitingCapacity, NoCapableNode, Paused, TakeoverHold) records why the leader left an agent without a node, cleared on placement. The leader logs agents parked for capacity at Information, latched on the count. New optional DurabilitySettings.NodeAcceptThreshold overrides the hard-coded NodeOverloadThreshold - 10 accept line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DCggXgxnG3EBXoR9rrq37U
This was referenced Oct 23, 2026
Merged
Merged
ArieGato
pushed a commit
to ArieGato/wolverine
that referenced
this pull request
Oct 25, 2026
… null-reason gaps Follow-up to JasperFx#5163 / JasperFx#5176, per the CritterWatch comment (JasperFx/CritterWatch#1460). - Document the UnplacedReason member names as a stable contract (CritterWatch persists them by name) and pin them in a test. - Node markers (wolverine://durability-agents-enabled, wolverine://node-role/warmup) are no longer seeded into the leader's grid as agents; they sat there unassigned with a null reason on every cluster. - New UnplacedReason.Superseded for an event subscription agent retired by a tenant-scoping change. - A cluster with no serving node: DistributeEvenly and SingularAgent say NoCapableNode (was AwaitingCapacity and null respectively). Empty-pool early returns in the group affinity and blue/green passes stamp NoCapableNode defensively. - SimulatedCluster asserts after every round that no unassigned agent lacks a reason. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DCggXgxnG3EBXoR9rrq37U
This was referenced Oct 25, 2026
This was referenced Nov 2, 2026
This was referenced Nov 9, 2026
This was referenced Nov 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
UnplacedReasonenum (AwaitingCapacity,NoCapableNode,Paused,TakeoverHold) andAssignmentGrid.Agent.UnplacedReason(nullable). The getter returns null whenever the agent has anAssignedNode, andNode.Assignclears it, so a reason never outlives a placement.AwaitingCapacity: thereceiving.Count == 0early return inDistributeEvenly(the GH-3959 follow-up: capacity shedding drains the cluster to zero when every node is overloaded #4590 park).NoCapableNode: agents with no candidate node inMatchAgentsToCapableNodesFor(blue/green and group affinity), and the no-capable-node return inDistributeEvenlyWithAffinity.Paused:ApplyRestrictionsfor paused agents.TakeoverHold: agents detached by the leader's takeover / cold-start hold.NodeAgentController.ReportAgentsAwaitingCapacitylogs one Information line per evaluation where the count of agents awaiting capacity changes, so a parked steady state is not re-logged every cycle. It includes a sample of up to 5 URIs.DurabilitySettings.NodeAcceptThreshold(double?, default null =NodeOverloadThreshold - 10, same as today).leadership-and-troubleshooting.mdon the new threshold and the reason/log.Why
CritterWatch (JasperFx/CritterWatch#1343) can't tell an agent parked for capacity from one that never started, so its
ProjectionAgentUnassignedremediation is wrong.IWolverineObserver.AssignmentsChanged(grid, ...)now sees the reason ongrid.UnassignedAgents.Tests run locally (net9.0, Release)
unplaced_agents_carry_a_reason_5163: 8/8 passed (grid-level reasons, clearing, log latch, SimulatedCluster end-to-end with a customNodeAcceptThreshold, cold-start hold)CoreTests.Runtime.Agentsnamespace: 540 passed, 6 skipped, 0 failed (546 total)dotnet build src/Testing/CoreTests -c Release -f net9.0: 0 warnings, 0 errorsCloses #5163
🤖 Generated with Claude Code
https://claude.ai/code/session_01DCggXgxnG3EBXoR9rrq37U