Repository navigation
fix: search only stock assignments that keep the separations (#420) - #467
Merged
Merged
Conversation
|
📖 3 files modified Preview · build overview · Flahax · built Dec. 3, 2026, 1:36 p.m. UTC |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #467 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 155 155
Lines 18305 18327 +22
Branches 3706 3708 +2
=========================================
+ Hits 18305 18327 +22
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Closes #420
Summary
The candidates that remain come out in the same order, so the chosen layout and the mixture model calls do not change.
tank_groupingkeeps its own search: it orders tanks for the A/B layout, whichplan_stocksmust not do.Behaviour that changes
assignments_evaluatedmax_assignmentsmax_assignments × productsstock_search_limitno_stock_assignmentEvidence
test_separations_do_not_use_up_the_budgetraisedDeliveryError: assignment search budget exhausted.After: it passes.
mainstock_search_limitstock_search_limitstock_search_limitstock_planning.pycover 100% of its statements and branches. The full suite and the strict docs build are left to CI.Remaining limit
The search is still exponential in the worst case. Three mutually separated products placed last, with 27 free products and 2 tanks, still ends in
stock_search_limit, after 3.15 s here (the old code gave up on 29 products in under 1 s). It is not proven infeasible within the budget.Checked against earlier work
Searched open and closed issues and PRs for stock and tank assignment: #230, #298, #307, #308, #391 and #399 set the A/B layout, qualification and
unverifiedreporting; none of those change. No other PR is open. Part of #437.Merge Danger
Door: two-way.
Blast Radius: small.
plan_stocksonly; callers comparingassignments_evaluatedwith earlier saved values will see smaller numbers.