state: a state file without a section loads it empty (closes #267) #278

Merged
clawbot merged 1 commits from fix/267-state-missing-sections into next 2026-10-13 20:27:27 +02:00
1 Commits
Author SHA1 Message Date
sneak 83b68923d9 state: a state file without a section loads it empty (closes #267)
check / check (push) Waiting to run
Load fills in each of domains, hostnames, ports and certificates that
the file leaves out or holds as null with an empty map. Before, such a
section loaded as a nil map, and the first check's write into it
panicked, so a state file holding {} stopped the watcher at every
start.

A state test loads {} and a file missing each section in turn, and
checks that every section is an empty map. A watcher test loads {}, and
a file without the certificates section, runs the first check against
live DNS, and checks that it saved domain, hostname, port and
certificate entries.

Model: opus-5-5
2026-10-13 18:01:03 +00:00