Description
Wave 3 found that SchedulerSettings accepts group interval overrides of zero or less. core/scheduler.py then divides by zero or records negative demand, which can crash startup or conceal an over-budget plan.
Acceptance Criteria
- #1 Configuration rejects every group interval override less than or equal to zero with an actionable validation error
- #2 The interval solver also rejects non-positive programmatic overrides before demand arithmetic
- #3 Tests cover zero, negative, and valid positive overrides
Definition of Done
- #1 just check (ruff format –check, ruff check, mypy, generated-doc drift, offline API conformance, and the marker-filtered pytest run with the 80% coverage floor — this is exactly what the CI
testjob runs) - #2 just gen, when metrics, config, endpoints, collectors, the settings schema or the chart config changed —
just checkincludes the drift gate and CI fails the build on it - #3 Grafana queries in grafana/dashboards/*.json and grafana/alerts/ updated, if a metric or label name changed
Implementation Plan
Add failing configuration and solver tests for zero and negative overrides, then reject non-positive values at both boundaries and run the focused scheduler suite.
Implementation Notes
Failing tests observed ZeroDivisionError for zero and silent negative demand for minus one before the fix. Pydantic now rejects both, and the pure solver fails closed for programmatic callers. Integrated gate: 2827 passed.
Final Summary
Rejected non-positive group interval overrides at configuration and solver boundaries with test-first zero/negative coverage; just check and just ci pass.