Feature 16 — NestQuest API Service (feature → dev)
Standalone FastAPI service that owns the NestQuest database and exposes it to the Home Assistant integration (panel plane) and the admin PWA (admin plane), per docs/ARCHITECTURE.md. This is the Feature 16 integration PR (all required tasks complete).
Delivered
Core extractions (HA-free, bundled in the integration):
core/snapshot.py — shared panel snapshot builder.
core/presence_management.py — presence write layer (the integration's presence services now delegate to it).
core/settings_store.py — DB-backed settings store (meta_state, no schema change) reusing the core validators.
core/history.py — history query + CSV.
core/sweep.py — HA-free missed sweep (the integration sweep is now a thin bus-firing shim).
Panel plane (service token, LAN): GET /api/v1/panel/snapshot, POST /api/v1/panel/instances/{id}/complete (idempotent), GET /api/v1/panel/events (SSE).
Transitions: quest-completed, quest-uncompleted, child-day-complete, quest-missed — payloads built by the core builders; one in-process publisher; a lifespan scheduler runs the missed sweep at the configured rollover time.
Thin adapters only — all business rules live in core/.
Verification
TZ=UTC uv run pytest -q → 1774 passed (feature branch, after merging origin/dev).
TZ=UTC uv run pytest -q orchestration_tests → 14 passed (merged dev tooling).
Every task PR was independently reviewed by Claude Sonnet 5 (high) at its exact head; three required a remediation cycle (JWKS cache hardening, constant-time panel-token comparison, missed-event publish ordering).
Notes
The feature branch incorporates origin/dev (merge commit df58587).
Deferred low-severity nits are recorded on the individual Maestro tasks.
## Feature 16 — NestQuest API Service (feature → dev)
Standalone FastAPI service that owns the NestQuest database and exposes it to the Home Assistant integration (panel plane) and the admin PWA (admin plane), per `docs/ARCHITECTURE.md`. This is the Feature 16 integration PR (all required tasks complete).
### Delivered
**Core extractions (HA-free, bundled in the integration):**
- `core/snapshot.py` — shared panel snapshot builder.
- `core/presence_management.py` — presence write layer (the integration's presence services now delegate to it).
- `core/settings_store.py` — DB-backed settings store (meta_state, no schema change) reusing the core validators.
- `core/history.py` — history query + CSV.
- `core/sweep.py` — HA-free missed sweep (the integration sweep is now a thin bus-firing shim).
**API (`api/`):**
- Skeleton: `/health`, OpenAPI, core wiring (`nestquest_core` loader), config.
- Panel plane (service token, LAN): `GET /api/v1/panel/snapshot`, `POST /api/v1/panel/instances/{id}/complete` (idempotent), `GET /api/v1/panel/events` (SSE).
- Transitions: quest-completed, quest-uncompleted, child-day-complete, quest-missed — payloads built by the core builders; one in-process publisher; a lifespan scheduler runs the missed sweep at the configured rollover time.
- Admin plane (Authentik OIDC JWT + `nestquest-admins`; panel token rejected outright): children CRUD/reorder/active, quest definitions (create/update/active), presence schedule/override, uncomplete + regenerate, history + CSV, settings read/update, missed-sweep trigger.
- Thin adapters only — all business rules live in `core/`.
### Verification
- `TZ=UTC uv run pytest -q` → **1774 passed** (feature branch, after merging `origin/dev`).
- `TZ=UTC uv run pytest -q orchestration_tests` → **14 passed** (merged dev tooling).
- Every task PR was independently reviewed by Claude Sonnet 5 (high) at its exact head; three required a remediation cycle (JWKS cache hardening, constant-time panel-token comparison, missed-event publish ordering).
### Notes
- The feature branch incorporates `origin/dev` (merge commit `df58587`).
- Deferred low-severity nits are recorded on the individual Maestro tasks.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Feature 16 — NestQuest API Service (feature → dev)
Standalone FastAPI service that owns the NestQuest database and exposes it to the Home Assistant integration (panel plane) and the admin PWA (admin plane), per
docs/ARCHITECTURE.md. This is the Feature 16 integration PR (all required tasks complete).Delivered
Core extractions (HA-free, bundled in the integration):
core/snapshot.py— shared panel snapshot builder.core/presence_management.py— presence write layer (the integration's presence services now delegate to it).core/settings_store.py— DB-backed settings store (meta_state, no schema change) reusing the core validators.core/history.py— history query + CSV.core/sweep.py— HA-free missed sweep (the integration sweep is now a thin bus-firing shim).API (
api/):/health, OpenAPI, core wiring (nestquest_coreloader), config.GET /api/v1/panel/snapshot,POST /api/v1/panel/instances/{id}/complete(idempotent),GET /api/v1/panel/events(SSE).nestquest-admins; panel token rejected outright): children CRUD/reorder/active, quest definitions (create/update/active), presence schedule/override, uncomplete + regenerate, history + CSV, settings read/update, missed-sweep trigger.core/.Verification
TZ=UTC uv run pytest -q→ 1774 passed (feature branch, after mergingorigin/dev).TZ=UTC uv run pytest -q orchestration_tests→ 14 passed (merged dev tooling).Notes
origin/dev(merge commitdf58587).Independent Claude Sonnet 5 review completed for this exact commit.