Task d04f5bf3: Remove the HA admin services and permission gate #171

Member

Task: d04f5bf3-7111-40af-aeb1-1b3199a10102 — Remove the HA admin services and permission gate (Feature 18 — HA Integration as API Client).

Done-condition: the HA admin services (uncomplete, create/update/set-active definition, presence pattern/override, export CSV, manage_child, regenerate) and the HA service permission gate are removed; only the panel completion path (nestquest.complete_quest) remains. The four automation blueprints are untouched. The integration's tests pass and no admin service is registered (tests/test_services.py now asserts only complete_quest is registered).

  • Removed: permissions.py (the Feature 09 gate), service_policy.py and core/service_policy.py (SERVICE_POLICY), the regenerate handler plumbing in __init__.py, the dead payload schemas, the removed services' services.yaml entries, and their now-unused service-name constants in core/const.py.
  • Kept: nestquest.complete_quest (panel completion proxy to the shared API client), the admin allowlist modules (setup seeding still uses them), and all core business modules + re-export shims left for the separate DB/module-removal task.
  • Tests: full suite TZ=UTC uv run pytest -q → 1770 passed (baseline 1827; 57 tests removed/updated with the removed surface). test_service_policy.py, test_permissions.py and test_permission_matrix.py deleted with the gate; the uncomplete-path event/entity tests now drive the core completion layer + SSE delivery path the API admin route uses.

Branch head: 403dd736b8

Task: d04f5bf3-7111-40af-aeb1-1b3199a10102 — Remove the HA admin services and permission gate (Feature 18 — HA Integration as API Client). Done-condition: the HA admin services (uncomplete, create/update/set-active definition, presence pattern/override, export CSV, manage_child, regenerate) and the HA service permission gate are removed; only the panel completion path (nestquest.complete_quest) remains. The four automation blueprints are untouched. The integration's tests pass and no admin service is registered (tests/test_services.py now asserts only complete_quest is registered). - Removed: permissions.py (the Feature 09 gate), service_policy.py and core/service_policy.py (SERVICE_POLICY), the regenerate handler plumbing in __init__.py, the dead payload schemas, the removed services' services.yaml entries, and their now-unused service-name constants in core/const.py. - Kept: nestquest.complete_quest (panel completion proxy to the shared API client), the admin allowlist modules (setup seeding still uses them), and all core business modules + re-export shims left for the separate DB/module-removal task. - Tests: full suite TZ=UTC uv run pytest -q → 1770 passed (baseline 1827; 57 tests removed/updated with the removed surface). test_service_policy.py, test_permissions.py and test_permission_matrix.py deleted with the gate; the uncomplete-path event/entity tests now drive the core completion layer + SSE delivery path the API admin route uses. Branch head: 403dd736b82ce2497047ea9fd34af0a1401b322c
dev_agent added 1 commit 2026-09-23 08:22:11 -04:00
Since Feature 18 the integration is a client of the NestQuest API
service and the admin surface is the PWA plus the API's admin routes,
so the integration must not keep HA services for admin operations.
Drop every admin service handler and its registration (uncomplete,
create/update/set-active quest definition, presence pattern and
overrides, CSV export, manage_child, regenerate) together with the
Feature 09 permission gate that existed only for them: permissions.py,
service_policy.py and the core SERVICE_POLICY registry, the
regenerate handler plumbing in __init__, the dead payload schemas and
services.yaml entries, and the service-name constants they alone
used. Only the panel completion path (nestquest.complete_quest)
remains, still proxying to the entry's shared API client. The four
automation blueprints are untouched — they only read sensors and
listen to bus events.
review_agent left a comment
Member

Independent Claude Sonnet 5 review completed for this exact commit.

Independent Claude Sonnet 5 review completed for this exact commit.
dev_agent merged commit 2c4113ed61 into feature/430f7f98-7650-43e9-aa98-4b340303602a-ha-integration-as-api-client 2026-09-23 08:29:02 -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#171