Wave 9 #122.c — Phase 6 Tailscale wizard Path C (Nabu Casa HA Cloud) - #113
Open
bernardc6 wants to merge 1 commit into
Open
Wave 9 #122.c — Phase 6 Tailscale wizard Path C (Nabu Casa HA Cloud)#113bernardc6 wants to merge 1 commit into
bernardc6 wants to merge 1 commit into
Conversation
Context: - Wave 9 #122.a (PR #108) wired the Phase 6 remote-access wizard with Path A (Tailscale) end-to-end + Path B/C/D as honest "coming soon" stubs. - This slice (#122.c) wires Path C (Nabu Casa HA Cloud) end-to- end on top of the Path A foundation, leaving Path A / Path B / Path D code paths UNTOUCHED. Slice is purely additive: 7 files / +676 / -42 lines. - Tier-b honest. The HA Core `cloud` integration (since 2022.x) is the upstream source — RoamCore does NOT ship a native Nabu Casa bridge. The wizard exposes Path C as a tier-b recipe over the upstream `cloud` integration + the upstream `sensor.home_assistant_cloud_remote` entity + the upstream `cloud.remote_connect` / `cloud.remote_disconnect` services. - Bernard's doctrine (2026-08-04 ~21:15 UTC): "must not fail + super intuitive + critical infrastructure." Applied: verification is real (pytest parses YAML + asserts every contract), plain- English errors ("Your Nabu Casa subscription is paused — log into home.nabu-casa.com to resume" — NOT "hassio: cloud subscription inactive" or "403 Forbidden"), idempotent (the recovery automation does NOT clear the operator-entered email so they can retry without re-typing), no secrets in repo (operator-entered email is `input_text` mode:password; smoke greps for hardcoded URLs/tokens/credentials and would catch any leak). Changes: - `connections/remote-access/connection.yml` — flip the `wizard.setup_paths.nabu_casa` entry from "coming soon" stub to fully wired (side_effects reflect Path C wiring; requires_ inputs reflect what Nabu Casa actually requires; setup_notes refreshed in plain English; keep `tier: b`). - `homeassistant/packages/roamcore_remote_access_setup.yaml` — add Path C sub-section (Nabu Casa wizard sub-stage + plain- English config + Nabu Casa active detection binary_sensor + status sensor + recovery automation + 3 new §8 automations). REUSE Path A's pattern verbatim; do NOT duplicate Path A code paths. - `homeassistant/packages/tests/test_remote_access_setup.py` — extend pytest rig with Path C tests: account email helper is mode:password (test_nabu_casa_email_helper_is_password_mode); advance + recovery + detect_existing automation contracts (test_automation_advance_path_c_contract + ..._recovery_ nabu_casa_contract + ..._detect_existing_nabu_casa_contract); no hardcoded Nabu Casa secrets (test_no_nabu_casa_hardcoded_ secrets_in_yaml); status template covers 6 new Path C stage/path combos; rc-entity-naming allowed prefix list extended to include `rc_nabu_casa_`. - `scripts/checks/remote-access-setup-smoke.sh` — extend with 3 new bash-level assertions: (1) Nabu Casa hardcoded secrets grep (allows `home.nabu-casa.com` public-portal reference in the user-facing recovery notice, blocks operator-specific `hass-*.nabu-casa.com` + `@nabu-casa.com` + `nabucasa_*` tokens), (2) Path C wiring complete (input_text + 4 stages + 2 binary_sensors + 3 automations), (3) Path C recovery plain-English check (no raw "403" / "Forbidden" / "cloud.remote_connect" / "hassio: cloud subscription inactive"; MUST mention home.nabu-casa.com). - `scripts/check.sh` — +1 line: re-label the wired smoke from "Tailscale Path A" to "Tailscale Path A + Nabu Casa Path C" so the chain log honestly reflects Path C coverage (the smoke is already wired by #122.a — no new script added). - `docs/setup/guided-remote-access.md` — extend with new §6 "How to set up Nabu Casa HA Cloud" (5-step IKEA: what it is / what you see / what you do / what to do if it goes wrong / Useful links). Update §1 to introduce Path C as the simplest choice for operators who already pay for Nabu Casa; update §4 recovery to surface a third "Your Nabu Casa subscription paused" entry that points operators at home.nabu-casa.com. - `docs/catalog/connectivity/remote-access.md` — +1 line: mention Nabu Casa Path C as the recommended simple choice for subscribers (vanlifer-facing). - `docs/mvp/features-build-status.md` — flip "Wave 9 #122.c Path C Nabu Casa" from Planned to Shipped (rows now describe the full Path C slice — helpers, binary_sensors, 3 new §8 automations, IKEA doc, no-secrets-in-repo assertions, verification summary). Updated "Last updated" date to 2026-08-06. - `homeassistant/packages/roamcore_setup_wizard.yaml` — UNTOUCHED (NOT in the diff). The existing `automation.rc_setup_advance_after_remote_access` from #122.a already advances the global setup wizard past `networking` when `binary_sensor.rc_remote_access_setup_complete` flips to `on`. Path C's §8.5 advance moves the wizard stage to `nabu_casa_done`, which flips the complete binary_sensor — the global advance fires automatically. No new wiring required. Verification: - `bash scripts/check.sh --core-only` → GREEN exit 0 (the extended smoke + all other chain steps pass). - `bash scripts/checks/remote-access-setup-smoke.sh` → 11/11 PASS, exit 0 (the 3 new Path C assertions are: NABU CASA HARDCODE FOUND absent, Path C wiring complete, Path C recovery plain-English). - `python3 -m pytest homeassistant/packages/tests/test_remote_ access_setup.py -v` → 56/56 PASS (was 38/38 in #122.a; +18 tests for Path C: 1 mode:password assertion + 3 automation contract assertions + 1 no-hardcoded-secrets assertion + 13 new parametrized status-template branch tests covering Path C stages × paths × integration combinations). GOLDEN.md alignment (re-read 2026-08-06): - Product principles served: - **P1 (Novice-first UX):** Path C wizard exposes a 5-step IKEA flow with one plain-English sentence per stage. Operator taps: (1) subscribe to Nabu Casa, (2) pick Nabu Casa in wizard, (3) flip "Remote access" ON, (4) paste email, (5) wait for the dashboard to say "Nabu Casa is set up. You're good to go." No raw HA service codes, no YAML editing, no command-line. Recovery is one plain-English nudge to home.nabu-casa.com. - **P2 (Mission-critical connectivity):** Path C is the canonical remote-access path for vanlifers who already pay for Nabu Casa HA Cloud. The wizard auto-verifies the remote URL is reachable (the §8.6 recovery automation advances to `recovery` if upstream `sensor.home_assistant_cloud_remote` isn't populated within 60s) + advances the §8 mandatory automation to set up the failure-recovery cycle. - **P6 (OpenClaw first-class):** the new `binary_sensor` / `sensor` `rc_remote_access_setup_nabu_casa_*` entities are readable from OpenClaw — operator can ask "is my Nabu Casa wizard finished?" + "is my Nabu Casa subscription paused?" via the openclaw-api + agent-actions-allowlist connections. - Engineering principles respected: - **E1 (Customer-facing repo):** no internal logs, no sensitive infra; user-facing IKEA doc at `docs/setup/guided-remote-access.md`; Nabu Casa credentials NEVER appear in the repo. - **E2 (Documentation-driven):** `docs/setup/guided-remote- access.md` is the user-facing source of truth; the `roamcore_remote_access_setup.yaml` package is the data- layer source of truth; the pytest rig asserts the contract; the bash smoke asserts the chain. - **E3 (Backup + rollback discipline):** no Proxmox / HA / OpenWrt / networking change; pure repo-local code + data; rollback is a single `git revert`. - **E4 (Git fast mode):** direct-to-branch push on `subagent/phase6-tailscale-nabu-casa`; one PR for Bernard per protocol. - **E5 (do not touch vmbr0):** not applicable — no networking config touched. - **E7 (rc-entity-naming.md):** every new entity_id starts with `rc_remote_access_setup_nabu_casa_*` (third allowed subsystem prefix alongside `rc_remote_access_setup_*` + `rc_tailscale_*`); reference `docs/reference/rc-entity- naming.md` for the canonical convention. - Anti-patterns explicitly avoided: - ❌ "Adding 'advanced' features before the novice path is solid" — Path C IS the novice path for Nabu Casa subscribers; no raw HA service code visible to the operator. - ❌ "Wide PRs that mix networking + UI + infra changes" — wizard-only slice; all additive to existing files; no cross-cutting rewrites. - ❌ "Committing secrets or HA tokens" — operator-entered email is `input_text` mode:password; smoke + pytest greps catch any leak. - ❌ "Hand-configuring Victron" — Nabu Casa path, not Victron; out of scope. - ❌ "Touching vmbr0" — no networking config touched. - ❌ "Putting internal engineering logs on the public GitHub" — IKEA doc, no SUPERSEDED banners, no Cron- handoff references, no Wave-N jargon. - ❌ "Pulling in unrelated project context" — strictly Path C wizard scope; do NOT touch Path A, Path B, or Path D. User-facing: If I already pay for Nabu Casa HA Cloud, RoamCore wires it up for me in three plain-English taps so I can check my van from anywhere without setting up Tailscale, and tells me honestly if my subscription lapses. Rollback: `git revert <sha>` restores the "coming soon" stub for the `wizard.setup_paths.nabu_casa` entry + removes the 3 new Path C §8 automations + removes the new Path C binary_sensors + removes the §6 Nabu Casa IKEA doc section + removes the new pytest tests. No state to recover, no schema changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wave 9 #122.c — Phase 6 Tailscale wizard Path C (Nabu Casa HA Cloud)
Wires the Phase 6 guided remote-access wizard's third path (Nabu Casa HA Cloud) end-to-end on top of the Path A (Tailscale) foundation from #122.a, while leaving Path A / Path B / Path D code paths UNTOUCHED.
What changed (8 files / +677 / −43 — purely additive)
connections/remote-access/connection.ymlwizard.setup_paths.nabu_casafrom "coming soon" stub to fully wired (tier-b honest, side_effects + requires_inputs + setup_notes refreshed in plain English).homeassistant/packages/roamcore_remote_access_setup.yamlinput_texthelper + 2 new Path C detectionbinary_sensors +sensor.rc_remote_access_setup_statusextensions + 3 new §8 automations (advance + recovery + detect_existing).homeassistant/packages/tests/test_remote_access_setup.pyscripts/checks/remote-access-setup-smoke.shscripts/check.shdocs/setup/guided-remote-access.mddocs/catalog/connectivity/remote-access.mddocs/mvp/features-build-status.mdhomeassistant/packages/roamcore_setup_wizard.yamlwas NOT touched — the existingautomation.rc_setup_advance_after_remote_accessfrom #122.a already advances the global setup wizard pastnetworkingwhenbinary_sensor.rc_remote_access_setup_completeflips toon, and Path C's §8.5 advance moves the wizard stage tonabu_casa_done(same complete-binary_sensor flip). The global advance fires automatically.Doctrine applied
Bernard (2026-08-04 ~21:15 UTC): "must not fail + super intuitive + critical infrastructure."
recoverystage viaautomation.rc_remote_access_setup_recovery_nabu_casa(60s window, mirrors Path A'sautomation.rc_remote_access_setup_recovery).test_automation_recovery_nabu_casa_contract+ the bash smoke plain-English check.input_text.set_valueon the account email helper (operator can retry without re-typing). Hard-enforced by the same assertion.cloudintegration (since 2022.x) + readssensor.home_assistant_cloud_remote+ wrapscloud.remote_connect/cloud.remote_disconnectservices. Tier-a would require a RoamCore-native Nabu Casa bridge which this slice does NOT ship.input_text.rc_nabu_casa_account_emailmode:password; the smoke + pytest greps for hardcoded@nabu-casa.com/hass-*.nabu-casa.com/nabucasa_*tokens and would catch any leak. The plain-Englishhome.nabu-casa.com(the public login portal) is intentionally allowlisted as user-facing copy in the recovery notice.GOLDEN.md alignment (re-read 2026-08-06)
Product principles served:
cloudintegration). Fail-softly UI: if the Nabu Casa subscription lapses, the wizard surfaces a plain-English banner rather than dropping the operator into a manual recovery.sensor.home_assistant_cloud_remoteentity + auto-advances the §8 mandatory automation to set up the 60-second re-verify cycle.binary_sensor/sensorrc_remote_access_setup_nabu_casa_*entities are readable from OpenClaw — operator can ask "is my Nabu Casa wizard finished?" + "is my Nabu Casa subscription active?"Engineering principles respected:
docs/setup/guided-remote-access.md; Nabu Casa credentials NEVER appear in the repo.git revert.subagent/phase6-tailscale-nabu-casa; one PR for Bernard per protocol.rc_remote_access_setup_nabu_casa_*; test rig extended to allow therc_nabu_casa_subsystem prefix alongside the existingrc_remote_access_setup_+rc_tailscale_prefixes.Anti-patterns explicitly avoided:
input_textmode:password; greps enforced.User-facing one-liner
Verification
bash scripts/check.sh --core-only→ GREEN exit 0bash scripts/checks/remote-access-setup-smoke.sh→ 11/11 PASS, exit 0python3 -m pytest homeassistant/packages/tests/test_remote_access_setup.py -v→ 56/56 PASS (was 38/38 in Wave 9 #119b — Phase 2 canonical vehicle model mapping layer #122.a; +18 Path C tests)Files changed
Branch hygiene
subagent/phase6-tailscale-nabu-casa)3d0472c)5f94405(current main HEAD —Wave 9 #122.a — Phase 6 Tailscale wizard (Path A wired, B/C/D stubs))Rollback
git revert 3d0472crestores the "coming soon" stub forwizard.setup_paths.nabu_casa+ removes the 3 new Path C §8 automations + removes the new Path C binary_sensors + removes the §6 Nabu Casa IKEA doc section + removes the new pytest tests. No state to recover, no schema changes.