fix(admin): purchased_by_day is gross, the PR B plan says net
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Active
- Tech stack
- python
- Domain
- backend, data-visualization
Research direction
Read value_queries.py and admin-overview.js, then compare the behavior with Task 4 in docs/superpowers/plans/2026-09-15-admin-layer-redesign-prB-read-paths-delete.md. The issue requires a decision between gross and net totals, including implications for zero/negative days and chart range; done means the chosen behavior is consistent across aggregation, constraints, and display.
Written by the indexing model from the issue text.
Description
purchased_by_day (merged in #564) is gross purchases per UTC day; the PR B plan specifies net (purchases − refunds), and says the negative days are intended ("the honest revenue line").
- Shipped:
value_queries.py_ledger_dayssumsrow.purchased_microonly and drops days with amount ≤ 0;DailyMicroTotals.amount_microisge=0. - Plan:
docs/superpowers/plans/2026-09-15-admin-layer-redesign-prB-read-paths-delete.mdTask 4,purchased_by_day=purchased_micro - refunded_micro, may be negative.
Why it shipped gross: it matches the Purchased headline it sits under (aggregate_commercial_ledger reports purchased and refunded separately), and the combined Credits chart in admin-overview.js only draws a 0-based axis, so a negative day can't render.
Decision needed: keep gross (and amend the plan), or switch to net — which also means dropping ge=0, keeping ≤ 0 days, and teaching the chart a negative range. LedgerDayTotal already carries refunded_micro, so either is a small change.
- Dominant language
- Python
- Stars
- 767
- Forks
- 156
- Avg merge
- 22h 2m
- Merged PRs (30d)
- 88
Getting set up
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Open-Finance-Lab/AgenticTrading
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
Open-Finance-Lab/AgenticTrading#663 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
Open-Finance-Lab/AgenticTrading#661 ·
Maintainers usually reply within 1 day
-
fix(llm): a non-ASCII execution handoff raises UnicodeEncodeError instead of ExecutionHandoffErrorPossibly taken @subidhkhanal claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Open-Finance-Lab/AgenticTrading#659 ·
Maintainers usually reply within 1 day
-
fix(backtests): an LLM action with trailing whitespace ("buy ") is silently droppedPossibly taken @subidhkhanal claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
Open-Finance-Lab/AgenticTrading#658 ·
Maintainers usually reply within 1 day
-
fix(llm): Gemini adapter drops thinking tokens from the output countPossibly taken @subidhkhanal claimed this 1 day ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Open-Finance-Lab/AgenticTrading#657 ·
Maintainers usually reply within 1 day
All issues in Open-Finance-Lab/AgenticTrading
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
fossasia/visdom-dev#77 ·
Maintainers usually reply within 4 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
aws-cloudformation/cfn-lint#4890 ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
volcengine/OpenViking#6521 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
AstrBotDevs/AstrBot#10720 ·
Maintainers usually reply within 1 day