fix: accept doc_role, SLED delisting and protest fields the API serves - #20
Merged
Merged
Conversation
Shaping `attachments(name,doc_role,doc_role_alt)` on opportunities and notices, and `delisted_at` or `meta(jurisdiction_declared)` on SLED solicitations, threw `ShapeValidationError` client-side even though the API returns all of them. The vendored contract is refreshed to Tango API 5.1.0 and the overlay regenerated. The overlay generator now merges two walks that reach the same model's expand instead of letting the later, narrower one replace the earlier one; that replacement is what dropped `doc_role` from the opportunity attachment schema. The SLED fields join the curated schemas with their real types, and the model interfaces gain `delisted_at`, `jurisdiction_declared` and a typed `OpportunityAttachment` with the six document roles. `ProtestRecord` now types `agency` and `protester` as the strings the API returns, and `getProtest` documents that it takes the `case_id` UUID rather than a case number. Contract appeals and eBuy requests are in the refreshed contract without SDK methods yet, so both are baselined as tracked gaps. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
vdavez
marked this pull request as ready for review
September 23, 2026 13:45
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
The SDK's client-side shape validator rejected fields the API already serves, and a few protest types and docs did not match the API.
attachments(name,doc_role,doc_role_alt)ongetOpportunity,listOpportunities,getNoticeandlistNoticesthrewShapeValidationError.delisted_atandmeta(jurisdiction_declared)on SLED solicitations threwShapeValidationError.ProtestRecordtypedagencyandprotesteras objects; the API returns strings.getProtestwas documented as taking a case number, but the route only accepts thecase_idUUID.How
contracts/filter_shape_contract.jsonfor Tango API 5.1.0 and regeneratedsrc/shapes/generatedOverlay.ts.doc_rolestayed missing from the opportunity attachment schema even with a fresh contract. Existing field types are unchanged.delisted_at(datetime) andmeta.jurisdiction_declared(bool) to the curated SLED schemas, so they get their real types rather than name-heuristic ones.OpportunityAttachmentandAttachmentDocRole(the six roles), used onOpportunityandNotice;SledOpportunity.delisted_at;SledMetaPayload.jurisdiction_declared;status_reasondocs listdelisted.ProtestRecord:agencyandprotesterarestring | null; addedtitle,docket_url,decision_url,organization,dockets,decisions; deprecated the never-serveddocket.getProtest(caseId): renamed the parameter, documented the UUID-only route and how to find a case by number.listProtestsdocs now name GAO, COFC and SBA OHA.nulland baselined as tracked gaps in the two conformance gates.Testing
tests/unit/client.shape-parity.test.tsshapesattachments(name,doc_role,doc_role_alt)through all four opportunity/notice methods anddelisted_at+meta(jurisdiction_declared)through both SLED methods against a stubbed response. All 6 fail onmainwithShapeValidationErrorand pass on this branch.getProtesttest now asserts the request path and stringagency/protester.npx vitest run(402 passed),npm run lint,npm run typecheck,npm run build,npm run check-conformance(0 errors),npm run check-shape-coverage(0 new), and a rerun ofnpm run generate-shape-overlayleaves no diff.Relationship to #19
This branch conflicts textually with #19 in two places:
README.md(the protests/appeals method list) andscripts/check-filter-shape-conformance.ts(contract_appeals: nullhere vs"listContractAppeals"there). Whichever lands second should keep #19's mapping, dropcontract_appealsfrom both baselines, and rerunnpm run generate-shape-overlay.CHANGELOG.md,src/types.ts,src/client.tsandsrc/shapes/explicitSchemas.tsmerge cleanly.🤖 Generated with Claude Code