Commit Graph
15 Commits
Author SHA1 Message Date
Joshua King 4163667b07 fix: _is_plain_int on every weekday_set path (from_dict + post-set); shared scan function probes the real guard 2026-09-14 10:53:24 -04:00
Joshua King deb409175a fix: plain-int check pre-coercion everywhere; purity guard scans alias leaf names at any level 2026-09-14 10:51:21 -04:00
Joshua King 6398bd525a fix: pre-coercion weekday entry validation, repr-keyed error sort, exact model names only, relative-import alias scan, strict int typing
- direct list construction validates entries before set() coercion
  (bool collapse and unhashable items both raise RuleValidationError)
- unknown-key error sorts by repr (mixed-type keys never leak TypeError)
- string rule_type accepted ONLY as exact model names: storage aliases
  ('monthly'/'custom'), whitespace padding, and case variants rejected;
  the DAO owns storage-string mapping
- purity guard checks ImportFrom alias names so 'from . import db' is
  caught, not just node.module
- _is_plain_int requires type(value) is int: unhashable int subclasses
  cannot construct
2026-09-14 10:48:11 -04:00
Joshua King 9fd06f40bb fix: address review findings - frozen dataclass, type-exclusive validation, storage mapping, strict from_dict, resolved-module purity guard
- RuleType values are now unique model names with an explicit
  storage_value mapping (monthly_day/monthly_weekday -> 'monthly',
  custom_days -> 'custom'), fixing the enum aliasing collapse where
  two members sharing a value collapsed into one
- to_dict serializes the model name so from_dict(to_dict()) is a true
  lossless round-trip; storage mapping is the DAO's documented job
- real @dataclass(frozen=True); non-string non-enum rule_type rejected
- every type carries ONLY its shape's fields: weekday_set forbidden on
  DAILY/monthly/yearly; day_of_month+nth forbidden on WEEKLY/CUSTOM_DAYS/
  YEARLY; month forbidden on monthly rules (the earlier silent-accept of
  these was the root cause behind the kwargs1 mystery)
- from_dict validates weekday_set entries BEFORE set() coercion ([0,
  False] cannot collapse) and never leaks raw TypeError from unknown-key
  sorting
- purity guard resolves the module by find_spec so relative 'from .db'
  imports are caught
2026-09-14 10:44:59 -04:00
Joshua King d006d0606d feat: add ScheduleRule model with validation and serialization (#25) 2026-09-14 10:34:38 -04:00
dev_agent b854013f1a test: wire pytest test harness with standard hass fixture (#9) 2026-09-13 19:18:10 -04:00
dev_agent c75de71f37 feat: add executor-backed SQLite path resolver helper (#8) 2026-09-13 18:26:23 -04:00
dev_agent e5cda26e11 feat: implement options flow for post-setup settings (#7) 2026-09-13 18:26:09 -04:00
dev_agent 3b9ffa383f feat: implement setup/unload lifecycle with options-reload listener (#5) 2026-09-13 15:02:42 -04:00
dev_agent 78f783cfad docs: point HACS installation at the public GitHub mirror (#6) 2026-09-13 15:01:09 -04:00
dev_agent f787d04a6b feat: implement UI config flow with single-instance enforcement (#4) 2026-09-13 14:52:06 -04:00
Joshua King 5bcaa54934 Merge remote-tracking branch 'origin/feature/58fafd51-67e5-4691-8b37-cf0bb545207c-integration-scaffold' into task/b1a42fd5-1911-4ee5-97ba-d4ab9da9d918-hacs-metadata-and-docs 2026-09-12 09:34:53 -04:00
dev_agent 8d04c95314 feat: define shared constants in const.py (#2) 2026-09-11 16:39:41 -04:00
Joshua King 20fc696f8e docs: add HACS repository metadata and developer setup docs 2026-09-11 09:06:02 -04:00
dev_agent 5c354c1ff5 feat: create custom_components/nestquest package structure and manifest.json (#1) 2026-09-10 16:50:59 -04:00