Skip to content

Quality gate: use effective title (ontology OR version meta) in hold reasons - #474

Merged
micheldumontier merged 1 commit into
mainfrom
fix/held-gate-effective-title
Nov 24, 2026
Merged

micheldumontier merged 1 commit into
mainfrom
fix/held-gate-effective-title

Conversation

@micheldumontier

Copy link
Copy Markdown
Contributor

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 as ontology.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.title is null, so they stayed needs_review for a spurious "no title" reason.

Fix

Adds resolved_meta_titles() in modules/search/versions.py (DB-agnostic — reads the resolved JSON 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:

  • the held-list display (api/ontologies.py),
  • the owner reevaluate endpoint (api/ontologies.py),
  • the admin bulk re-check (api/admin/held.py).

A genuinely title-less ontology is still held (the existing test_still_held_when_title_missing still passes). Regression test added proving a version with only a metadata title publishes.

Testing

test_reevaluate.py 9 pass (incl. new regression + the still-held case); test_admin_held_queue.py + test_quality_gate_publish.py 11 pass; imports clean.

🤖 Generated with Claude Code

…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>
@micheldumontier
micheldumontier merged commit 8e62e62 into main Nov 24, 2026
5 checks passed
@micheldumontier
micheldumontier deleted the fix/held-gate-effective-title branch November 24, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant