Skip to content

chore(contract): follow spec-kit 4ad7739 and its recaptured served document - #29

Merged
jm-rivera merged 1 commit into
mainfrom
chore/contract-4ad7739
Nov 1, 2026
Merged

jm-rivera merged 1 commit into
mainfrom
chore/contract-4ad7739

Conversation

@jm-rivera

Copy link
Copy Markdown
Contributor

contract/SOURCE moves to spec-kit 4ad7739, the commit dfo-apis dev pins. Its served document is captured from dfo-apis ccb661792, so the wire types gain EnrichmentOptionModel.in_long_layout, which the website's download dialog needs, along with the analysis, derived, export, frame and share routes and the description's source_codes.

Changes

  • python/src/dfo/_generated/wire.py and typescript/src/generated/openapi.ts are regenerated from the new document.
  • error_map.py and actions.ts gain licence_not_redistributable and provenance_unavailable, the export route's refusals, with the action stop. python/docs/errors.md lists both under PermissionDeniedError, which test_errors.py checks. No SDK call reaches the export route.
  • The re-recorded answers read "Kenya's deaths rate per 1,000 people", which matches their unit "Deaths per 1,000 people". They used to read "per capita". typescript/test/data/answer-choose-candidate-two-parts.json is written again from the recording, and two label expectations in answer.test.ts follow.
  • In answer-definite-fetch the answer has no alternative measures, so the nested-spec test in strict.test.ts builds one from the part's own definition without its spec_id.
  • test_wire_coverage.py maps WarningModel's new unserved_members, withheld_members and withheld_provenances to no Notice attribute, as it maps their siblings.

Testing: Python ruff, format, ty, lint-imports, the three generator checks, pytest (4,237 passed) and the family doctor pass. TypeScript lint, typecheck, generate:check, tests (2,064 passed) and build pass. check_contract_pin.py passes against the dfo-apis dev pyproject.

…cument

contract/SOURCE moves to spec-kit 4ad7739, whose served document comes
from dfo-apis ccb661792. The regenerated wire types gain
EnrichmentOptionModel.in_long_layout, the analysis, derived, export,
frame and share routes, and the description's source_codes. The error
maps gain licence_not_redistributable and provenance_unavailable, both
PermissionDeniedError with the action stop, which python/docs/errors.md
lists.

The re-recorded answers read "deaths rate per 1,000 people" where they
read "per capita", matching their unit, so the answer fixture and two
label expectations follow. answer-definite-fetch now holds no
alternative measure, so the nested-spec strict test builds one from the
part's own definition. The Notice coverage map leaves WarningModel's
unserved_members, withheld_members and withheld_provenances unread, as
it leaves their siblings.
@jm-rivera
jm-rivera marked this pull request as ready for review November 1, 2026 18:05
@jm-rivera
jm-rivera merged commit 82701c8 into main Nov 1, 2026
7 checks passed
@jm-rivera
jm-rivera deleted the chore/contract-4ad7739 branch November 1, 2026 18:06
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