From d44d62f5944c2765ba009197cc3ac5bb50d073e2 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 3 Jul 2026 18:07:47 +0200 Subject: fix(budget): group help blurb, exact Decimal spent, resolver comment (v0.4.1) Follow-ups from the v0.4.0 review: - add the missing _GROUP_HELP blurb for the budget group (every other group shows one) + a regression test asserting all groups have one. - _spent_scalar sums with decimal.Decimal instead of float (exact money). - note the numeric-name sniffing tradeoff in resolver.budget(). Co-Authored-By: Claude Opus 4.8 --- firefly_cli/resolver.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'firefly_cli/resolver.py') diff --git a/firefly_cli/resolver.py b/firefly_cli/resolver.py index 53144e1..cb7e9a8 100644 --- a/firefly_cli/resolver.py +++ b/firefly_cli/resolver.py @@ -48,6 +48,10 @@ class Resolver: # transaction), so we resolve to an id. A numeric-looking ref goes # straight to the show endpoint (lets same-name-safe callers pin an id); # otherwise match by name against the list. + # ponytail: sniffing digits makes a budget literally named "7" + # unreachable by name (same lossy tradeoff ISSUES.md #2 hit for + # accounts). All-digit budget names are rare; add a --budget-id flag to + # tx add if this ever bites, mirroring --from-id/--to-id. if str(name_or_id).isdigit(): return self.budget_by_id(name_or_id) return self._match("budget", self._list("/api/v1/budgets"), name_or_id) -- cgit v1.2.3