Pin the group-affinity invariants GH-3792 relies on, and simulate a version bump with slow starts - #3804
Merged
Conversation
…ersion bump with slow starts Follow-up test coverage for GH-3792 (blue/green group affinity), all four verified to fail against the pre-3792 implementation: - a_settled_blue_green_split_does_not_churn_on_the_next_evaluation: the settled split state is a fixed point of the placement. GH-3785 counted ~45,000 ReassignAgent decisions during a rollout ramp, and the partition incumbent rule (members[0].AssignedNode, all members on one node) is subtle enough to regress silently. - a_rolling_restart_keeps_every_database_on_at_most_two_hosts: pins the invariant that makes the strict partition key (exact declaring node-id set) safe to keep or later relax -- overlapping-but-unequal capability sets still cost no third pool set. - asymmetric_fleets_strand_nothing_and_load_every_capable_node: the per-node ceiling is computed over ALL nodes including incapable ones, so a brand-new green fleet that declares only the bumped agents is where the arithmetic would break first. - a_version_bump_converges_with_slow_starts_and_no_cross_fleet_placement: the GH-3753 deploy shape end to end. GH-3753 is not slow starts in general -- production converges without a version bump -- it is slow starts AND a capability split at once, and until now each condition was covered by tests that passed while their intersection failed. Drives the real leader evaluation with DistributeByGroupAffinity, a blue leader whose family cannot enumerate the green agents, long-tailed start costs, and asserts convergence, zero cross-fleet placement, zero churn, and the two-hosts-per-database pool bound throughout. Harness seams, added without touching existing behavior: FakeAgentFamily takes explicit agent names and an overridable Distribution; SlowStartCluster takes a leader family and per-node capability sets, deriving the agent universe from the capability union exactly as NodeAgentController seeds the real grid. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0116vfBcKwcjWn8msM4ZjkuA
This was referenced Aug 4, 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.
Immediate follow-up to #3792, adding the regression coverage identified while reviewing it. Relates to #3753, #3779, #3785.
Four new tests, each verified red against the pre-#3792 implementation
Three placement pins in
distribute_by_group_affinity:ReassignAgentdecisions in six minutes during a rollout ramp; the partition incumbent rule (members[0].AssignedNode, all-members-on-one-node) is subtle enough to regress silently, and churn here means agent restarts at 512-database scale.One end-to-end sim in
slow_agent_start_convergence— the #3753 deploy shape:#3753 is not about slow starts in general (production converges fine without a version bump). It is slow starts and a blue/green capability split at the same time — and until #3792 those two conditions were each covered by tests that passed while their intersection failed. The existing sim ran homogeneous capabilities through
DistributeEvenly; this variant drives the realNodeAgentController.EvaluateAssignmentsAsyncwith:DistributeByGroupAffinity, asEventSubscriptionAgentFamilyuses for a multi-database storeand asserts convergence in bounded rounds, zero cross-fleet placement at any point during the wave, zero stops/reassignments/double-starts, and the two-hosts-per-database pool bound holding throughout.
Harness seams (no existing behavior changed)
FakeAgentFamily: constructor over explicit agent names (names may carry path segments to model grouped, versioned agents), and an overridableDistribution.SlowStartCluster: overload taking the leader's family + per-node capability sets, deriving the agent universe from the capability union the same wayNodeAgentControllerseeds the real grid.Verification
AssignmentGrid.Distribution.csswapped in; pass with it.dotnet build wolverine.slnx -c Release: clean.🤖 Generated with Claude Code
https://claude.ai/code/session_0116vfBcKwcjWn8msM4ZjkuA