fix(deps): give on_start hooks the consumer's stored credentials #13
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/on-start-consumer-env"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The reconciler handed an
on_startdependency hook onlyFURTKA_CONSUMER_APP/FURTKA_CONSUMER_VERSION, so it had no way to learn the consumer's existing secrets. That made the 26.17 feature's own headline use case — re-create a provider account (e.g. an MQTT user) after a wipe with the same password the consumer already holds — impossible unless the provider stashed a copy itself.Surfaced building the first real provider/consumer catalog pair (mosquitto + zigbee2mqtt) in daniel/furtka-apps.
Change
on_startnow also receives the consumer's.envvalues, namespaced underFURTKA_CONSUMER_ENV_<KEY>(UPPER_SNAKE_CASE keys only, so a hand-edited.envcan't produce a malformed--envargument).on_startstays read-only toward the consumer: unlikeon_install, its stdout is intentionally not merged back into the consumer's.env. It reads consumer state to reconcile provider state; it doesn't mutate it.Tests
test_reconcile_on_start_hook_receives_consumer_envasserting injection + that non-UPPER_SNAKE keys are dropped.ruff check+ruff format --checkclean.Not covered
Real on-VM end-to-end validation (install zigbee2mqtt, observe MQTT handshake, reboot for on_start idempotency) still pending — needs Docker, which this dev box lacks.