Conversation
…ning Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Copilot <copilot@github.com>
nicolejh19
approved these changes
Apr 28, 2026
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.
Problem
get_check_results_df()had two issues with how it handledcontract_definition:Flattened into top-level columns — contract definition fields were spread as individual columns in the check results CSV. Since these fields vary based on how the contract is defined, the column set was not stable across different contracts.
Contained the generated check definition, not the raw contract content — for user-authored SQL checks this was invisible (both are the same dict), but for auto-generated checks (e.g.
logicalType,logicalTypeOptions) thecontract_definitionshowed a fully synthesised SQL check object instead of the raw contract value at the JSONPath. For example, alogicalTypeOptions.minLengthcheck at path$.schema[0].properties[1].logicalTypeOptions.minLengthwould show:{ "name": "payroll_id_logical_type_options_minLength_check", "type": "sql", "query": "SELECT COUNT(*) ...", "mustBe": 0 }instead of the actual contract content:
{"value": 36}.Changes
New
check_definitionfieldContains the resolved/generated check dict (what was previously called
contract_definition). For generated checks, a"vowl_generated_check"tag is appended totagsso consumers can distinguish generated checks programmatically.contract_definitionnow contains raw contract contentResolved directly from the contract YAML via the check's JSONPath. For user-authored quality checks, this is the original ODCS quality entry. For generated checks, it's the raw value at the path (e.g.
{"value": 36}for a scalar likeminLength).Separate opt-in flags on
get_check_results_df()andsave()include_check_definition— appends thecheck_definitionJSON columninclude_contract_definition— appends thecontract_definitionJSON columnFalse(previouslycontract_definitionwas flattened into top-level columns by default)Files changed
src/vowl/contracts/check_reference_base.pycheck_definitiontoCheckResultMetadata, newget_raw_contract_definition()method,vowl_generated_checktag for generated checkssrc/vowl/contracts/check_reference_library_metrics.pycheck_definitioninstead ofcontract_definitionsrc/vowl/validation/result.pyinclude_check_definition/include_contract_definitionflags, no longer flattens contract fields into top-level columnstests/conftest.py_is_expected_errorreads fromcheck_definitioncheck_definitionBreaking changes
contract_definitionfields (likequery,mustBe,tags) into top-level columns. These are now only available as JSON inside thecheck_definition/contract_definitioncolumns when opted in.metadata["contract_definition"]to access the resolved check dict should now usemetadata["check_definition"].