Commit Graph
4 Commits
Author SHA1 Message Date
overseer 77fdd2531c Address PR #143 review (CHANGES_REQUIRED)
P2.1: Point test_presence.py ISO-week scan at core.presence (the real
model since task 510c1f78); the integration's presence.py is now a
re-export shim, so scanning it was vacuous.

P2.2: Add direct core-builder unit tests to test_events.py — exact
payload key sets for completed/uncompleted/day-complete events,
was_on_time threading (True/False/None), event ordering (completed
fires before day-complete on the bus), and the four day-complete
outcomes (zero-quest day, non-today instance, partial day,
fully-cleared today). Add a shim timezone test that sets
hass.config.time_zone to a zone whose local date differs from UTC and
asserts the day-complete rule uses that local date.

P3.1: Split build_quest_completed_events into
build_quest_completed_event (single event, no day-complete state) and
build_child_day_complete_event (separate, returns the day-complete
event or None). The shim fires nestquest_quest_completed BEFORE it
reads the HA-local today and evaluates the day-complete rule,
restoring the pre-extraction ordering so a failure in the day-complete
DB reads or the ZoneInfo lookup cannot suppress the completed event.
Payloads and the day-complete rule are identical.

P3.2: test_startup_db.py glob -> rglob so core/ is scanned by the
'never unlinks or truncates DB files' guardrail (non-recursive glob
skipped the extracted core package).

P3.3: RELEASE_NOTES.md notes the children and admin_allowlist loggers
moved to .core.children / .core.admin_allowlist (parent logger still
catches them).

P3.4: Refresh the stale test_core_isolation.py docstring to cover the
whole core package (storage-layer task d0b691d8 + engines/business-
layer task 510c1f78).

uv run pytest -q = 1507 passed (baseline 1497 + 10 new).
2026-09-21 15:04:05 -04:00
dev_agent 1503774e85 Extract the storage layer into core/ (bundled in the integration)
Extract the storage layer into core/ (bundled in the integration)
2026-09-21 14:48:01 -04:00
Joshua King c988f6508b Rename task_* tables to quest_* with legacy-dev migration path (D-007)
Per design/IMPLEMENTATION-ORDER.md 1.1 and decision D-007: the domain
model takes the quest vocabulary pre-release. SCHEMA_V1 now creates
quest_definitions/quest_instances directly; DAO classes, records and
error messages follow (QuestDefinitionsDao, QuestInstancesDao). The
migration runner gains migration 2, an async-callable step that detects
surviving task_* tables on dev machines and ALTER TABLE RENAMES them
inside the migration transaction, with FK clauses rewritten by SQLite.
Migration 1's content rewrite is legal because nothing was ever
shipped; dev databases stamped version 1 ride migration 2 up to 2.
2026-09-15 09:35:21 -04:00
orchestrator-agent 3e2860b2f1 Sync dev with main (release-merge backport) (#36) 2026-09-14 15:19:28 -04:00