Commit graph

3 commits

Author SHA1 Message Date
Snider
f1bd36db2e fix(critical): Codex review — 7 high-severity issues resolved
Critical:
- Result.Result() zero args returns receiver instead of panicking

High:
- i18n.SetLanguage: added mutex, forwards to translator
- embed.GetAsset: hold RLock through assets map read (race fix)
- cli.PrintHelp: safe type assertion on Translate result
- task.PerformAsync: guard nil task in reflect.TypeOf
- Service/Command registries initialised in New() (race fix)

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-20 17:20:08 +00:00
Snider
a845866c25 fix: embed.go Result{}.Result() pattern + utils test coverage
- embed.go: replace 27 manual Result{} constructions with Result{}.Result()
  — errors now propagate instead of being silently swallowed
- utils_test.go: add 22 tests for IsFlag, Arg, ArgString, ArgInt, ArgBool,
  and Result.Result() (252 tests, 78.8% coverage)

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-20 15:25:37 +00:00
Snider
8854d5c79f feat: utils.go — FilterArgs, ParseFlag with short/long flag rules
- FilterArgs: removes empty strings and Go test runner flags
- ParseFlag: single dash (-v, -🔥) must be 1 char, double dash (--verbose) must be 2+ chars
- Cli.Run() now uses FilterArgs and ParseFlag — no test flag awareness in surface layer
- Invalid flags silently ignored (e.g. -verbose, --v)

221 tests, 79.7% coverage.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-20 12:15:57 +00:00