Skip to content

Add contract_definition as single source of truth for check metadata#21

Merged
Jamestth merged 3 commits intomainfrom
fix/missing-contract-definitions-for-checks
Apr 17, 2026
Merged

Add contract_definition as single source of truth for check metadata#21
Jamestth merged 3 commits intomainfrom
fix/missing-contract-definitions-for-checks

Conversation

@Jamestth
Copy link
Copy Markdown
Contributor

@Jamestth Jamestth commented Apr 16, 2026

Summary

  • Previously CheckResult metadata selectively cherry-picked contract definition fields (description, dimension, severity, type, unit), meaning new ODCS schema fields (e.g. tags, customProperties, authoritativeDefinitions) were silently dropped.
  • This fix attaches the full raw ODCS quality entry as metadata["contract_definition"] — the single source of truth for all contract fields, without any filtering or editing.
  • Computed/derived fields (check_path, target, operator, is_generated, engine, etc.) remain at the top level of metadata, clearly separated from contract data.
  • Renames ambiguous metadata fields for clarity:
    • schemaschema_name (avoids confusion with DB schema)
    • rulerendered_implementation (covers both SQL query and custom implementation after vowl transforms)

Breaking changes

  • metadata["schema"]metadata["schema_name"]
  • metadata["rule"]metadata["rendered_implementation"]
  • metadata["description"], metadata["dimension"], metadata["severity"], metadata["type"], metadata["unit"] removed from top-level metadata — now accessible via metadata["contract_definition"]["description"] etc.
  • CSV/DataFrame export columns reflect these renames and now include all contract fields (e.g. tags, businessImpact)

@Jamestth Jamestth requested a review from a team April 16, 2026 15:55
@Jamestth Jamestth marked this pull request as draft April 16, 2026 15:55
@Jamestth Jamestth changed the title Add "contract_definition" field as the single source of truth for contract definition Add contract_definition as single source of truth for check metadata Apr 16, 2026
@Jamestth Jamestth marked this pull request as ready for review April 16, 2026 17:17
@Jamestth Jamestth merged commit f09fd27 into main Apr 17, 2026
7 checks passed
@Jamestth Jamestth deleted the fix/missing-contract-definitions-for-checks branch April 17, 2026 07:05
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.

2 participants