Flow
Two backup plans, same cases
1Lone opener, opener-excluded chore
Both plans give it to the one person.
2Three openers, three opener-excluded chores
The first plan hands all three out. The second hands out none.
3Person already at their shift limit
Neither plan gives them the chore again.
4Every bent assignment
Both plans log the chore and the rule it dropped.
A one-person shift broke my opener rule, and the agent's first patch for it broke the rule for everybody.
My shift scheduler for the stores hands out chores by itself. A chore can say "not the opener" or "not the closer". Those rules used to be absolute. If the only person working was the opener, an opener-excluded chore just stayed blank. That's correct, and no help at all when one person is running the store.
Drop a rule, look again
The agent added a backup plan. If nobody fits the rules, drop the opener rule and look again. Then try dropping the closer rule, then both. Take whoever shows up first.
The trouble showed in its own test. Three people started in the morning, all openers, with three chores that each said "not the opener". The test checked that each of them got one. So every person the owner had ruled out got the work anyway. The rule only held when nobody needed it.
Not a workload question
The way I see it, if dropping a rule leaves one person, there was never a choice. If it leaves two or more, somebody has to pick who breaks the owner's rule, and a scheduler sorting by workload shouldn't be the one picking.
Only on a single candidate
The agent's second version, a few minutes later, keeps the backup plan but changes what counts as an answer.
The backup plan is used only when it leaves exactly one person.
That's the one that stuck. Now the three openers get none of those chores, and a lone opener or lone closer still gets theirs.
What still counts
Only the opener and closer rules ever drop. Shift limits and opt-outs still count. And each time a rule bends, the scheduler logs which chore it was and which rule it dropped.
It's not perfect, and it trusts the scheduler to know who opens and who closes. That same day had several other commits fixing exactly that, so I'd read any surprising line on the printout with those fixes in mind.