Skip to content

feat(client-contract): recapture the served document and re-record at apis ccb661792 - #44

Merged
jm-rivera merged 2 commits into
devfrom
chore/served-in-long-layout
Nov 1, 2026
Merged

jm-rivera merged 2 commits into
devfrom
chore/served-in-long-layout

Conversation

@jm-rivera

Copy link
Copy Markdown
Contributor

The client contract's served document and every recorded scenario now come from dfo-apis ccb661792, the current dev deploy. The document gains EnrichmentOptionModel.in_long_layout, a boolean, false by default, that is true when a long-layout download writes the enrichment with no columns token, so the clients can type it. It also gains the 14 analysis, derived, export, frame and share routes and their 71 schemas, which earlier changes to this contract registered codes for without capturing them.

Changes

  • tools/capture_client_contract.py: record --cloud-run-token sends the gcloud account's Google ID token in X-Serverless-Authorization to the base URL's origin and mints a new one every 45 minutes, because dfo-dev-apis refuses anonymous callers and an unauthenticated record gets 403. Signed storage URLs get no token, and no record holds it. The two READMEs give the flag.
  • served/openapi.json and served/SOURCE.json: captured in process from ccb661792.
  • scenarios/: all 34 recorded scenarios re-recorded against dev at ccb661792, and the 92 synthetic ones derived again.
  • refs/ref-one-member.json: follows fetch-spec-party-totals-kept to its new spec, version and file.
  • CHANGELOG.md and test_the_long_build_scans_start_after_the_recorded_picks: the new commit, sizes and long-build start years (1968 and 1969).

Notes for reviewers

Search on dev now binds "ODA disbursements" to nettingBasis Net where it bound Gross, so the party-totals scenarios, the long builds and ref-one-member name Net specs and say "Net disbursements". The scenarios still pin the party-totals cut and the async build. Check whether Net is the intended reading for that question.

The SDK can follow this only after dfo-apis pins spec-kit at or past this commit, since scripts/check_contract_pin.py holds contract/SOURCE to that pin.

Testing: uv run tools/validate_client_contract.py reports the contract valid with 126 scenarios, pytest tools/tests passes (625), python/client-contract passes 244 tests with ruff clean, and the registry, unit and vector validators pass. The token transport has a test that checks the token reaches the API origin only and is minted again after 45 minutes.

dfo-dev-apis refuses anonymous callers, so `record` against dev answered
403 on every request. `record --cloud-run-token` mints the gcloud
account's Google ID token, sends it in `X-Serverless-Authorization` on
each request to the base URL's origin, and mints a new one every 45
minutes. Signed storage URLs get no token, and no record holds it.
… apis ccb661792

served/openapi.json comes from dfo-apis ccb661792, and every recorded
scenario from its dev deploy. The document gains the analysis, derived,
export, frame and share routes (14 paths, 71 schemas) and
EnrichmentOptionModel.in_long_layout, true when a long-layout download
writes the enrichment with no columns token.

Search now binds the ODA disbursement questions to net flows, so
ref-one-member follows fetch-spec-party-totals-kept to its Net spec,
version and file. The long builds moved to 1968 and 1969.
@jm-rivera
jm-rivera marked this pull request as ready for review November 1, 2026 09:48
@jm-rivera
jm-rivera merged commit 9666b93 into dev Nov 1, 2026
22 checks passed
@jm-rivera
jm-rivera deleted the chore/served-in-long-layout branch November 1, 2026 09:55
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