Repository navigation
test: reproduce routine scheduling and prescription loss - #2558
Draft
pellinendanAgents wants to merge 1 commit into
Draft
pellinendanAgents wants to merge 1 commit into
pellinendanAgents wants to merge 1 commit into
Conversation
This branch has not been deployed
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.
Proposed Changes
Four failing tests reproduce constraint violations in generated routine schedules and prescription representations. This is a findings-only draft: no fixes, expected-failure markers, dependency changes, or production changes are included.
f7af925d0690bac12dc229d30a6cd0281a34224ffit_in_week=True, end 2026-11-08test_weekly_cycle_wrapping_on_monday_does_not_skip_a_weekRiRConfig(value=0)andMaxRiRConfig(value=2)at iteration 1rir=0,max_rir=2rir=0,max_rir=nulltest_generated_json_preserves_rir_range_starting_at_zerorir=08 Reps @ 0 RiR8 Repstest_text_preserves_explicit_zero_rirsets=1,max_sets=3, eight repetitions1-3 Sets, 8 Reps8 Repstest_text_preserves_set_range_starting_at_oneThe scheduling case uses supported dates and no log-gated advancement. The RiR case creates fresh slot/config rows; the text cases use
SimpleTestCaseand require no database. The numeric JSON prescription already loses the RiR upper bound before text formatting.Related Issue(s)
No linked issue. These tests are the reproductions for the findings above.
Reproduction and scope
uv sync --group dev uv run python manage.py test wger.manager.tests.test_generated_prescription_constraints --settings=settings.ci --noinputResult: 4 tests, 4 assertion failures, 0 execution errors on macOS arm64, Python 3.13.11, Django 6.0.9. All 387 existing
wger.manager.teststests pass when this new module is excluded. The new file passesruff checkandruff format --check. The existing missing-node_modulesstatic-files warning does not prevent either run.These are wger-specific boundary cases extending the scheduling and prescription-preservation themes of a 146-case workout-generator corpus. The original scorer is specific to another application's API and cannot be run unchanged against wger. A separate applicability pass executed 21 adapted scheduling/repeatability checks successfully and marked 125 cases inapplicable. The four failures above are additional boundary cases, not failures of those 21 checks. Equipment/injury selection, baseball-specific load limits, history-based exercise selection, and the original JSON/text-file/Flask routes are not claimed as wger features or defects. That external harness and its passing checks are not part of this PR.
Please check that the PR fulfills these requirements
ruff formatandruff checkon the new file)CHANGELOG.md— not applicable to this tests-only report