Repository navigation
fix(protests): decode the real GetProtest payload; add delisted_at to SLED presets - #8
Merged
Merged
Conversation
…n presets GetProtest could not decode any response carrying agency or protester, because ProtestRecord typed them as maps while the API returns strings. ProtestRecord now mirrors the API's protest case fields: Agency and Protester are strings, Docket becomes Dockets (tagged dockets), and the missing scalar fields plus the organization, decisions and resolved_* expands are added. This is a breaking change for callers that read the old map fields or Docket. Also: - ListProtestsOptions gains NaicsCode (SBA OHA size and NAICS appeals). - GetProtest docs say the route takes the UUID case_id, not a case number; protest docs name GAO, COFC and SBA OHA. - The SLED opportunity presets include delisted_at, matching the API's default shapes. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
GetProtestnow decodes a real response.ProtestRecord.Agencyand.Protesterweremap[string]any, but the API returns strings, so any response carrying them (every unshaped call) failed withjson: cannot unmarshal string into Go struct field ProtestRecord.protester.ProtestRecordnow mirrors the API's protest case fields:Agency/Protesterare strings,Docket(taggeddocket) becomesDockets(taggeddockets, the API's name), and the missing fields are added:Title,SolicitationNumber,PostedDate,DueDate,DocketURL,DecisionURL,Organization,Decisions, plus the opt-inChallengedParty,NaicsCode,SizeStandard,OutcomeReason,Judge,Digest,DecisionText.ListProtestsOptions.NaicsCodeadded (SBA OHA size and NAICS appeals).GetProtestdocs: the route takes the UUIDcase_id, not a case number; look a case up by number viaListProtests+CaseNumber. Protest docs now name GAO, COFC and SBA OHA.ShapeSledOpportunitiesMinimal/ShapeSledOpportunitiesComprehensiveincludedelisted_at, matching the API's default SLED shapes.Breaking
ProtestRecord.Agency,.Protesterchange type and.Docketis renamed.Dockets.Callers reading those fields must update; since the old types could never decode a real response, working code is unlikely to depend on them.
Noted under
[Unreleased]→ Changed in the CHANGELOG.Testing
TestGetProtestDecodesDetailPayloaddecodes a realistic detail payload (stringagency/protester, adocketsarray,decisions,resolved_agency, nulls).tango: decode response; with this change it passes.go vet ./...,go test -race ./...andgolangci-lintv1.64.8 (the CI line) are clean.Relationship to other open PRs
maininCHANGELOG.md; this PR's[Unreleased]additions touch the same section, so the rebase of v0.2.0: budget, exclusions, DIBBS, SBIR, singleton GETs; drop fabricated IDV summary and retired attachment search #5 will resolve both at once. No code files conflict.🤖 Generated with Claude Code