fix: ship dependency hooks on install + fire on_install from the CLI #15

Open
daniel wants to merge 0 commits from fix/dependency-hooks-install into main
Owner

Two fixes exposed by the first real end-to-end run of the mosquitto + zigbee2mqtt dependency pair (2026-06-28):

  • install_from() copies subdirectories now. Only top-level files were copied, so a provider's scripts/ folder with its on_install/on_start hooks never reached /var/lib/furtka/apps/<app>/ — every hooked dependency failed at reconcile with hook ... missing in provider. Uses rmtree + copytree so reinstalls also drop upstream-removed files.
  • furtka app install <name> routes through install_runner.run_install. The bare copy+reconcile path fired on_start but never on_install, so a CLI install of a consumer brought its provider up unprovisioned. Named installs now use the same docker phase the API dispatches; path installs keep the dev/test copy+reconcile path.

Both validated end-to-end on the test VM with the mosquitto + zigbee2mqtt pair. 359 tests green, ruff check + format clean.

🤖 Generated with Claude Code

Two fixes exposed by the first real end-to-end run of the mosquitto + zigbee2mqtt dependency pair (2026-06-28): - **install_from() copies subdirectories now.** Only top-level files were copied, so a provider's `scripts/` folder with its `on_install`/`on_start` hooks never reached `/var/lib/furtka/apps/<app>/` — every hooked dependency failed at reconcile with `hook ... missing in provider`. Uses rmtree + copytree so reinstalls also drop upstream-removed files. - **`furtka app install <name>` routes through install_runner.run_install.** The bare copy+reconcile path fired `on_start` but never `on_install`, so a CLI install of a consumer brought its provider up unprovisioned. Named installs now use the same docker phase the API dispatches; path installs keep the dev/test copy+reconcile path. Both validated end-to-end on the test VM with the mosquitto + zigbee2mqtt pair. 359 tests green, ruff check + format clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
daniel added 3 commits 2026-08-11 15:29:22 +02:00
install_from() only copied top-level files, so an app's scripts/ folder —
where provider on_install/on_start dependency hooks live — never reached
/var/lib/furtka/apps/<app>/. Every hooked dependency therefore failed at
reconcile with "hook ... missing in provider". Copy subdirectories too
(rmtree+copytree so a reinstall drops files removed upstream).

Found during the first real end-to-end run of the mosquitto+zigbee2mqtt
dependency pair on a test VM.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
`furtka app install <name>` copied app folders (install_plan) then ran a
bare reconcile, which fires on_start but never on_install — so a CLI
install of a consumer brought its provider up without ever provisioning
it (no account, empty MQTT_* in the consumer .env). Route named installs
through install_runner.run_install (writing the plan file first), the same
docker phase the API dispatches, so providers come up before consumers and
on_install hooks run. Path installs keep the copy+reconcile dev/test path.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
docs: changelog entries for the dependency-hook install fixes
Some checks failed
CI / lint (pull_request) Successful in 33s
CI / test (pull_request) Successful in 1m20s
CI / validate-json (pull_request) Successful in 23s
CI / markdown-links (pull_request) Successful in 15s
CI / lint (push) Waiting to run
CI / test (push) Waiting to run
CI / validate-json (push) Waiting to run
CI / markdown-links (push) Waiting to run
Build ISO / build-iso (push) Has been cancelled
bf36b7621b
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Some checks failed
CI / lint (pull_request) Successful in 33s
Required
Details
CI / test (pull_request) Successful in 1m20s
Required
Details
CI / validate-json (pull_request) Successful in 23s
Required
Details
CI / markdown-links (pull_request) Successful in 15s
CI / lint (push) Waiting to run
Required
Details
CI / test (push) Waiting to run
Required
Details
CI / validate-json (push) Waiting to run
Required
Details
CI / markdown-links (push) Waiting to run
Build ISO / build-iso (push) Has been cancelled
This branch is already included in the target branch. There is nothing to merge.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin fix/dependency-hooks-install:fix/dependency-hooks-install
git checkout fix/dependency-hooks-install
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: daniel/furtka#15
No description provided.