fix(main): wrong exit codes for config and dispatch errors #38

Closed
opened 2026-05-25 11:51:44 +02:00 by michael · 0 comments
Owner

Problem

main.lua uses out:exit(1) for config and dispatch errors:

if not cfg then
  out:write_err(tostring(cfg_err))
  out:exit(1)   -- wrong: 1 means "warnings present"
end

Per fragjan-mvp exit code spec:

  • 1 = warnings present
  • 2 = errors present
  • 10 = config/load error
  • 20 = internal runtime error

Config load failure and dispatch failure are exit 10, not 1.

Acceptance criteria

  • core_cfg.load failure exits with 10
  • ui.dispatch failure exits with 10 (or 20 if internal)
  • Exit code spec documented in one place (see DAW/fragjan#35)
## Problem `main.lua` uses `out:exit(1)` for config and dispatch errors: ```lua if not cfg then out:write_err(tostring(cfg_err)) out:exit(1) -- wrong: 1 means "warnings present" end ``` Per fragjan-mvp exit code spec: - 1 = warnings present - 2 = errors present - 10 = config/load error - 20 = internal runtime error Config load failure and dispatch failure are exit 10, not 1. ## Acceptance criteria - [ ] `core_cfg.load` failure exits with 10 - [ ] `ui.dispatch` failure exits with 10 (or 20 if internal) - [ ] Exit code spec documented in one place (see DAW/fragjan#35)
michael referenced this issue from a commit 2026-05-27 21:25:48 +02:00
michael added this to the Basic Version milestone 2026-05-30 16:05:10 +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#38
No description provided.