fix(adapters/ui): ask.lua compares the status against a fixed literal #156

Open
opened 2026-11-18 11:15:28 +01:00 by michael · 0 comments
Owner

Problem

adapters/ui/ask.lua line 141 decides whether the command is run again
by a fixed comparison: ok.status == "waiting". There must be no fixed
comparisons in code; which status means "parked, ask and resume" has to
come from data (the contract of the question mechanism or configuration).

Goal

The status that means "waiting for an answer" is taken from data, not
from a literal in ask.lua.

Questions for the implementation

  • where is the waiting status defined today? ask.lua must read it
    from there.

Acceptance criteria

  • tests first: a status declared as waiting in the data leads to
    asking and running again; another status does not
  • no literal status is left in ask.lua
  • fragjan code . and make test (Lua 5.1 and 5.4) pass

DAW/fragjan#153

## Problem `adapters/ui/ask.lua` line 141 decides whether the command is run again by a fixed comparison: `ok.status == "waiting"`. There must be no fixed comparisons in code; which status means "parked, ask and resume" has to come from data (the contract of the question mechanism or configuration). ## Goal The status that means "waiting for an answer" is taken from data, not from a literal in `ask.lua`. ## Questions for the implementation - where is the waiting status defined today? `ask.lua` must read it from there. ## Acceptance criteria - [ ] tests first: a status declared as waiting in the data leads to asking and running again; another status does not - [ ] no literal status is left in `ask.lua` - [ ] `fragjan code .` and `make test` (Lua 5.1 and 5.4) pass ## Related DAW/fragjan#153
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#156
No description provided.