summaryrefslogtreecommitdiffstats
path: root/firefly_cli/resolver.py
AgeCommit message (Collapse)AuthorFilesLines
36 hoursfix: register cmd_add handler correctly for tx add (v0.3.8)v0.3.8Danilo M.1-1/+4
v0.3.7 placed the @registry.command decorator above a helper (_resolve_side) inserted between the decorator and cmd_add, so the registry bound the helper as the "tx add" handler. Unit tests call cmd_add directly and missed it; live CLI dispatch failed with "_resolve_side() missing 2 required positional arguments". Move the helper above the decorator and add a regression test asserting the registered handler is cmd_add. Found by live smoke test against the test instance. Also note in resolver that Firefly returns 401 (not 404) for an unknown account id. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
36 hoursfeat: tx add --from-id/--to-id to disambiguate same-name accounts (v0.3.7)v0.3.7Danilo M.1-0/+6
ISSUES.md #2: two accounts can share a name (e.g. expense id 52 and revenue id 129 both "Nexi"), making --from/--to ambiguous and unresolvable. Add --from-id/--to-id to target an account by numeric id. Per side, exactly one of the name flag or the id flag; sides independent. The id path fetches the account (resolver.account_by_id), validating existence before writing. Name-only callers unchanged; JSON/exit unchanged, so PATCH. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
3 daysfeat: name-to-id resolver with loud ambiguity errorsDanilo M.1-0/+35