Skip to content

fix(protests,sled): match the API's protest enum casing, add naics_code, carry delisted_at in SLED shapes - #6

Merged
vdavez merged 1 commit into
mainfrom
fix/api-parity-5.0
Sep 23, 2026
Merged

vdavez merged 1 commit into
mainfrom
fix/api-parity-5.0

Conversation

@makegov-mark

@makegov-mark makegov-mark Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

What

  • Protests: enum casing now matches what the API returns. The rustdoc on ListProtestsOptions and ProtestRecord showed source_system as "GAO" / "COFC" and outcome as "sustained". The API returns lowercase sources (gao, cofc, sba_oha) and title-case outcomes (Denied, Dismissed, Withdrawn, Sustained, plus Granted, Remanded, Reversed, Vacated for SBA OHA). Filters are case-insensitive, so queries worked, but code comparing returned values against the documented examples would never match. Test fixtures now use the real casing too.
  • Protests: SBA OHA is named as a source in the module doc, the model doc and docs/API_REFERENCE.md.
  • Protests: new naics_code option on ListProtestsOptions, the one API protest filter the SDK lacked. Only SBA OHA size and NAICS appeals carry a code, so GAO and COFC records never match.
  • Protests: agency rustdoc now says what the filter accepts (name, abbreviation or code, | for multiple values).
  • SLED: delisted_at in both suggested opportunity shapes, matching the API's own list and detail defaults, with a note on how it drives status_reason = "delisted".

Tests

  • list_protests_naics_code_emits: naics_code serializes to the naics_code query param. Fails to compile on main (no such builder method); passes here.
  • suggested_opportunity_shapes_carry_delisted_at: both SHAPE_SLED_OPPORTUNITIES_* constants name delisted_at. Fails on main; passes here.
  • just ci equivalent is green: cargo fmt --all -- --check, cargo clippy --workspace --all-features --all-targets -- -D warnings, cargo test --workspace.

Relationship to open PRs

🤖 Generated with Claude Code

…de, carry delisted_at in SLED shapes

The protests rustdoc showed `source_system` as `"GAO"`/`"COFC"` and `outcome` as `"sustained"`, but the API returns lowercase sources (`gao`, `cofc`, `sba_oha`) and title-case outcomes (`Sustained`, `Denied`, ...).
Filters are case-insensitive, so queries worked, but code comparing returned values against the documented examples would miss every match.
The protests module doc now names SBA OHA alongside GAO and COFC, and lists its extra outcomes.

`ListProtestsOptions` gains `naics_code`, the one protest filter the SDK was missing; it matches the NAICS code at issue in SBA OHA size and NAICS appeals.

`SHAPE_SLED_OPPORTUNITIES_MINIMAL` and `_COMPREHENSIVE` now include `delisted_at`, as the API's own list and detail default shapes do.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@makegov-mark makegov-mark Bot added the bug Something isn't working label Sep 23, 2026
@vdavez
vdavez marked this pull request as ready for review September 23, 2026 13:50
@vdavez
vdavez merged commit e16b806 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

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant