Migrate fragjan itself to daw_error/v1 (plain string error returns) #157

Closed
opened 2026-11-18 12:56:18 +01:00 by michael · 2 comments
Owner

Problem

fragjan code . run on fragjan itself reports 193 errors of the rule
"plain string as error return -- use daw_error/v1" (73 files, 1678 checks,
6 suppressed). fragjan enforces this rule in other repos but does not meet it
itself: the 2.x migration has not reached its own error returns.

Affected directories (all files with findings of that run):
adapters/log, adapters/primitive, adapters/ui, core/catalog, core/commands,
core/config, core/detect, core/loader, core/modules, core/runner,
core/validator.

Scope

  • every plain string error return becomes a daw_error/v1 object, built once at
    the public boundary; internal helpers keep returning plain text
  • every new error site gets its own resource_id with entries in i18n/en.json
    and i18n/de.json (one resource_id per site)
  • one file at a time, tests first or updated with it
  • nothing else is changed on the way (no refactoring, no renaming)

Acceptance criteria

  • fragjan code . reports no plain string error returns (existing,
    justified suppressions stay)
  • make test passes with Lua 5.1 and 5.4
  • the last open criterion of DAW/fragjan#153 ("fragjan code . passes") is
    met by this issue

DAW/fragjan#134 (the rule that reports these), DAW/fragjan#153

## Problem `fragjan code .` run on fragjan itself reports 193 errors of the rule "plain string as error return -- use daw_error/v1" (73 files, 1678 checks, 6 suppressed). fragjan enforces this rule in other repos but does not meet it itself: the 2.x migration has not reached its own error returns. Affected directories (all files with findings of that run): adapters/log, adapters/primitive, adapters/ui, core/catalog, core/commands, core/config, core/detect, core/loader, core/modules, core/runner, core/validator. ## Scope - every plain string error return becomes a daw_error/v1 object, built once at the public boundary; internal helpers keep returning plain text - every new error site gets its own resource_id with entries in i18n/en.json and i18n/de.json (one resource_id per site) - one file at a time, tests first or updated with it - nothing else is changed on the way (no refactoring, no renaming) ## Acceptance criteria - [ ] `fragjan code .` reports no plain string error returns (existing, justified suppressions stay) - [ ] `make test` passes with Lua 5.1 and 5.4 - [ ] the last open criterion of DAW/fragjan#153 ("fragjan code . passes") is met by this issue ## Related DAW/fragjan#134 (the rule that reports these), DAW/fragjan#153
Author
Owner

Migration complete

  • [OK] plain-string error returns are daw_error/v1 with resource_id (en/de)
  • [OK] fragjan code . reports 0 errors; 434 resources; 42 test files, 2056 tests (Lua 5.4 and 5.1)
  • [OK] open points filed as separate issues in DAW/fragjan, DAW/daw-lua-common and DAW/daw-contracts
## Migration complete - [OK] plain-string error returns are daw_error/v1 with resource_id (en/de) - [OK] fragjan code . reports 0 errors; 434 resources; 42 test files, 2056 tests (Lua 5.4 and 5.1) - [OK] open points filed as separate issues in DAW/fragjan, DAW/daw-lua-common and DAW/daw-contracts
Author
Owner

Closed 2026-11-24

  • [OK] fragjan code . reports 0 errors (was 193 findings in 73 files)
  • [OK] 434 i18n resources; 42 test files, 2056 tests green on Lua 5.4 and 5.1
  • [OK] last commits on develop: b179196 (suppressor), f084676 (test fix)
  • Follow-ups: DAW/fragjan#160 to #169, DAW/daw-lua-common#64, DAW/daw-contracts#25
## Closed 2026-11-24 - [OK] fragjan code . reports 0 errors (was 193 findings in 73 files) - [OK] 434 i18n resources; 42 test files, 2056 tests green on Lua 5.4 and 5.1 - [OK] last commits on develop: b179196 (suppressor), f084676 (test fix) - Follow-ups: DAW/fragjan#160 to #169, DAW/daw-lua-common#64, DAW/daw-contracts#25
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#157
No description provided.