Error visibility and agent tool cleanup

Exchange-rate fetchers log every source failure instead of silently
passing (BE-18); the rate tool exposes fetched_at so staleness is
visible (BE-20). Agent: unbound-session failures raise a clear
RuntimeError (BE-12); net worth converts via get_crc_multipliers with
last-known fallbacks instead of a hardcoded 600 CRC / 1.08 EUR guess,
and reports accounts it cannot convert rather than inventing numbers
(BE-24); budget tool enforces MIN/MAX_YEAR (BE-16); municipal receipts
gain offset paging (BE-17); category analytics prefetches names; the
module docstring pins the read-only tool policy (SEC-09). Note: the
refresh loop never swallowed CancelledError (BaseException since 3.8) —
ARCH-08 was a false positive.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Carlos Escalante
2026-06-10 15:23:21 -06:00
parent 82a7bfc4c5
commit 82f10a5d7c
3 changed files with 49 additions and 28 deletions

View File

@@ -68,7 +68,7 @@ def make_receipt(period: str) -> MunicipalReceipt:
def test_unbound_session_raises(session):
with pytest.raises(LookupError):
with pytest.raises(RuntimeError, match="not bound to agent context"):
tools.get_accounts()