Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

fix(admin): purchased_by_day is gross, the PR B plan says net

Open
#583 0 comments 0 reactions 0 assignees View on GitHub

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

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_days sums row.purchased_micro only and drops days with amount ≤ 0; DailyMicroTotals.amount_micro is ge=0.
  • Plan: docs/superpowers/plans/2026-09-15-admin-layer-redesign-prB-read-paths-delete.md Task 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Open-Finance-Lab/AgenticTrading

All issues in Open-Finance-Lab/AgenticTrading

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.