You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
An ontology import does not reconcile violations after it changes a relation #1297
An ontology import that changes a relation's domain, range or temporal leaves the base's violations as they were.
On the ontology page, update_relation_type (and the class edits beside it) takes detection_keys before the write and calls reasoning::reconcile_ontology after it, so a violation the new criteria no longer support goes away and a new one shows up. The import path does neither: owl_import::apply rewrites domains and ranges through update_relation_from_import and set_domains_ranges, and from #1291 on it can change temporal too, but nothing reconciles afterwards. A base re-imported with a narrower range keeps showing the old picture until something else triggers a reconcile.
This is older than #1291; WaylandYang noted it in the review there. The fix would likely take the detection keys once before apply writes and reconcile once at the end, in the same transaction if the import has one.
Thank you for following up, and sorry: my note on #1291 was wrong. I looked at owl_import::apply and missed the route. apply_import (ontology_routes.rs:659-714) captures detection_keys before apply and runs reconcile_ontology after it, including a best-effort reconciliation if apply fails partway, and ADR 0062 lists import among the covered mutations. A temporal change from #1291 goes through the same call, so it's reconciled too. The only path without it is install_packs at base creation, which has no facts yet.
Your reading does point at a real gap one step over. update_relation_from_import changes a relation's label, description, domains and ranges without moving updated_at, and neither do set_domains_ranges or link_property_axioms_bulk. The page's update_relation_type always moves it, and 0053's staleness check (phrase_bindings::stale) depends on that, so a re-import that narrows a range leaves existing phrase bindings looking current. #1291 fixes this only for temporal changes.
If you agree, I'll retitle this issue to that gap. A PR is welcome: bump updated_at when an imported label, description, domain, range, inverse or super-property actually differs, with a route test that a binding becomes stale after a range-narrowing re-import. If you've actually seen stale violations after an import, please share the steps and I'll look at that separately.
You're right, thanks for checking. apply_import in ontology_routes.rs takes the detection keys before the import and reconciles once afterwards; I only looked at owl_import::apply and the store functions. Closing this.
Activity
WaylandYang commentedon Oct 18, 2026
Thank you for following up, and sorry: my note on #1291 was wrong. I looked at
owl_import::applyand missed the route.apply_import(ontology_routes.rs:659-714) capturesdetection_keysbeforeapplyand runsreconcile_ontologyafter it, including a best-effort reconciliation ifapplyfails partway, and ADR 0062 lists import among the covered mutations. A temporal change from #1291 goes through the same call, so it's reconciled too. The only path without it isinstall_packsat base creation, which has no facts yet.Your reading does point at a real gap one step over.
update_relation_from_importchanges a relation's label, description, domains and ranges without movingupdated_at, and neither doset_domains_rangesorlink_property_axioms_bulk. The page'supdate_relation_typealways moves it, and 0053's staleness check (phrase_bindings::stale) depends on that, so a re-import that narrows a range leaves existing phrase bindings looking current. #1291 fixes this only for temporal changes.If you agree, I'll retitle this issue to that gap. A PR is welcome: bump
updated_atwhen an imported label, description, domain, range, inverse or super-property actually differs, with a route test that a binding becomes stale after a range-narrowing re-import. If you've actually seen stale violations after an import, please share the steps and I'll look at that separately.gedaiu commentedon Oct 18, 2026
You're right, thanks for checking.
apply_importinontology_routes.rstakes the detection keys before the import and reconciles once afterwards; I only looked atowl_import::applyand the store functions. Closing this.