Report a missing entity source beside a licensed one.
All checks were successful
synthetic / suite (push) Successful in 1m2s
All checks were successful
synthetic / suite (push) Successful in 1m2s
Assistant: grok Assistant-Session: 01a1531b-6698-7732-8587-f28ea604bcdf
This commit is contained in:
parent
70054ee7cc
commit
8bcb3414d7
4 changed files with 33 additions and 7 deletions
|
|
@ -140,14 +140,14 @@ def quality_report(
|
|||
entity_id = str(entity.get("id") or "")
|
||||
records += 1
|
||||
refs = list(entity.get("sourceRefs") or [])
|
||||
if provenance_ok(refs):
|
||||
missing_refs = [ref for ref in refs if ref not in known_source_ids]
|
||||
for ref in missing_refs:
|
||||
unresolved.append({"id": entity_id, "field": "sourceRefs", "target": str(ref)})
|
||||
failures.append(_failure("unresolved-reference", entity_id, str(ref)))
|
||||
if provenance_ok(refs) and not missing_refs:
|
||||
complete += 1
|
||||
else:
|
||||
incomplete.append(entity_id)
|
||||
for ref in refs:
|
||||
if ref not in known_source_ids:
|
||||
unresolved.append({"id": entity_id, "field": "sourceRefs", "target": str(ref)})
|
||||
failures.append(_failure("unresolved-reference", entity_id, str(ref)))
|
||||
if entity.get("state") == "stale":
|
||||
stale_ids.append(entity_id)
|
||||
failures.append(_failure("stale", entity_id, "state"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue