Skip to content

Sync to the current Tango API: budget, DIBBS, exclusions, SBIR, detail GETs, filter parity (v0.2.0) - #3

Merged
vdavez merged 5 commits into
mainfrom
feat/api-sync-v0.2.0
Sep 23, 2026
Merged

vdavez merged 5 commits into
mainfrom
feat/api-sync-v0.2.0

Conversation

@makegov-mark

@makegov-mark makegov-mark Bot commented May 28, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Brings the Rust SDK up to the current public Tango API and prepares 0.2.0 (workspace version already bumped; cargo publish --dry-run passes for both crates).
Rebased onto main, so it now sits on top of SLED, contract appeals and the protest-casing fixes.
Every route and filter below was checked against the live OpenAPI schema and the API source, not against another SDK.

Breaking

  • Removed get_idv_summary and list_idv_summary_awards. Their paths (/api/idvs/{key}/summary/ and /summary/awards/) have never existed, so every call returned 404. Use get_idv with SHAPE_IDVS_COMPREHENSIVE and list_idv_awards.
  • Removed search_opportunity_attachments and SearchOpportunityAttachmentsOptions. The API retired /api/opportunities/attachment-search/, which now returns 404 for every query. list_opportunities with search covers attachment text.

Added

  • Budget accounts: list_budget_accounts / iterate_budget_accounts, get_budget_account, get_budget_account_quarters (with tas), get_budget_account_recipients (with funding_organization_id), and get_entity_budget_flows (with fiscal_year). SHAPE_BUDGET_ACCOUNTS_MINIMAL mirrors the API's default shape.
  • DIBBS (RFQs, RFPs, awards), SAM exclusions, and SBIR/STTR topics and solicitations: list / get / iterate for each, options builders that name every filter the API accepts, and suggested shapes.
  • Singleton detail GETs: get_contract, get_opportunity, get_notice, get_forecast, get_grant, get_subaward; contract sub-routes list_contract_subawards and list_contract_transactions.
  • Filters the API accepts that the SDK did not name: key on contracts / IDVs / OTAs / OTIDVs, grant_id, cage (an alias of cage_code), notice_id / department / office on notices, opportunity_id, forecast id, previous_uii, SLED verbose, and the budget identity filters.

Fixed

  • Docs: cage is an alias, not a distinct filter; department code is an integer; the child-IDV route is /api/idvs/{key}/idvs/.
  • Department code: the Go SDK decodes department code as a string while the API returns an integer. This SDK is not affected (department records and the nested department on AgencyRecord are untyped JSON); wire tests now pin both shapes.
  • CI: the 1.80 test jobs were running stable, because rust-toolchain.toml overrides the toolchain the action installs. The job now sets RUSTUP_TOOLCHAIN, the lockfile is re-resolved for the 1.80 floor, and .cargo/config.toml keeps later cargo update runs MSRV-aware.

Not in this PR

  • G2X (/api/events/, /api/news/, /api/company/rag/), the canonical /api/webhooks/subscriptions/ CRUD, and account-usage endpoints, matching what the other SDKs cover.
  • Typed filter fields on the award sub-resource lists (entity / agency / IDV / vehicle sub-routes). Those filters are reachable today through each options builder's extra map.

Test plan

  • cargo fmt --all --check
  • cargo clippy --workspace --all-features --all-targets -- -D warnings
  • cargo test --workspace --all-features on stable and on 1.80 (315 tests, including a new httpmock wire suite for every added route)
  • RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --workspace
  • cargo publish --dry-run for makegov-tango and makegov-tango-webhooks

🤖 Generated with Claude Code

~ Mark

vdavez and others added 3 commits September 23, 2026 10:03
Add the budget surface (/api/budget/accounts/ list/retrieve/quarters/
recipients), singleton detail GETs (contract/opportunity/notice/forecast/
grant/subaward), contract sub-routes (subawards/transactions), entity
budget-flows, and grant_id + cage filters. Remove the fabricated
get_idv_summary / list_idv_summary_awards methods (paths never existed
upstream; breaking but free pre-1.0).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds the resources the sibling SDKs cover and this one did not: DIBBS (RFQs, RFPs, awards), SAM exclusions, and SBIR/STTR topics and solicitations, each with list/get/iterate, options builders naming every filter the API accepts, and a suggested shape.
Gives the budget sub-routes and entity budget flows their own options (`tas`, `funding_organization_id`, `fiscal_year`), which the shared `ListOptions` could not send, and aligns `SHAPE_BUDGET_ACCOUNTS_MINIMAL` with the API's default shape.
Names the list filters the API accepts that the SDK did not: `key` on the award families, `notice_id` / `department` / `office` on notices, `opportunity_id`, forecast `id`, `previous_uii`, SLED `verbose`, and the budget identity filters.
Deprecates `search_opportunity_attachments`, whose endpoint the API retired (404 for every query).
Corrects the `cage` doc (an alias of `cage_code`, not a distinct filter), the department-code doc (an integer), and the child-IDV path in the API reference.
Adds httpmock wire tests for every new route, plus the integer department code on `get_department` and on `get_agency`'s nested department.
Rewrites the Unreleased changelog into one section per heading, with the removed IDV summary methods under Breaking.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
rust-toolchain.toml pins `stable`, and rustup prefers it over the toolchain the action installs, so the 1.80 matrix entries have been running stable.
The job now sets `RUSTUP_TOOLCHAIN` from the matrix.
The lockfile is re-resolved for the 1.80 floor (several transitive crates had moved to edition 2024, which Cargo 1.80 cannot parse), and `.cargo/config.toml` keeps future `cargo update` runs MSRV-aware.
`quinn-proto` is pinned to 0.11.15 to clear the advisory; reqwest's HTTP/3 feature is off, so it is never compiled.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@vdavez
vdavez force-pushed the feat/api-sync-v0.2.0 branch from 39b1256 to 7ba0de5 Compare September 23, 2026 15:28
@makegov-mark makegov-mark Bot changed the title Sync to Tango API v4.6.9: budget surface, singleton GETs, drop fabricated IDV summary (v0.2.0) Sync to the current Tango API: budget, DIBBS, exclusions, SBIR, detail GETs, filter parity (v0.2.0) Sep 23, 2026
@vdavez
vdavez marked this pull request as draft September 23, 2026 15:29
vdavez and others added 2 commits September 23, 2026 10:36
The API retired `/api/opportunities/attachment-search/`, which returns 404 for every query, and 0.2.0 already breaks the API surface, so the method and `SearchOpportunityAttachmentsOptions` go now instead of carrying a deprecation.
`list_opportunities` with `search` matches attachment text and returns a `snippet` for the hit.
The changelog entry moves from Deprecated to Breaking.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@vdavez
vdavez marked this pull request as ready for review September 23, 2026 15:42
@vdavez
vdavez merged commit 2dd123c into main Sep 23, 2026
9 checks passed
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