Skip to content

fix(render): write WALL_HA_TOKEN into the sensitive tier's .env - #1570

Merged
Gerrrt merged 12 commits into
mainfrom
claude/homelab-tv-dashboard-sd6zal
Nov 18, 2026
Merged

Gerrrt merged 12 commits into
mainfrom
claude/homelab-tv-dashboard-sd6zal

Conversation

@Gerrrt

@Gerrrt Gerrrt commented Nov 18, 2026

Copy link
Copy Markdown
Owner

What changed

  • scripts/render-config.sh: adds WALL_HA_TOKEN to COMPOSE_VARS, the list of SOPS names that render writes into a stack's .env.
  • docs/changelog.md: a 2026-11-18 entry that corrects the wall house-and-calendar entry, which shipped without this.

Why

make up STACK=sensitive on trinity failed after #1566:

error while interpolating services.caddy.environment.WALL_HA_TOKEN: required variable WALL_HA_TOKEN is missing a value

Here is why:

Refs ADR-0119.

Blast radius

  • On trinity: the sensitive tier's .env gains one line, WALL_HA_TOKEN, from SOPS.

  • Unblocked: make up STACK=sensitive and the converge timer, both of which fail until this lands.

  • Other stacks: nothing changes. A name a stack's SOPS file lacks is skipped.

  • No change to network segmentation or firewall rules

  • No new port published to a VLAN that could not already reach the service

  • No credential added outside secrets/*.sops.yaml

Verification

  • The cause, seen on trinity: the operator's make up STACK=sensitive failed with the error above. secrets/sensitive.sops.yaml on main holds the WALL_HA_TOKEN key, but COMPOSE_VARS did not list it.

  • Other guards checked: every ${VAR:?} guard in a stacks/*/compose.yaml that names a key in a secrets/*.sops.yaml was compared with COMPOSE_VARS. With this change none is missing. Before it, WALL_HA_TOKEN was the only one.

  • Checks run here:

    • bash -n scripts/render-config.sh: passed.
    • python3 scripts/check_docs.py: docs OK.
    • markdownlint: 0 issues.
    • shellcheck isn't installed here, so CI runs it.
  • make validate passes: left to CI

  • Deployed to the lab and confirmed working: make up STACK=sensitive on trinity after merge

  • Docs updated (docs/, service README, or docs/roadmap.md)


Generated by Claude Code

The office television came up on heimdall on 2026-11-18. Its generic EDID
prefers 1280x720, and the video= boot line only sets the console, so a
kanshi profile now sets 1920x1080 at 60 Hz: sharp, no overscan, and kept
across a reboot. The Changhong has no HDMI-CEC (its manual never mentions
it, and the Pi's probe found no device), and it switches itself off
without a signal. So neither night-time path in ADR-0119 decision 5
applies, and the screen stays on with the set's Auto Sleep and Sleep
timers off.

build-heimdall.md sections 5, 7, 8 and 9, the hardware.md wall display
rows and a 2026-11-18 changelog entry say so.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L2EweeobucQzJcXxXS27K6
main already had a 2026-11-18 heading, so the entry added a second one, and
markdownlint's MD024 failed Lint on #1566. The entry now opens the
existing day, newest first. markdownlint-cli2 reported the MD024 error on
the previous head and 0 issues in 209 files on this one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L2EweeobucQzJcXxXS27K6
From Copilot's review on #1566. cec-ctl's physical address belongs to the
local adapter and is derived from the TV's EDID; the TV would be 0.0.0.0.
Section 8 now says the TV never replied, rather than that the Pi saw it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L2EweeobucQzJcXxXS27K6
Keep both 2026-11-18 changelog entries under one heading.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L2EweeobucQzJcXxXS27K6
The page's header shows the weather and its bottom row the Ring Alarm's mode,
four door contacts, two window contacts and the office lights. Each is one
of nine /api/ha/NAME handles in the Caddyfile: a GET of one
/api/states/<entity>, ending in `?` so the client's query string is
dropped, with WALL_HA_TOKEN (the non-admin `wall` user, #1563) added by
Caddy. Home Assistant has no read-only role, so that narrowing is the
read-only part. security.md names the residual.

Two entities were renamed in HA so no committed ID names a person or the
city: light.office and alarm_control_panel.house. Measured against the
pinned Caddy and a stand-in HA: each handle reached only its entity with the
token, ?x=1 was dropped, POST 405, /api/states/ directly 404.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L2EweeobucQzJcXxXS27K6
A Today panel under the alerts lists today's and tomorrow's events: time
(or All day / Now), title and location, with a colour bar per calendar.
Alerts keep the height they need and the calendar fits what is left, with
"+N more" for the rest.

The events come from sensor.wall_today, built by a new HA package,
wall_calendar.yaml: a trigger-based template sensor that asks
calendar.get_events every five minutes for today and tomorrow. It reads the
calendars labelled wall_calendar, or every calendar when none is labelled, so
no calendar (whose Google ids name people) is named in the repository. It
reads unavailable, not empty, when a calendar cannot be read, and the
status bar shows that as "calendar · unavailable". The wall reads it through
a tenth fixed handle, /api/ha/today.

Booted on Home Assistant 2026.11.1: check_config passed, the sensor held the
demo calendars' events, and with no calendar it read unavailable. The page
was rendered against the pinned Caddy with a stand-in HA in its three states.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L2EweeobucQzJcXxXS27K6
The Ring Alarm's and the office lights' entity ids name the city and a
person, so the wall cannot name them and they stay as they are in HA. A new
package, wall_house.yaml, finds them instead: sensor.wall_alarm takes the
house's one alarm_control_panel, and binary_sensor.wall_office_lights is on
when any light whose id contains "office" is on. Both read unavailable when
nothing matches. The Caddyfile's alarm and office_light handles now name
these two template entities.

Booted on Home Assistant 2026.11.1 with a stand-in alarm and office light:
disarmed/off at start, armed_home/on after arming and turning on.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L2EweeobucQzJcXxXS27K6
…hboard-sd6zal

# Conflicts:
#	docs/changelog.md
Keep every 2026-11-18 changelog entry under one heading.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L2EweeobucQzJcXxXS27K6
make up STACK=sensitive failed on trinity with "required variable
WALL_HA_TOKEN is missing a value". The token is in
secrets/sensitive.sops.yaml (#1563) and compose.yaml guards it, but
render-config.sh writes to .env only the names in COMPOSE_VARS, and the wall
change never added it there. CI validates against seed-validation-env.sh's
stand-ins, not a render, so it passed.

Every other ${VAR:?} guard naming a SOPS key was checked against the list;
none is missing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L2EweeobucQzJcXxXS27K6
…s push fast-forwards

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01L2EweeobucQzJcXxXS27K6
Copilot AI balanced review requested due to automatic review settings November 18, 2026 16:19

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the token-propagation fix and accompanying changelog correction.

No open issues 🎉

What changed in this PR

This PR fixes the missing token propagation introduced with the wall’s house and calendar features. Adding WALL_HA_TOKEN to the renderer’s allowlist lets the sensitive stack receive the SOPS-backed value required by Compose.

Changes:

  • Adds WALL_HA_TOKEN to COMPOSE_VARS so rendering includes it in the stack’s .env.
  • Adds a dated changelog correction documenting the deployment failure, its cause, and why CI missed it.
File Description
scripts/​render-config.sh Includes WALL_HA_TOKEN in generated Compose environment files.
docs/​changelog.md Records the correction to the earlier wall-feature release entry.

Review effort: Balanced

@Gerrrt
Gerrrt merged commit 7c54e65 into main Nov 18, 2026
10 checks passed
@Gerrrt
Gerrrt deleted the claude/homelab-tv-dashboard-sd6zal branch November 18, 2026 18:04
Gerrrt added a commit that referenced this pull request Nov 18, 2026
#1566 guarded WALL_HA_TOKEN in stacks/sensitive/compose.yaml and seeded
it, #1563 put it in secrets/sensitive.sops.yaml, and nothing added it to
render-config.sh's COMPOSE_VARS. CI validates with the seed's stand-ins
and never runs render, so it passed; `make up STACK=sensitive` on trinity
did not.

scripts/check_compose_vars.py holds the three copies together: a guarded
or seeded SOPS key must be in COMPOSE_VARS, a guarded SOPS key must have
a stand-in, and a COMPOSE_VARS entry must be a SOPS key. It reads only key
names, which SOPS leaves in plaintext. Wired into CI, validate.sh and
`make check-compose-vars`; its fixtures run in self-tests.sh.

It fails on main at #1566 and passes on #1570's head. Refs #1570.


Claude-Session: https://claude.ai/code/session_01L2Eweh7G6uK8cbuptGtxTR

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants