DAO layer for schedule_rules and task_definitions #19

3 Commits
Author SHA1 Message Date
Joshua King caea163e17 test: race hook pauses after validation passes, before INSERT; assert create must win that ordering
The pause point is now the actual TOCTOU window (validation passed,
INSERT pending): the create-first ordering asserts deleted is False -
the serialized transaction must keep the queued delete from removing
the rule between the create's check and its insert. Tautological or
True assertion removed.
2026-09-14 07:46:34 -04:00
Joshua King 3a7ab12ab2 fix: atomic assignment validation, sentinel-based clearing, strict date validation, race test both orderings
- create/set_assignee validate child+rule inside the same serialized
  transaction as the INSERT/UPDATE (time-of-check/time-of-use race
  closed; inactive child or deleted rule at assignment time raises
  ValueError, never a raw FK error)
- update() methods take an _UNSET sentinel: omitted = leave alone,
  explicit None = write SQL NULL (reopen ended rules, clear metadata)
- rule create/update validate strict YYYY-MM-DD date shape (lexical
  CHECK cannot prove calendar validity)
- delete/create race test now forces both orderings via a validation
  hook; SQL-leak guard no longer exempts dao_children.py
2026-09-14 07:44:28 -04:00
Joshua King 46a0a3445c feat: add typed DAO layer for schedule_rules and task_definitions (#19) 2026-09-14 07:34:42 -04:00