install: report a failed cleanup after an error without an observer (interim) #22

Open
opened 2026-11-07 19:13:16 +01:00 by michael · 1 comment
Owner

Problem

install() and install_local() create a work directory and remove it after
verification. If the removal fails after the operation itself failed, the
primary error stays the result and the failed removal is only reported as a
progress event (phase = "cleanup", state = "failed") through on_progress.
If the caller passes no on_progress, that report is lost.

This is an interim state: on_progress stands in for the event delivery of
the host, which does not exist yet.

Scope

  • once events are handed to the host through a channel that is always there
    (no optional observer), report the failed removal through it in every case
  • remove the interim comments in install/install_local.lua and install/init.lua

Acceptance criteria

  • a failed removal after a failed operation reaches the host even without
    a caller-supplied observer
  • the primary error stays the result
  • interim comments removed
  • make test passes under Lua 5.1 and 5.4
## Problem install() and install_local() create a work directory and remove it after verification. If the removal fails after the operation itself failed, the primary error stays the result and the failed removal is only reported as a progress event (`phase = "cleanup"`, `state = "failed"`) through `on_progress`. If the caller passes no `on_progress`, that report is lost. This is an interim state: `on_progress` stands in for the event delivery of the host, which does not exist yet. ## Scope - once events are handed to the host through a channel that is always there (no optional observer), report the failed removal through it in every case - remove the interim comments in install/install_local.lua and install/init.lua ## Acceptance criteria - [ ] a failed removal after a failed operation reaches the host even without a caller-supplied observer - [ ] the primary error stays the result - [ ] interim comments removed - [ ] make test passes under Lua 5.1 and 5.4
Author
Owner

The description is partly outdated. The observer is now opts.emit, an optional sink for daw_event/v1 events; on_progress no longer exists. The INTERIM comment 'without a sink (opts.emit) this report is lost' stands in four places, not two: activate.lua, index_update.lua, install/init.lua and install/install_local.lua. The issue stays blocked until events reach the host through a channel that is always there.

The description is partly outdated. The observer is now opts.emit, an optional sink for daw_event/v1 events; on_progress no longer exists. The INTERIM comment 'without a sink (opts.emit) this report is lost' stands in four places, not two: activate.lua, index_update.lua, install/init.lua and install/install_local.lua. The issue stays blocked until events reach the host through a channel that is always there.
Sign in to join this conversation.
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
DAW/daw-module-manager#22
No description provided.