Repository navigation
feat(client-contract): admit without_party_totals in a ref's artifact rendering - #17
Merged
Merged
Conversation
… 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.
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.
dataset-ref.schema.jsonclosesmembers[].artifact.renderingwithadditionalProperties: falseand admits onlyformat,bundleandlayout. The Datasets API mints a version withMintOptions.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}besidelayout. The key is written only when true, so every existing plain ref keeps its bytes andfalseis refused.refs/ref-without-party-totals.jsonis the accepted example andrefs/ref-without-party-totals-false-rejected.jsonpinsfalseas a schema error. Both reuse thefetch-spec-known-sentencescenario 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.pyprintedclient contract valid: 101 action rows, 23 client codes, 29 required and 8 enum pointers, 118 scenarios.pytest tools/testspassed 517 tests; inpython/client-contract,pytestpassed 78, andruff check,ruff format --checkandty checkpassed.