Summary
uc_tag_sync propagates a concept's IRI to a UC governed tag ONLY when the concept is linked via a data_contract_schema or an asset entity. A concept linked directly to a physical object with entity_type = 'uc_table' (or uc_column, uc_schema, uc_catalog) is silently skipped — no tag is written, no error.
Evidence (verified on FEVM valcon-demo)
src/backend/src/workflows/uc_tag_sync/uc_tag_sync.py has two readers:
read_contracts_and_links — joins entity_semantic_links with WHERE el.entity_type = 'data_contract_schema' (approx L216).
read_assets_and_links — joins entity_semantic_links with WHERE esl.entity_type = 'asset' (approx L383) and WHERE at.name IN ('Table','View').
Neither reads links whose entity_type is uc_table / uc_column / uc_schema / uc_catalog.
Repro:
- Link a concept directly to a UC table:
POST /api/semantic-links/ {entity_id: "main.finance.fact_expenses", entity_type: "uc_table", iri: "urn:glossary:finance/opex-spend"}.
GET /api/knowledge/tag-delivery-stats reports it as eligible (eligible: 1) — the app's read model counts uc_table links.
- Run
uc_tag_sync → log shows Found 0 datasets from contracts / Found 0 datasets from assets / Processing 0 datasets / Summary: updated=0. The eligible link is never tagged.
By contrast, the SAME concept linked via an asset row (asset_type Table, location = demo_catalog.e2e_import.fct_revenue) tags correctly: the job writes ontos_semantic_opex_spend = urn:glossary:finance/opex-spend on the table (verified via information_schema.table_tags).
Impact
- The Enrich tag-delivery read model and the sync job disagree: the UI shows a
uc_table-linked concept as eligible/pending forever, but the job never delivers it. Confusing and looks like a broken sync.
- Users who link concepts straight to physical UC objects (a natural, common action) get no tags.
Suggested fix
Add a reader path for direct physical links (entity_type IN ('uc_table','uc_column','uc_schema','uc_catalog')) where entity_id is (or resolves to) the UC FQN, and feed those into the same DatasetTagInfo aggregation the asset/contract paths use. The tag key/value formats already exist (semantic_assignment config). Alternatively, make tag-delivery-stats count only the entity types the job can actually deliver, so the read model and the job agree — but delivering uc_table links is the better fix.
Notes
- Not a regression from the concept-versioning work — the versioning changes never touched this job; this gap predates them. Surfaced while validating that versioning did not break UC tag propagation (it did not — the asset-linked path tags end to end cleanly).
Summary
uc_tag_syncpropagates a concept's IRI to a UC governed tag ONLY when the concept is linked via a data_contract_schema or an asset entity. A concept linked directly to a physical object withentity_type = 'uc_table'(oruc_column,uc_schema,uc_catalog) is silently skipped — no tag is written, no error.Evidence (verified on FEVM valcon-demo)
src/backend/src/workflows/uc_tag_sync/uc_tag_sync.pyhas two readers:read_contracts_and_links— joinsentity_semantic_linkswithWHERE el.entity_type = 'data_contract_schema'(approx L216).read_assets_and_links— joinsentity_semantic_linkswithWHERE esl.entity_type = 'asset'(approx L383) andWHERE at.name IN ('Table','View').Neither reads links whose
entity_typeisuc_table/uc_column/uc_schema/uc_catalog.Repro:
POST /api/semantic-links/ {entity_id: "main.finance.fact_expenses", entity_type: "uc_table", iri: "urn:glossary:finance/opex-spend"}.GET /api/knowledge/tag-delivery-statsreports it as eligible (eligible: 1) — the app's read model counts uc_table links.uc_tag_sync→ log showsFound 0 datasets from contracts/Found 0 datasets from assets/Processing 0 datasets/Summary: updated=0. The eligible link is never tagged.By contrast, the SAME concept linked via an asset row (asset_type Table,
location = demo_catalog.e2e_import.fct_revenue) tags correctly: the job writesontos_semantic_opex_spend = urn:glossary:finance/opex-spendon the table (verified viainformation_schema.table_tags).Impact
uc_table-linked concept as eligible/pending forever, but the job never delivers it. Confusing and looks like a broken sync.Suggested fix
Add a reader path for direct physical links (
entity_type IN ('uc_table','uc_column','uc_schema','uc_catalog')) whereentity_idis (or resolves to) the UC FQN, and feed those into the sameDatasetTagInfoaggregation the asset/contract paths use. The tag key/value formats already exist (semantic_assignmentconfig). Alternatively, maketag-delivery-statscount only the entity types the job can actually deliver, so the read model and the job agree — but delivering uc_table links is the better fix.Notes