Repository navigation
PortfolioDB 1.6.0
The review snapshot gains a per-account cash breakdown, and the period
statistics stop holding back a finished week or month until the next one has a
snapshot. No schema and no migration — see Upgrading.
Minor rather than patch because a field was added to an MCP tool's output:
backward compatible, but something new for a client to consume, which a patch
should not carry.
Added
summary.cash_by_accountinget_portfolio_review_snapshot. The
per-account breakdown behindsummary.cash— the latest balance each account
had entered at the cutoff — was computed on every call and then discarded. It
is now returned next to the total it explains, so a reader can see which
account holds the cash. Additive: no existing field moved or changed meaning.
Changed
- Period statistics release a finished week or month as soon as the date has
moved past it.period_stats.buildaccepted atodayargument and never
read it, so the last group in the curve was always treated as still running
and kept out of best/worst. A complete August therefore stayed excluded until
September's first snapshot landed — every 1st of the month before the
collector ran, and every Monday morning for the week. The dashboard passes
today; with it, a period whose calendar end is behind today counts as
complete. Callers that omittodaykeep the old behaviour. This can change
the "best month" / "worst week" records shown during that window, and only
then.
Upgrading
No migration. docker compose pull && docker compose up -d.
The rest is the first round of fixes from the Sonar way quality profile:
build_payload_data, the prompt registry and the CSV importer's main are
split into smaller functions, and the tests that wrapped several calls in one
pytest.raises block now isolate the call under test. No figure changes from
any of that: the dashboard payload built by the old and new payload.py
against the same live database was diffed field by field and is identical.