📋 Declarative Rule Engine
The Fill solver now ships a full declarative rule engine. Counter rules, sequence rules, rest rules, and shift patterns are all enforced together and can each be tuned independently through the top-levelweights object.New MAX_CONSECUTIVE_DAYS rule type
A new rule type bounds the longest run of consecutive working days directly. Pair it with a COUNTER constraint and a max: the solver finds the longest consecutive-day streak and penalizes anything above the limit.HOURS_WORKED, DAYS_WORKED, DAYS_IDLE, WEEKENDS_WORKED, WEEKENDS_IDLE, SHIFT_TYPES_WORKED, SHIFT_TYPES_HOURS_WORKED, and MAX_CONSECUTIVE_DAYS.Per-rule-type weights
Every rule family now has its own weight, so you can decide exactly how hard the solver pushes on each one. Set them under the request’s top-levelweights object, using the <weight><priority> format where priority is hard, medium, or soft.- Counter
- Sequence
- Rest
- Pattern
Weights for
COUNTER rules — how strongly to respect counts over a period.Conditional rules and rolling windows
Rules can chain withthen to trigger a follow-up rule when a threshold is crossed, and a period.duration turns any rule into a sliding window.🛡️ Employee Reference Validation
Requests that reference an employee that does not exist — in a shift’semployees list or its blocklist — are now validated up front instead of failing deep inside the solver. This produces clearer errors and prevents silent mis-assignments (PRD-1247).💶 Wage Costs Scoring Fix
The Wage Costs constraint could produce a negative match weight in some configurations, distorting the soft score. Match weights are now clamped so wage-based optimization behaves as expected (PRD-1243).🎚️ Control Solve Time with millis
The solve endpoint accepts a new millis query parameter to cap how long the solver runs, giving you direct control over the latency/quality trade-off.🔢 max Drives Shift Assignment Count
The number of assignments generated for a shift is now taken from the shift max field, falling back to the deprecated value field when max is absent.value continues to work for backward compatibility but is deprecated. Use min and max to express an exact staffing range.✅ Additional API Changes
- Optional rule period —
periodon a period rule is now optional and defaults to the entire planning horizon when omitted. - Input hardening — null-byte sanitization and string-list validation were added across Fill request fields, including
preference,employees, andblocklist.
🎉 Fill API v2
Fill API v2 is a ground-up redesign of shift filling: assign employees to shifts while respecting skills, availability, labor rules, and preferences.Endpoints
GET /v2/fill/jobs/{id}/status, .../solution, and .../explanation.Core capabilities
- Matching
- Labor rules
- Fairness
- Multi-level skill matching (required skills as hard constraints, proficiency levels, soft-skill preferences)
- Time-based availability windows and day-of-week restrictions
- Locked (pre-assigned) and blocked employee–shift pairs
Migrating from v1
Several v1 fields were renamed or replaced for consistency and flexibility.| Deprecated | Replacement |
|---|---|
contracts | rules |
blacklist | blocklist |
shift value | shift min / max |
Fill Migration Guide
Full list of breaking changes and new features when moving to v2