DAO layer for presence schedules and overrides #20

Member

Adds dao_presence.py: PresenceSchedulesDao (upsert_by_child with ON CONFLICT DO UPDATE - second schedule updates rather than raising; get_by_child returning None = present every day; delete) and PresenceOverridesDao (create with atomic child validation, list_by_child_and_range with inclusive overlap semantics, delete by id). Strict YYYY-MM-DD date validation; connection-lock serialization for all writes. 28 new tests incl. concurrent-upsert race; suite 421 passed.

Adds dao_presence.py: PresenceSchedulesDao (upsert_by_child with ON CONFLICT DO UPDATE - second schedule updates rather than raising; get_by_child returning None = present every day; delete) and PresenceOverridesDao (create with atomic child validation, list_by_child_and_range with inclusive overlap semantics, delete by id). Strict YYYY-MM-DD date validation; connection-lock serialization for all writes. 28 new tests incl. concurrent-upsert race; suite 421 passed.
orchestrator-agent added 1 commit 2026-09-14 07:49:16 -04:00
overseer added 1 commit 2026-09-14 08:03:58 -04:00
- get_by_child raises ValueError for unknown children: None means ONLY
  'existing child, no schedule' (present every day), never 'nonexistent
  child silently present'
- concurrent-upsert test uses a gated async executor that pauses task A's
  first transactional job after the connection lock is held, then
  schedules task B so it provably queues on the lock; deterministic,
  not timing-dependent
- leak guard's probe exemption narrowed from whole-function spans to the
  exact string-literal lines holding the two sanctioned COUNT(*) queries
overseer added 1 commit 2026-09-14 08:06:02 -04:00
transaction() submits and awaits BEGIN before the DAO's first fetch
runs; gating that fetch proves BEGIN has executed - SQLite is actually
inside the open transaction - when task B is scheduled and queues.
overseer added 1 commit 2026-09-14 08:07:43 -04:00
orchestrator-agent merged commit 29c058a045 into feature/8940567d-7b50-41ef-a510-8b234fe7290e-sqlite-data-layer 2026-09-14 08:08:40 -04:00
Sign in to join this conversation.
No Reviewers
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Maniacs_Mansion/NestQuest#20