The queue gets a payload kind of its own to recompute a module leader, with the
compaction key module_leader_<moduleId> so the collapse of ready and
disconnected into one module_lifecycle_<moduleId> event cannot swallow it.
The event is inserted next to the events of the same change: on a connect, on a
disconnect by WebSocket close, and on the phantom cleanup of the own node.
Graceful shutdown by DeleteOwnBackends keeps inserting no events. The payload
carries the leader address before and after the change, derived from the module
instances that are already loaded, so the event worker reads nothing from the
database. No new columns, no new tables, no new migrations.
- Remove link resync on module reconnect, link resave on no-op config
update, and link backfill on variable create/upsert: links are
formed only on config save
- Disable exhaustruct_v5 and goconst linters
- Fix golangci-lint findings: noinlineerr, slices.Backward,
wrapcheck for ConfigValidationError (errors.As in controller keeps
working via %w), funlen nolint on acceptance test
- Dedupe extracted variable names (duplicate INSERTs aborted the
config_has_variable transaction on PK conflict)
- Check per-statement rqlite errors in ExecTransaction: a failed
statement silently returned success before
- Make link upserts idempotent (insert or ignore) and add link
backfill on variable create/upsert from existing configs
- Validate config variables before insert (no orphaned configs)
- Resync active config links on module reconnect and on no-op
config update (self-healing)