Skip to content

fix: surface unclamped demand in scale signal (#25)#26

Merged
sylvesterdamgaard merged 2 commits into
mainfrom
fix-scale-signal-demand
May 7, 2026
Merged

fix: surface unclamped demand in scale signal (#25)#26
sylvesterdamgaard merged 2 commits into
mainfrom
fix-scale-signal-demand

Conversation

@sylvesterdamgaard
Copy link
Copy Markdown
Contributor

@sylvesterdamgaard sylvesterdamgaard commented May 7, 2026

Summary

  • Added demand field to each workload entry carrying the unclamped per-queue demand (from Phase A), separate from the fair-share-allocated target_workers
  • Changed buildClusterSummary() to sum demand (not target_workers) when computing $requiredWorkers, so the scale-up condition in clusterScaleSignal() can fire when true demand exceeds cluster capacity
  • No changes to FairShareAllocator, clusterScaleSignal, or recommendedHostCount — they already work correctly once fed the right input

Fixes #25

Test plan

  • New test: 4 queues with demand summing to 30, capacity 10 → required_workers reports 30, scale_signal: scale_up, recommended_hosts > 2
  • New test: demand fits within capacity → no false-positive scale_up, recommended_hosts == current_hosts
  • New test: workload entries surface both demand and target_workers with correct values
  • All existing test fixtures updated with demand field
  • Full suite: 565 tests passed (1664 assertions)
  • Larastan: no errors
  • Pint: clean

sylvesterdamgaard and others added 2 commits May 6, 2026 19:38
)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sylvesterdamgaard sylvesterdamgaard merged commit 627d507 into main May 7, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v3.6.0 fairness layer hides true demand from scale_signal — recommended_hosts never increases under backpressure

1 participant