Live demo and source
- Live judge demo: https://datahub-context-guardian.vercel.app/
- Public Apache-2.0 source: https://github.com/gother111/datahub-context-guardian
- Demo mode: synthetic fixture; no live DataHub tenant is claimed
Inspiration
Schema migrations often pass syntax checks and still break the business. A dropped column can feed an executive dashboard, an ML model, a privacy control, and dozens of SQL queries that the code repository cannot see. DataHub already holds the missing context. The opportunity was to turn that context into a reliable pre-merge decision, not another catalog search interface.
What it does
Context Guardian is a schema-change firewall powered by DataHub MCP. Give it a structured proposal or a supported ALTER TABLE statement and it:
- resolves the exact dataset in DataHub;
- reads schema, ownership, tags, glossary terms, documentation, and domain context;
- traces the downstream graph to three hops;
- enriches affected datasets, dashboards, charts, and ML assets in one batch;
- checks real manual and system query history for changed-column references;
- returns a deterministic
ALLOW,REVIEW, orBLOCKdecision; - generates a PR comment, review report, compatibility migration plan, and evidence digest; and
- with explicit approval, saves the decision back to DataHub as durable knowledge.
The bundled demo proposes dropping a PII-classified customer_email column from a certified Tier 1 customer dataset. Context Guardian finds five downstream assets, including an executive dashboard and production ML model, plus two observed queries. It blocks the merge and generates an expand/contract plan with the owners who need to approve it.
How we built it
The application is Node.js 20+ and uses the official @modelcontextprotocol/sdk Streamable HTTP client. It connects directly to a DataHub Core or DataHub Cloud MCP endpoint and composes search, get_entities, list_schema_fields, get_lineage, and get_dataset_queries. The optional approved write step uses save_document.
The transport layer normalizes structured MCP responses into a stable evidence contract. A deterministic policy engine then scores explicit facts such as operation severity, downstream reach, dashboard and ML exposure, sensitive classifications, criticality, ownership gaps, and observed SQL usage. It produces a SHA-256 evidence digest so the same proposal and context can be reproduced.
For judge-friendly testing, the repository includes a zero-key synthetic fixture modeled on DataHub's Apache-2.0 showcase graph. It exercises the exact orchestration and policy path without requiring a service. The real MCP adapter is available with environment configuration, and tokens are never stored or logged.
What makes it original
DataHub can already search and visualize lineage. Context Guardian does not rebuild those features. It composes them into a counterfactual merge control: “If this proposed change happens, what organizational promises break, who must act, and what compatibility path makes it safe?” The output is immediately usable in a pull request, while the approved decision can flow back into DataHub for future agents.
Challenges
- MCP results can differ across DataHub versions and transports. The normalizer supports both structured content and JSON text responses.
- A graph edge alone is not enough for a decision. We batch-enrich downstream assets to recover owners and types, then combine that with column classifications and query evidence.
- Automation around metadata writes needs a strong safety boundary. The web demo is read-only, and CLI write-back requires an environment gate plus an explicit approval flag.
- Missing metadata must not be interpreted as safety. The engine reports ownership and lineage gaps rather than silently lowering risk.
Accomplishments
- A complete read → act → write DataHub workflow with no LLM or paid API dependency.
- Deterministic, auditable decisions with a stable evidence digest.
- Five generated artifacts that judges can inspect without running the project.
- A polished visual demo and CI-friendly CLI.
- Twelve automated tests covering parsing, policy, MCP normalization, mutation gates, and the full HTTP path.
- A proposed
datahub-change-impactskill contribution that turns the workflow into reusable agent instructions.
What we learned
The most valuable context is not a longer prompt. It is a compact, attributable graph of schema facts, production usage, governance commitments, and accountable owners. DataHub makes those facts available; reliable agents still need explicit policy, provenance, and approval boundaries to act on them safely.
What's next
- Parse dbt manifest diffs and GitHub pull-request changes directly.
- Use column-level lineage paths for exact consumer mapping.
- Add configurable policy packs for finance, healthcare, and GDPR controls.
- Publish the
datahub-change-impactskill upstream to the DataHub Skills registry. - Record approved change digests as structured properties for long-term auditability.
Technologies
DataHub, DataHub MCP Server, Model Context Protocol, Node.js, JavaScript, HTML, CSS
Testing instructions for judges
git clone https://github.com/gother111/datahub-context-guardian.git
cd datahub-context-guardian
npm ci
npm run demo
npm test
npm run serve
Open http://127.0.0.1:4173, select Trace impact, and review the decision, graph evidence, remediation checklist, and MCP provenance. Generated files are available in examples/outputs/.
For zero-install judging, open https://datahub-context-guardian.vercel.app/, select Trace impact, and review the same fixture-mode decision. The stable deployment and its /api/health, /api/sample, and /api/analyze paths were verified publicly against source commit c5e9c63539eeae9abfdfca246076982752764bb2 on August 1, 2026. This public demo is fixture mode and does not claim a live DataHub tenant.
To use a real DataHub instance, set DATAHUB_MODE=mcp, DATAHUB_MCP_URL, and DATAHUB_TOKEN, then run the CLI as documented in the README.
AI assistance disclosure
OpenAI Codex was used as a permitted AI coding assistant for research, implementation, testing, and documentation during the submission period. The entrant must review the code, confirm ownership, run the final tests, and accurately describe their own role before submitting.
Built With
- css
- datahub
- datahub-mcp-server
- html
- javascript
- model-context-protocol
- node.js