S9 OR Tools basic scheduling
All checks were successful
Build, test and publish / verify (push) Successful in 1m48s

This commit is contained in:
2026-10-30 15:00:45 +01:00
parent f64aa9123d
commit 1b4c7f7f2f
43 changed files with 1042 additions and 118 deletions

View File

@@ -0,0 +1 @@
Create a file (or append to it) CODING_STANDARDS.md and have the coding standards in there, for the review skill.

View File

@@ -0,0 +1 @@
Create a file (or append to it) CODING_STANDARDS.md and have the coding standards in there, for the review skill.

View File

@@ -1,6 +1,6 @@
# S9 — Schedule dance groups across show dayparts with OR-Tools
Status: REFINED
Status: IN_REVIEW
Agreed after the grill-me review; shared understanding confirmed.
@@ -121,33 +121,43 @@ S10–S13 are intentionally empty placeholders and are to be refined separately.
## Acceptance criteria
- [ ] Configure up to six dated dayparts, reject duplicate date/type combinations
- [x] Configure up to six dated dayparts, reject duplicate date/type combinations
and derive the displayed show date range from them.
- [ ] Persist editable per-type counts with the agreed defaults, remove the
- [x] Persist editable per-type counts with the agreed defaults, remove the
backend type-level property and validate counts in frontend and backend.
- [ ] With one daypart, every count is one and frontend fields are disabled.
- [ ] Daypart edits preserve configured counts and require correction of counts
- [x] With one daypart, every count is one and frontend fields are disabled.
- [x] Daypart edits preserve configured counts and require correction of counts
that exceed the new number of dayparts.
- [ ] OR-Tools assigns every school group to exactly its type's required number
- [x] OR-Tools assigns every school group to exactly its type's required number
of distinct dayparts and minimizes the busiest/quietest appearance gap.
- [ ] Scheduling requires groups and dayparts and replaces assignments only after
- [x] Scheduling requires groups and dayparts and replaces assignments only after
a successful, current result.
- [ ] The synchronous request supports a 30-minute solver limit, accepts valid
- [x] The synchronous request supports a 30-minute solver limit, accepts valid
unproven results and communicates whether optimality was proven.
- [ ] Failed, infeasible, stale and no-result runs preserve existing assignments
- [x] Failed, infeasible, stale and no-result runs preserve existing assignments
and explain why no replacement was saved.
- [ ] Duplicate concurrent runs for a show are prevented in frontend and backend.
- [ ] Potentially invalidating edits warn beforehand, identify affected shows,
- [x] Duplicate concurrent runs for a show are prevented in frontend and backend.
- [x] Potentially invalidating edits warn beforehand, identify affected shows,
permit cancellation and expose invalid schedules afterward without
automatically rescheduling.
- [ ] New-format JSON round-trips dates, assignments and all type settings;
- [x] New-format JSON round-trips dates, assignments and all type settings;
legacy import support is not required.
- [ ] Any repeatability work respects both the three-minute investigation limit
- [x] Any repeatability work respects both the three-minute investigation limit
and the ten-additional-statement implementation limit.
## Implementation handoff
This specification records agreed behavior; it does not implement scheduling.
This specification records the agreed behavior implemented on the current branch.
The current application uses in-memory storage with JSON import/export for
transfer. S9 adds the scheduling model, frontend controls, backend operation and
JSON changes within that existing persistence approach.
## Implementation validation
- Backend: 29 tests, including real OR-Tools balancing, input validation, JSON
round-trips, concurrent scheduling, stale input rejection and failure preservation.
- Frontend: 20 tests covering count validation, disabled single-daypart fields, edit cancellation,
API timeout contract, production build and lint checks.
- Playwright: real REST workflow for dated dayparts, scheduling and cancellation.
- Repeatability uses one solver-parameter statement (single worker, fixed seed);
no extended investigation was needed.