Port allocation/distribution engine #32
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Rebuild the phased income-distribution engine as a tested service.
/api/.../projections/preview) returning the computed distribution.Exit: engine reproduces today's behaviour; covered by unit + functional tests.
Done. Phased allocation engine + stateless preview endpoint shipped. 170 tests green, PHPStan clean, Pint clean, 100% line coverage on all new classes. Pre-commit (code-reviewer) + finish-phase (pr-reviewer full-diff) reviews both passed.
Delivered:
App\Service\Allocationengine cluster:AllocateIncome(single-use Action),BucketRoomCalculator,EvenSplitter,Result.POST /api/scenarios/{scenario}/projections/preview— stateless preview via an API Platform Processor (PreviewProcessor) + separate input/output DTOs (ProjectionPreviewInput/ProjectionPreviewOutput). First DTO#[ApiResource]+ first State class in the project.BucketRepository::findByScenarioOrderedByPriority.Conscious divergence from the "reproduces today's behaviour" exit criterion: #32 deliberately became a redesign, not a faithful port of the v0.2.0
PipelineAllocationService. Differences from the old engine are intentional, not regressions:getCurrentBalancecollapses tostartingAmount— no Draw/Inflow/Outflow ledger entities in #32 (stateless preview only; the persistedapplypath is a later ticket).unallocated(was0).Deferred / follow-up:
remaining_capacityis intentionally alwaysnull(real per-bucket capacity math is a later ticket — anemic Bucket has nogetEffectiveCapacity).DistributionModeenum + column are now obsolete (even-split is intrinsic within tiers) — cleanup deferred to its own ticket.