Skip to content

test(construction): pin what each scalar construction heuristic assigns - #204

Merged
blackopsrepl merged 1 commit into
mainfrom
feature/203-construction-heuristic-tests
Nov 5, 2026
Merged

blackopsrepl merged 1 commit into
mainfrom
feature/203-construction-heuristic-tests

Conversation

@blackopsrepl

Copy link
Copy Markdown
Collaborator

Closes #203. Base main @ ea589bb0, one test-only commit ff11cd47.

Local: fmt, clippy -D warnings, doc-names file-length facade-reachability public-api deps, workspace all-feature tests: EXIT 0, 1513 passed, 0 failed, 61 result lines.

Mutation checks in runtime_slots/placement.rs, each failing at least one test: canonical entity order for first_fit_decreasing / weakest_fit_decreasing / strongest_fit_decreasing / allocate_entity_from_queue; canonical value order for allocate_to_value_from_queue; weakest and strongest foragers swapped; first fit for cheapest_insertion; live refresh off.

No test solved with first_fit_decreasing, weakest_fit,
weakest_fit_decreasing, strongest_fit, strongest_fit_decreasing,
allocate_entity_from_queue or allocate_to_value_from_queue and checked
the result, so mapping one heuristic to another's entity order, value order
or forager passed every test.

One solve per scalar construction heuristic now asserts its assignment on a
domain where every heuristic's documented order and forager gives a
different result, plus two solves whose order keys change as construction
assigns: one pins the per-step entity re-sort (live refresh), the other the
per-placement value order. Removing each heuristic's entity order, value
order, forager choice or live refresh fails at least one of them.

Closes #203.
@blackopsrepl
blackopsrepl merged commit ff11cd4 into main Nov 5, 2026
12 checks passed
@blackopsrepl
blackopsrepl deleted the feature/203-construction-heuristic-tests branch November 5, 2026 06:07
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.

Scalar construction heuristic types have no behaviour tests

1 participant