Skip to main content

Canonical technical source, synchronized from the repository at build time. GitHub

Feature 019 — rehearse the exact dated plan

Status: implemented, automatically tested and deployed; desktop EN/HE simulation verified, physical hardware/mobile acceptance pending. Installation never applies a rehearsal or arms a plan.

Functional requirements​

  • RH-FR-001: Rehearse a complete upcoming or saved plan without changing its dates, anchors, settings or execution ledger. Freeze its full bundle/digest into each applied test. Editing the draft invalidates a pending review.
  • RH-FR-002: Alongside the planner, list actual compiled transition moments with localized scenario hints (candle lighting, bathroom daylight break/return, night, morning, meal/hosting, nap/wake). These hints do not invent actions. Distinguish Run this transition from Set up this moment (last known planned state per load); unknown prior states remain untouched. Include candle-lighting anchors even without an event at that exact time.
  • RH-FR-003: Select one or several areas; whole-house selection is explicit, never default. Include shared bathrooms only through separately selected areas; show related-area suggestions. Explicit device checkboxes provide exceptions within selected areas. Scope always names the actual affected targets and exclusions.
  • RH-FR-004: Simulate/review makes no device calls. Apply test now is a separate authenticated, idempotent confirmation against a server-derived review digest and current states. Support only qualified light/switch lighting roles using the existing pilot checks; HVAC/fans/appliances remain visible simulation-only. No arbitrary services or client-provided actions. Supervised rehearsal uses explicit confirmation; same-device automation writers are warnings, not blockers (RH-FR-012). Scheduled execution retains separate qualification and ownership checks.
  • RH-FR-005: Block real rehearsal while Jewish Calendar reports active issur melacha or its mapped signal cannot be resolved reliably. Manual calendar users may simulate; this checkpoint requires a known inactive provider signal for physical tests. Recheck before every dispatch. Never alter existing automations. Reject overlap with armed/running control or another rehearsal. Whole batch is finite; no weekend activation, retries or periodic recovery.
  • RH-FR-006: Capture before-state, source event IDs/time, requested state, dispatch intent/context and confirmation independently. Matching devices receive no call. Persist intent before actuation; unknown/unavailable, changed identity/source, expiry and storage failures block commands. Stop prevents future commands; in-flight calls may finish. Restart interrupts rehearsals and never resumes/replays them automatically.
  • RH-FR-007: Separate Review restore / Apply restore now restores only devices confirmed changed by that rehearsal whose current state/context still match its recorded result and whose original state is known. Changed/uncertain devices are skipped with reasons. Restore is another explicitly scoped, reviewed, recorded batch, never automatic. Do not change the weekend plan.
  • RH-FR-008: Retain private rehearsal history with original plan, scope, outcomes and optional owner feedback. Offer JSON export with before/after evidence and exact plan; distinguish rehearsal from scheduled execution and normal observation. Excluded/unselected devices must never be reported as failed executions.

Nonfunctional requirements​

  • RH-NFR-001: Admin-only bounded strict APIs; native HA service adapter only; explicit entity IDs, maximum 100 selected loads, four concurrent calls, ten-second service timeout, thirty-second confirmation, two-minute review/dispatch limits. Retain up to 20 tests/90 days, refuse pruning active tests. Status lists omit full bundles/ledgers. No new dependency.
  • RH-NFR-002: EN/HE parity, correct directional checkboxes, readable local timestamps/timezone and keyboard controls. Label simulation versus real changes prominently; changing scope/moment invalidates reviewed actions. No physical test during development/deployment.
  • RH-NFR-003: Test projection from real compiled events, setup without unknown-state guesses, independent areas/shared targets, current-state no-ops, forbidden targets, stale review, source/registry drift, active observance, overlap, restart/save failure/stop races, restore after intervention, idempotency and exports on both supported HA versions. Keep fixtures fictional.

Boundaries​

Room-level execution-mode selection for a future weekend remains a separate follow-up; this feature scopes immediate rehearsals only. Rehearsals do not mark native hardware qualified automatically. No dynamic thermostat control or appliance execution is introduced. Existing plan observations continue independently; rehearsal evidence records point transitions rather than pretending to be a full thermal study.

Feature 020 extends the original lighting-only immediate rehearsal boundary to explicitly reviewed HVAC power and room fans with captured/current settings. Scheduled execution and appliance exclusions remain unchanged. See Feature 020 for the superseding preservation contract.

Device selection usability follow-up​

  • RH-FR-009: Review and restore offer explicit Select all eligible devices and Clear device selection within the reviewed area/moment scope. Nothing is selected automatically; blocked targets are never selected by bulk actions. Display selected count.

  • RH-FR-010: Put ineligible devices in a collapsed, counted disclosure, retaining individual exclusion reasons and any capture-settings actions. Eligible targets remain visible.

  • RH-FR-011: Disable Apply until at least one and at most 100 eligible targets are selected and supervision is confirmed. Show the outstanding prerequisite beside Apply. Selection never generates attestations or bypasses backend validation.

  • RH-NFR-004: Bulk selection and exclusions use keyboard-accessible native buttons/disclosure and localized EN/HE status messages; no selection action calls device services. Validation is recomputed on selection and consent, including after request errors.

  • RH-FR-012: Immediate supervised rehearsal and restore require no per-device qualification or automation-attestation forms. Only resolved same-entity writers appear beside a device, as friendly-name warnings; they do not prevent rehearsal. Unrelated and unresolved automation lists must not be repeated or displayed. Show one concise reminder that automations stay active and conflict detection may be incomplete. Record resolved warnings and unresolved-source evidence privately with the run; never invent attestations.

  • RH-NFR-005: Scheduled execution ownership/qualification remains unchanged. Observance, unreadable-source, unavailable-device, identity, stale-review, overlap, settings-preservation and restore guards remain enforced. Resolve literal HA device-action registry IDs to entities; unknown/dynamic targets remain unknown rather than being guessed.