Skip to content

feat(client-contract): admit without_party_totals in a ref's artifact rendering - #17

Merged
jm-rivera merged 1 commit into
devfrom
feat/ref-without-party-totals
Oct 23, 2026
Merged

jm-rivera merged 1 commit into
devfrom
feat/ref-without-party-totals

Conversation

@jm-rivera

Copy link
Copy Markdown
Contributor

dataset-ref.schema.json closes members[].artifact.rendering with additionalProperties: false and admits only format, bundle and layout. The Datasets API mints a version with MintOptions.without_party_totals, and the SDK clients are adding that option, so a ref to such a version would fail the contract's own schema in either language.

The selector now takes without_party_totals: {"const": true} beside layout. The key is written only when true, so every existing plain ref keeps its bytes and false is refused. refs/ref-without-party-totals.json is the accepted example and refs/ref-without-party-totals-false-rejected.json pins false as a schema error. Both reuse the fetch-spec-known-sentence scenario and its plain artifact digest. The validator checks a ref member against its scenario's members and downloads but does not compare the rendering, and no recorded scenario downloads a cut artifact, so the accepted example is schema-level only. The README's DatasetRef paragraph and the CHANGELOG name the key and both examples.

Testing: uv run tools/validate_client_contract.py printed client contract valid: 101 action rows, 23 client codes, 29 required and 8 enum pointers, 118 scenarios. pytest tools/tests passed 517 tests; in python/client-contract, pytest passed 78, and ruff check, ruff format --check and ty check passed.

… rendering

dataset-ref.schema.json closes the rendering selector with
additionalProperties false, so a ref to a version minted with
without_party_totals could not be written by either client. The
selector now takes without_party_totals: true beside layout. The key
is written only when true, so a plain ref keeps its bytes and false
is refused. ref-without-party-totals is the accepted example and
ref-without-party-totals-false-rejected pins false.
@jm-rivera
jm-rivera merged commit ca98b11 into dev Oct 23, 2026
19 checks passed
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