fix(adapters/ui): silent fallback on missing cfg._runtime #42

Closed
opened 2026-05-25 13:42:21 +02:00 by michael · 0 comments
Owner

Problem

adapters/ui/init.lua uses a silent fallback in build_ctx:

local runtime = cfg._runtime or {}

If _runtime is missing, install_root and var_dir become nil silently.
The error surfaces later with no clear origin. Violates DAW coding standard
rule 3 ("no silent fallback").

Fix

Validate cfg._runtime explicitly and return nil, err if missing.

Acceptance criteria

  • Missing _runtime produces [ERROR] with clear message
  • No silent nil propagation into ctx
## Problem `adapters/ui/init.lua` uses a silent fallback in `build_ctx`: ```lua local runtime = cfg._runtime or {} ``` If `_runtime` is missing, `install_root` and `var_dir` become nil silently. The error surfaces later with no clear origin. Violates DAW coding standard rule 3 ("no silent fallback"). ## Fix Validate `cfg._runtime` explicitly and return `nil, err` if missing. ## Acceptance criteria - [ ] Missing `_runtime` produces `[ERROR]` with clear message - [ ] No silent nil propagation into ctx
michael added this to the Basic Version milestone 2026-05-30 16:05:00 +02:00
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/fragjan#42
No description provided.