Skip to content

Bug/restore full weekends - #200

Merged
Vhivi merged 7 commits into
mainfrom
bug/restore-full-weekends
May 25, 2026
Merged

Vhivi merged 7 commits into
mainfrom
bug/restore-full-weekends

Conversation

@Vhivi

@Vhivi Vhivi commented May 25, 2026

Copy link
Copy Markdown
Owner

Objective

Enforce a minimum number of full free weekends per planning horizon and make backend tests deterministic with the new solver constraint.

Breaking Change Notice

No API change.
This update adds a stricter hard solver constraint and can make some previously feasible schedules infeasible when min_free_weekends_per_horizon is too high for the selected horizon.

Scope

  • Add hard constraint enforce_min_free_weekends_per_horizon to solver hard constraints.
  • Wire solver.min_free_weekends_per_horizon through solver context/engine.
  • Keep weekend logic consistent by removing redundant weekend-balancing soft objective coupling.
  • Add targeted tests for the new behavior:
    • feasible case
    • explicit infeasible case
  • Stabilize legacy backend tests by isolating them from local runtime config and setting test-specific solver defaults (min_free_weekends_per_horizon=0 where not under test).
  • Make modularization tests use a deterministic dedicated runtime config.

Validation

  • backend/.venv/Scripts/python.exe -m pytest -q backend/tests -q

Results

  • Backend test suite passes globally: 82/82 (100%).
  • New weekend minimum rule is covered by dedicated tests.
  • Legacy tests no longer depend on local backend/config.json side effects.

Risks and Mitigations

  • Risk: stricter weekend constraint may increase infeasible schedules on short/tight horizons.
  • Mitigation: parameter is configurable; infeasible settings are surfaced clearly; tests now explicitly control solver configuration.

@Vhivi Vhivi added bug Something isn't working backend test labels May 25, 2026
@Vhivi Vhivi added this to the 4 - Tests et optimisation milestone May 25, 2026
@Vhivi Vhivi self-assigned this May 25, 2026
@Vhivi
Vhivi merged commit e81878a into main May 25, 2026
2 checks passed
@Vhivi
Vhivi deleted the bug/restore-full-weekends branch May 25, 2026 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend bug Something isn't working test

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant