-
Notifications
You must be signed in to change notification settings - Fork 45
fix(data): address medium-severity audit findings #186
Description
Three medium-severity findings from the code audit (#181) that weren't addressed in the overflow PR (#182):
-
Negative sign handling in parseCents --
parseCentsonly strips$prefix but doesn't handle-signs at all.FormatCentsproduces-$5.00butparseCentscan't roundtrip it back. Inputs like-$100,$-100,--$100all fail with a generic "invalid money" error rather than being parsed or getting a clear rejection message. -
Vendor restore error clarity -- When restoring a service log whose vendor was hard-deleted (not just soft-deleted),
requireParentAlivereturnsgorm.ErrRecordNotFoundwhich surfaces as a confusing error rather than a clear "vendor no longer exists" message. -
SQLite pragma configuration -- No explicit
journal_mode,synchronous, orbusy_timeoutpragmas are set or documented. Defaults work for single-user TUI but should be explicitly configured for robustness.