Skip to content

feat(budget): source_anomalies and account_category on budget accounts - #8

Draft
makegov-mark[bot] wants to merge 2 commits into
mainfrom
feat/budget-account-anomalies-category
Draft

makegov-mark[bot] wants to merge 2 commits into
mainfrom
feat/budget-account-anomalies-category

Conversation

@makegov-mark

@makegov-mark makegov-mark Bot commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

What

Supports the Tango API v5.7.0 and v5.8.0 changes to /api/budget/accounts/, including data_through_period (the File A fiscal period, 1–12, an account-year's figures run through; null with no File A data), read with models::budget_data_through_period and filtered with data_through_period / _gte / _lte / _isnull:

  • source_anomalies (default shape): each code (contract_exceeds_obligations capped; assistance_exceeds_obligations and contract_without_obligations flagged), every element field including likely_cause and source.rows[], a worked example, and a note that codes may grow and that there is no anomaly filter.
  • account_category (budgetary / credit_financing): the field, the account_category / account_category__in filters, why credit financing accounts are non-budgetary and left out of organization budget totals, and the advice to filter account_category=budgetary before summing.
  • Default ordering: accounts with no enacted_ba sort last within an FY, ties broken by id.
  • Both fields carry a neutral note that they may be empty until the next data refresh.

Pages

  • docs/api-reference/budget.md: filter row, default shape, ordering, new "Account category" and "Source anomalies" sections.
  • docs/data-dictionary/budget.md: account_category row, new "Source anomalies" section.
  • docs/guides/how-to/explore-federal-budget.md: taxonomy filter, budget_appropriation note, new "Summing accounts" and "Source-data anomalies" subsections.
  • CHANGELOG.md: Unreleased entry.

The element example uses the producer's actual message, affected_fields, dataset and file_c_source values; dollar amounts, PIID and TAS are placeholders.

Relationship to #85

#85 (budget known-issues notice) touches the same three pages. This branch is off main and edits different sections, but whichever lands second may need a small rebase.

Testing

  • mkdocs build --clean: builds; only the existing warnings for files fetched at build time.
  • scripts/check_doc_links.py --internal-only: all internal links OK.
  • scripts/check_api_drift.py --surface against tango origin/main: budget filters and shapes documented; the one coverage error is the unrelated ebuy/requests endpoint (covered by #79).
  • markdownlint: no new findings other than the file's existing MD046 fenced-block pattern.

🤖 Generated with Claude Code

vdavez and others added 2 commits October 2, 2026 07:46
Tango API 5.7.0 adds `source_anomalies` and `account_category` to the budget-account default shape and an `account_category` filter.

- `models::BudgetSourceAnomaly` (+ `BudgetSourceAnomalySource`, `BudgetSourceAnomalyRow`) types each anomaly; `BudgetSourceAnomaly::from_record` decodes it from a budget-account record.
- `account_category` / `account_category_in` on `ListBudgetAccountsOptions`.
- `SHAPE_BUDGET_ACCOUNTS_MINIMAL` matches the API's default shape again.
- Docs and CHANGELOG.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Tango API 5.8.0 adds `data_through_period` to the budget-account default shape: the File A fiscal period (1-12) an account-year's figures run through, null with no File A data.

- `models::budget_data_through_period` reads it from a record as `Option<u8>`.
- `data_through_period`, `data_through_period_gte`, `data_through_period_lte` and `data_through_period_isnull` on `ListBudgetAccountsOptions`.
- `SHAPE_BUDGET_ACCOUNTS_MINIMAL` names it right after `fiscal_year`.
- Docs and CHANGELOG.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant