feat(api): budget and report filters for the transactions index #4423
All Vouch review confidence checks passed
Residual risk 0.29 = Change Risk (0.49) × (1 − Review Confidence (0.41)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.49 · 331 lines diff across 4 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.347
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #4423"
general
weight: 0.35
bhargavmehta01
Budget clients need transaction drill-downs that reconcile with the budget line they opened. This adds budget/report filters to
GET /api/v1/transactionsand makes the web budget category list and API budget list use the same eligibility rules as the income statement totals.Behavior
| Parameter | Behavior |
|---|---|
|
budget_id| Lists the visible budget's reportable transactions using its income statement's period scope, account IDs and shared row conditions. Pending, future-dated, excluded, tax-advantaged and internal investment-movement rows are omitted. Investment contributions follow the family's spending setting. ||
exclude_split_parents| AppliesEntry.excluding_split_parents. ||
excluded| Filters the entry's excluded flag on ordinary transaction lists. Budget lists already exclude flagged entries. |Budget visibility is enforced before listing rows. Results are additionally restricted to accounts the caller can access: a personal-budget share alone does not grant access to its underlying accounts, so a viewer with partial account access can see a smaller sum than the owner's budget total.
IncomeStatement::Totalsand the drill-down share the normal budget row conditions; the legacyinclude_trades: falsetotals behavior is preserved.BudgetCategoriesController#showuses the same reportable rows, so the web list receives the fix too.BaseController#boolean_filter_param(key, required:)serves transactions, rules and security filters. It accepts true/false/1/0 with case/space normalization and rejects invalid or empty values with 422. Budget IDs and dates are parsed before the index's broad rescue so invalid filters produce 404/422. API documentation and OpenAPI are updated.Validation
The final base-only update includes main
ac19725d8(the merged mobile splits feature and carried-forward security-price fixes). Another 380 importer/price/transaction regressions and all 487 API documentation examples pass on that integration.