Repository navigation
fix(capacity): drop hardcoded cap of 10 in set_max_parallel_tasks - #4567
Merged
Merged
Conversation
The router validates against the fleet ceiling (Abilityai#506) but the DB layer still rejected values above 10, so PUT /capacity returned 500 for 11..ceiling. Fixes Abilityai#4564 Signed-off-by: Alex Castillo <alex.castillog33@gmail.com>
…ound # Conflicts: # tests/registry.json
Contributor
|
merge-train (2026-11-17): on the train as is. Validated at |
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.
Fixes #4564
Description
PUT /api/agents/{name}/capacityreturned 500 ("Failed to update capacity") for any value from 11 up to the admin-set fleet ceiling. #506 moved the router's upper bound to the ceiling, butset_max_parallel_tasksindb/agent_settings/resources.pystill returnedFalseformax_tasks > 10, which the router turns into a 500.The DB layer now keeps only the lower bound (
< 1); the router remains the single place that validates against the ceiling. The router is the only caller.Related Issue
Fixes #4564
Journey Impact
Journey Impact: none: bug fix in capacity validation; no journey promise changes
Type of Change
Testing
New:
tests/unit/test_4564_capacity_db_bound.py(registered intests/registry.json): 16 is stored and read back, 1 and 10 still work, 0 and negatives are still rejected, an unknown agent returns False.test_506_max_parallel_ceiling.pystill passes; the full suite was not run. Before the changetest_value_above_old_cap_is_storedfails (set_max_parallel_tasks("agent-1", 16)returns False).Checklist
This PR was prepared with AI assistance (Claude Code).