fix(acms): align budget allocation formula and protocol signatures with spec #1140
No reviewers
Labels
No labels
auto/needs-reevaluation
controller-managed
auto/blocked-by-deps
auto/ci-timeout
auto/claimed-implementer
auto/claimed-merge
auto/claimed-reviewer
auto/driver-down
auto/invariant-violation
auto/last-attempt-tier-0
auto/last-attempt-tier-1
auto/last-attempt-tier-2
auto/last-attempt-tier-min
Automation Tracking
auto/needs-conflict-resolution
auto/needs-implementer
auto/postmortem
auto/ready-to-merge
auto/restart-throttled
auto/revert
auto/sentinel
auto/stale-inactivity
auto/unstable
Blocked
Bounty
$100
Bounty
$1000
Bounty
$10000
Bounty
$20
Bounty
$2000
Bounty
$250
Bounty
$50
Bounty
$500
Bounty
$5000
Bounty
$750
MoSCoW
Could have
MoSCoW
Must have
MoSCoW
Should have
Needs Feedback
Points
1
Points
13
Points
2
Points
21
Points
3
Points
34
Points
5
Points
55
Points
8
Points
88
Priority
Backlog
Priority
CI Blocker
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Signed-off: Owner
Signed-off: Scrum Master
Signed-off: Tech Lead
Spike
State
Completed
State
Duplicate
State
In Progress
State
In Review
State
Paused
State
Unverified
State
Verified
State
Wont Do
Type
Automation
Type
Bug
Type
Discussion
Type
Documentation
Type
Epic
Type
Feature
Type
Legendary
Type
Refactor
Type
Support
Type
Task
Type
Testing
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
cleveragents/cleveragents-core!1140
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/acms-budget-allocation-spec-alignment"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Aligns the ACMS pipeline protocol signatures and budget allocation formula with
docs/specification.md§42630-42937, addressing four spec/implementation mismatches:BudgetAllocator.allocate()signature — Added optionalrequest: ContextRequestparameter perBudgetAllocatorProtocolspec (§44754-44766), enabling future request-aware allocation (e.g., different allocation for strategize vs execute views).Allocation formula — Changed from proportional to
confidencealone to proportional toconfidence * quality_scoreper spec §45003. BothDefaultBudgetAllocatorandProportionalBudgetAllocatoruse the new weighted formula. With defaultquality_score=1.0, behavior is backward-compatible.DetailDepthResolver.resolve()signature — Addedbudget: intparameter perDetailDepthResolverProtocolspec (§44803-44814), enabling future budget-aware depth resolution.Default packer — Changed from no-op
DefaultBudgetPackerto productionGreedyKnapsackPackerper spec §45013.ACMSPipelineuses lazy import to avoid circular dependency;ContextAssemblyPipelineimports directly.Files Changed
Production code (5 files)
src/cleveragents/application/services/acms_service.py— Protocol updates,DefaultBudgetAllocator,DefaultDepthResolver,ACMSPipelinepacker wiring,StrategyCapabilities.quality_scoresrc/cleveragents/application/services/acms_pipeline.py—ProportionalBudgetAllocator,ContextAssemblyPipelinepacker wiring and assemble threadingsrc/cleveragents/application/services/acms_phase2.py—MaxDepthResolver.resolve()budget parametersrc/cleveragents/application/services/fusion_engine.py—FusionEngine.fuse()resolve call updatedsrc/cleveragents/application/services/strategy_coordinator.py—coordinate()allocate call updatedTest code (5 files)
features/acms_pipeline.feature— Adjusted test data relevance scores for 4 scenarios affected by GreedyKnapsackPacker orderingfeatures/acms_pipeline_orchestrator.feature— Adjusted 1 scenario test datafeatures/steps/acms_pipeline_steps.py— Updated_HalvingAllocatormock signature, addedContextRequestimportfeatures/steps/acms_service_coverage_boost_steps.py— Explicitquality_scoreon mock strategyrobot/helper_acms_pipeline.py— Adjusted tiered test data relevance scoresQuality Gates
nox -s lintnox -s typechecknox -s unit_testsnox -s integration_testsnox -s coverage_reportCloses #924
Review: APPROVED
Clean spec-alignment change. Budget allocation now uses
confidence * quality_scoreper spec §42689/§42918. Both allocators updated consistently with a shared_weighted_score()static method. Protocol signatures updated with backward-compatible defaults. BDD feature files and Robot helpers updated to reflect new weighted ordering. Notype: ignoreadditions. No concerns.bd081c8ac8cf53e785f2cf53e785f2e858e20ea9e858e20ea9bc7822b166bc7822b16635b5ef99fb35b5ef99fb42a32c2709