Repository navigation
examples(governance): add dbt-backed data quality evidence flow - #2278
Conversation
🤖 AI Agent: breaking-change-detector — API CompatibilityAPI CompatibilityNo breaking changes detected. |
🤖 AI Agent: docs-sync-checker — Docs SyncDocs Sync
Documentation is otherwise in sync. |
🤖 AI Agent: code-reviewer — View detailsTL;DR: 0 blockers, 1 warning. Example code is well-structured and adheres to project standards, but lacks automated tests.
Action items:
|
🤖 AI Agent: test-generator — `data_quality_evidence.py`
|
🤖 AI Agent: security-scanner — View detailsNo security issues found. |
PR Review Summary
Verdict: |
Nishar Miya (miyannishar)
left a comment
There was a problem hiding this comment.
Hey Somesh Zanwar (@SomeshZanwar), the implementation is solid — the DataQualityEvidence dataclass is well-written, the dbt adapter is clean, and you followed the direction from the discussion exactly on the core requirements (example-level, no core package changes, no new dependencies, dbt fixtures as input). Good work on all of that.
One thing to revisit though. In the discussion you said:
"I'll draft a standalone example... I'll keep it self-contained"
And what landed replaces the existing generic example.py and README.md rather than sitting alongside them. The original example was tool-agnostic — it showed the two-layer governance pattern without prescribing dbt, Great Expectations, or any specific framework. That generic entry point has value for people who aren't using dbt.
Can you restructure so the original stays intact and the dbt-specific work lives in its own subdirectory?
examples/data-quality-aware-governance/
├── example.py ← original generic example (restored)
├── README.md ← original tool-agnostic docs (restored)
├── policy.yaml
└── adapters/
└── dbt/
├── README.md ← dbt-specific docs
├── dbt_adapter.py
├── data_quality_evidence.py
└── fixtures/
├── dbt_run_results_pass.json
└── dbt_run_results_fail.json
That way the generic pattern stays as the entry point, dbt is clearly positioned as one concrete adapter, and future contributors can add a great-expectations/ or soda/ adapter in the same pattern. This is also what "standalone" implied in the discussion.
The DataQualityEvidence dataclass and dbt_adapter.py are good as-is — no changes needed there, just the structural placement.
Two minor things while you're at it:
- Both
data_quality_evidence.pyanddbt_adapter.pyare missing a trailing newline (the diff shows\ No newline at end of file) — will likely fail the linter _parse_timestampstrips theZsuffix producing a naive datetime — fine for the example scope, but worth a one-line comment saying this is intentional
|
Also pls address the CI failures :) |
60fb68e to
73159ec
Compare
|
Thanks for the review. I restructured the PR so the generic
Also removed the hash/crypto usage, added the timestamp parsing comment, fixed whitespace, and amended the commit with DCO signoff. |
Imran Siddique (imran-siddique)
left a comment
There was a problem hiding this comment.
Example-only, no core changes. Code structure looks good. Pending items from prior review: add docstring to \load_from_dbt_run_results(), changelog entry, and tests for the adapter. Once those are addressed, this is ready to merge.
Imran Siddique (imran-siddique)
left a comment
There was a problem hiding this comment.
TL;DR: 0 blockers, 1 warning. Example-only scope, looks clean.
| Sev | Issue | Location |
|---|---|---|
| Warn | Spell-check CI failing - check for typos in new files | adapters/dbt/*.py, README |
Self-contained example under examples/, no core package changes. Fix spell-check and this is good to merge.
|
Hey Somesh Zanwar (@SomeshZanwar) — are you still working on this? Would love to see it land. Let me know if the review feedback needs clarification. |
|
Thanks, Imran. Yes, still working on it. I’ll address the remaining items now:
I’ll push a small follow-up commit once those are done. |
Signed-off-by: SomeshZanwar <someshzanwar345@gmail.com>
Signed-off-by: SomeshZanwar <someshzanwar345@gmail.com>
0054fac to
a8b9eae
Compare
Imran Siddique (imran-siddique)
left a comment
There was a problem hiding this comment.
TL;DR: 0 blockers, approve.
Good example showing dbt run_results.json -> DataQualityEvidence -> policy decision flow. Clean structure under examples/data-quality-aware-governance/adapters/dbt/. Minor nit: cspell terms are appended unsorted but CI doesn't enforce ordering on the tail, so not blocking.
|
Thanks, Imran. Appreciate the review and approval. |
34aefab
into
microsoft:main
…osoft#2278) * examples(governance): add dbt-backed data quality evidence flow Signed-off-by: SomeshZanwar <someshzanwar345@gmail.com> * docs(examples): address dbt evidence review feedback Signed-off-by: SomeshZanwar <someshzanwar345@gmail.com> --------- Signed-off-by: SomeshZanwar <someshzanwar345@gmail.com>
Description
Extends the existing
examples/data-quality-aware-governance/example with a dbt-backedDataQualityEvidenceflow, per maintainer direction in Discussion #2261.This keeps the evidence shape local to the example and does not introduce any core package model or AGT runtime behavior change.
What this adds:
DataQualityEvidence— an example-local frozen dataclass representing dataset quality state at time of agent accessdbt_adapter.py— maps dbtrun_results.jsonoutput into typed data quality evidencefixtures/— synthetic dbt pass/fail run result artifactsexample.py— wires AGT policy evaluation plus dbt-backed data quality evidence into a final allow/block decisionREADME.md— documents the flow, fields, scenarios, and non-goalsScenarios demonstrated:
ALLOWEDBLOCKEDat data quality layerBLOCKEDat AGT policy layerNo core package changes. No new dependencies.
Type of Change
Package(s) Affected
Checklist
Attribution & Prior Art
Prior art / related projects:
examples/data-quality-aware-governance/AI Assistance
If AI tools materially shaped this change, briefly note what was used:
ChatGPT was used for planning, drafting assistance, and step-by-step implementation support. I reviewed the files, ran the example manually, checked compilation, and verified the diff before submitting.
IP, Patents, and Licensing
Related Issues
Addresses Discussion #2261.
Extends PR #2224.