Repository navigation
Quality gate: use effective title (ontology OR version meta) in hold reasons - #474
Merged
Merged
Conversation
…hold reasons The held-review "no title" gate checked `ontologies.title`, which is NULL for ~97% of the catalogue — the real display title lives in the version's resolved metadata (`ontology.title OR meta.title`, as the list endpoint already resolves it). So any re-ingested ontology whose title is only at the version level was falsely held "no title" and could never publish via reevaluate (e.g. fresnel "Fresnel Lens and Format Core Vocabulary", ssn "Semantic Sensor Network Ontology"). Adds `resolved_meta_titles()` (DB-agnostic, Python-side extraction) and sources the EFFECTIVE title in all three gate call sites: the held-list display (ontologies.py), the owner reevaluate endpoint (ontologies.py), and the admin bulk re-check (admin/held.py). A truly title-less ontology is still held. Regression test added. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
The held-review quality gate's "no title" check reads
ontologies.title, which is null for 1847 of 1898 ontologies — the real display title lives in the version's resolved metadata (the list endpoint already resolves it asontology.title OR meta.title). So any re-ingested ontology whose title exists only at the version level is falsely held "no title" and can never publish via reevaluate.Surfaced while re-evaluating fresnel (title "Fresnel Lens and Format Core Vocabulary") and ssn ("Semantic Sensor Network Ontology") after their licenses were approved (#473): both have proper metadata titles but
ontologies.titleis null, so they stayedneeds_reviewfor a spurious "no title" reason.Fix
Adds
resolved_meta_titles()inmodules/search/versions.py(DB-agnostic — reads theresolvedJSON and extracts the title in Python, no Postgres-only function) and sources the effective title (ontology.title OR version meta title) at all three gate call sites:api/ontologies.py),reevaluateendpoint (api/ontologies.py),api/admin/held.py).A genuinely title-less ontology is still held (the existing
test_still_held_when_title_missingstill passes). Regression test added proving a version with only a metadata title publishes.Testing
test_reevaluate.py9 pass (incl. new regression + the still-held case);test_admin_held_queue.py+test_quality_gate_publish.py11 pass; imports clean.🤖 Generated with Claude Code