Convert errors to daw_error/v1 once fragjan is converted #1

Open
opened 2026-11-21 09:44:34 +01:00 by michael · 0 comments
Owner

Problem

init.lua returns errors in the old plain-text form (nil, "[ERROR] ...").
fragjan code reports this in 10 places (plain string as error return -- use daw_error/v1) and once init.lua metadata missing provides field.
The module was released this way on purpose (0.1.0): fragjan does not handle
the daw_error/v1 form from primitives yet, and the other
daw-modul-fragjan-check-* modules use the old form as well. The conversion is
done for all of them in a separate round, after fragjan itself is converted.

Scope

  • return daw_error/v1 objects from M.check (unreadable pattern, invalid arguments, missing parameters)
  • add the provides metadata that the finding asks for
  • keep the result contract (status, metrics) as it is
  • do not start before fragjan accepts daw_error/v1 from primitives

Acceptance criteria

  • tests first: each error case returns a daw_error/v1 object with code and resource_id
  • fragjan code . in this repository reports no finding
  • make test passes (Lua 5.4 and 5.1)
  • supports.fragjan in config/module.conf names the first fragjan version that accepts the new form

Technical notes

  • known and accepted findings at release 0.1.0; not a defect of the primitive's logic
  • affects the other daw-modul-fragjan-check-* modules the same way; one issue per repository
## Problem `init.lua` returns errors in the old plain-text form (`nil, "[ERROR] ..."`). `fragjan code` reports this in 10 places (`plain string as error return -- use daw_error/v1`) and once `init.lua metadata missing provides field`. The module was released this way on purpose (0.1.0): fragjan does not handle the `daw_error/v1` form from primitives yet, and the other `daw-modul-fragjan-check-*` modules use the old form as well. The conversion is done for all of them in a separate round, after fragjan itself is converted. ## Scope - return `daw_error/v1` objects from `M.check` (unreadable pattern, invalid arguments, missing parameters) - add the `provides` metadata that the finding asks for - keep the result contract (`status`, `metrics`) as it is - do not start before fragjan accepts `daw_error/v1` from primitives ## Acceptance criteria - [ ] tests first: each error case returns a `daw_error/v1` object with `code` and `resource_id` - [ ] `fragjan code .` in this repository reports no finding - [ ] `make test` passes (Lua 5.4 and 5.1) - [ ] `supports.fragjan` in `config/module.conf` names the first fragjan version that accepts the new form ## Technical notes - known and accepted findings at release 0.1.0; not a defect of the primitive's logic - affects the other `daw-modul-fragjan-check-*` modules the same way; one issue per repository
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-modul-fragjan-check-valueequals#1
No description provided.