From e88c46ddd7c3bf7523cefef9d6a15ef7ebac1f7b Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 28 Oct 2026 02:33:23 +0000 Subject: [PATCH 1/3] Follow OGIT's SGO move to SGO/ogit The OGIT fork moves every root-namespace file from SGO/sgo and SGO/core to SGO/ogit, because its validator requires a file to sit below a directory named after its namespace (AdaWorldAPI/OGIT#11). The tests and sgo.rs read SGO/ogit paths now. ontology_cache's ONLY_IN_THE_TABLES is re-measured on that branch: - The four old entries are gone. FiscalJurisdiction and the three NTO/PTF entities now declare their prefixes, so the cache reads them too. - The three Healthcare Assessment subclasses are new. They now have their own files, so OGAR's reader takes them, while the cache takes only direct subclasses of ogit:Entity. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01XAqKMPWTwovjYJEUMuGPb4 --- crates/ogar-action-handler/src/ogit.rs | 2 +- .../ogar-action-handler/tests/ogit_tables.rs | 8 +++---- .../tests/ontology_cache.rs | 24 +++++++++++-------- crates/ogar-from-schema/src/sgo.rs | 12 +++++----- docs/OGIT-DOMAIN-LIFT-CATALOGUE.md | 2 +- vocab/exports/ogit/README.md | 2 +- 6 files changed, 27 insertions(+), 23 deletions(-) diff --git a/crates/ogar-action-handler/src/ogit.rs b/crates/ogar-action-handler/src/ogit.rs index 770a9307..30c951f6 100644 --- a/crates/ogar-action-handler/src/ogit.rs +++ b/crates/ogar-action-handler/src/ogit.rs @@ -640,7 +640,7 @@ mod tests { Some(Kind::Entity) ); assert_eq!( - kind_of(Path::new("SGO/sgo/verbs/dependsOn.ttl")), + kind_of(Path::new("SGO/ogit/verbs/dependsOn.ttl")), Some(Kind::Verb) ); assert_eq!( diff --git a/crates/ogar-action-handler/tests/ogit_tables.rs b/crates/ogar-action-handler/tests/ogit_tables.rs index 664e9643..a2eef4db 100644 --- a/crates/ogar-action-handler/tests/ogit_tables.rs +++ b/crates/ogar-action-handler/tests/ogit_tables.rs @@ -27,9 +27,9 @@ const KNOWN_REJECTED: [&str; 6] = [ "NTO/CustomerSupport/", "NTO/Mobile/", "NTO/WorkOrder/verbs/", - "SGO/sgo/attributes/public.ttl", - "SGO/sgo/attributes/source.ttl", - "SGO/sgo/attributes/timeZone.ttl", + "SGO/ogit/attributes/public.ttl", + "SGO/ogit/attributes/source.ttl", + "SGO/ogit/attributes/timeZone.ttl", ]; fn strictly_increasing(what: &str, rows: &[T]) { @@ -149,7 +149,7 @@ fn type_attr_keeps_each_types_lists_in_order() { t.lane(Lane::TypeAttrFlag), ); for (curie, file) in [ - ("ogit:Person", "SGO/sgo/entities/Person.ttl"), + ("ogit:Person", "SGO/ogit/entities/Person.ttl"), ("ogit.MARS:Machine", "NTO/MARS/entities/Machine.ttl"), ( "ogit.Automation:KnowledgeItem", diff --git a/crates/ogar-action-handler/tests/ontology_cache.rs b/crates/ogar-action-handler/tests/ontology_cache.rs index 634dd3ec..9f18f40a 100644 --- a/crates/ogar-action-handler/tests/ontology_cache.rs +++ b/crates/ogar-action-handler/tests/ontology_cache.rs @@ -12,13 +12,17 @@ use std::path::Path; use lance_graph_ontology::namespace::SchemaKind; use ogar_action_handler::ogit::{OgitTables, Table, TypeId, entity_curies, load_registry}; -/// Entities OGAR's reader returns and the cache misses, measured on -/// AdaWorldAPI/OGIT `master` at `2315167`. -const ONLY_IN_THE_TABLES: [&str; 4] = [ - "ogit.Accounting:FiscalJurisdiction", - "ogit.PTF:Dummy", - "ogit.PTF:HiroTopology", - "ogit.PTF:Test", +/// Entities OGAR's reader returns and the cache misses. All three are +/// subclasses of `ogit.Healthcare:Assessment`, not direct subclasses of +/// `ogit:Entity`; OGAR's reader takes any class under an `entities/` +/// directory, the cache's `ttl_parse` only a direct `rdfs:subClassOf +/// ogit:Entity`. Measured on the AdaWorldAPI/OGIT branch that declares the +/// prefixes FiscalJurisdiction.ttl and the NTO/PTF entities lacked, which +/// removed the four entries this list used to hold. +const ONLY_IN_THE_TABLES: [&str; 3] = [ + "ogit.Healthcare:HistologicAssessment", + "ogit.Healthcare:MriAssessment", + "ogit.Healthcare:SonographicAssessment", ]; #[test] @@ -41,9 +45,9 @@ fn the_cache_holds_the_hiro_classes_and_skips_the_sgo_core() { // the checkout, so their absence is the loader's. If this fails, the cache // now holds the SGO core: update the `ogit` module docs. for (curie, file) in [ - ("ogit:Person", "SGO/sgo/entities/Person.ttl"), - ("ogit:dependsOn", "SGO/sgo/verbs/dependsOn.ttl"), - ("ogit:name", "SGO/sgo/attributes/name.ttl"), + ("ogit:Person", "SGO/ogit/entities/Person.ttl"), + ("ogit:dependsOn", "SGO/ogit/verbs/dependsOn.ttl"), + ("ogit:name", "SGO/ogit/attributes/name.ttl"), ] { assert!(root.join(file).is_file(), "{file}"); assert!(cache.row_for_uri(curie).is_none(), "{curie}"); diff --git a/crates/ogar-from-schema/src/sgo.rs b/crates/ogar-from-schema/src/sgo.rs index b8e0f578..24f18d7a 100644 --- a/crates/ogar-from-schema/src/sgo.rs +++ b/crates/ogar-from-schema/src/sgo.rs @@ -4,7 +4,7 @@ //! the canonical entities (`ogit:Entity`, `ogit:Node`) and **the //! canonical verb vocabulary** (`ogit:dependsOn`, `ogit:contains`, //! `ogit:generates`, `ogit:relates`, `ogit:causes`, …), one verb TTL each -//! under OGIT's `SGO/sgo/verbs/`. +//! under OGIT's `SGO/ogit/verbs/`. //! //! **Why this matters for OGAR's AST.** Every NTO entity's //! `ogit:allowed ([ verb target ])` block references SGO verbs by @@ -23,8 +23,8 @@ //! //! # Out of v0 //! -//! - SGO entity TTLs (`SGO/core/entities/Node.ttl`, -//! `SGO/sgo/entities/Entity.ttl`) — these are upper-ontology and +//! - SGO entity TTLs (`SGO/ogit/core/entities/Node.ttl`, +//! `SGO/ogit/entities/Entity.ttl`) — these are upper-ontology and //! land in a sibling `sgo_entity` module when wired. //! - `rdfs:domain` / `rdfs:range` constraints on verbs (when OGIT //! declares them). Today's SGO verb TTLs are description-only; @@ -117,7 +117,7 @@ mod tests { use super::*; fn verb_ttl(name: &str) -> String { - crate::ogit_checkout::read(&format!("SGO/sgo/verbs/{name}.ttl")) + crate::ogit_checkout::read(&format!("SGO/ogit/verbs/{name}.ttl")) } #[test] @@ -148,13 +148,13 @@ mod tests { assert_eq!(once, twice, "verb round-trip lost a predicate"); } - /// Walk every verb TTL under `SGO/sgo/verbs/` and assert round-trip. + /// Walk every verb TTL under `SGO/ogit/verbs/` and assert round-trip. /// One of OGIT's strengths is that the verb vocabulary is small and /// stable; this test catches drift on any verb in the checkout the /// moment a predicate slips out of `VerbDecl`. #[test] fn all_sgo_verbs_roundtrip() { - let dir = crate::ogit_checkout::root().join("SGO/sgo/verbs"); + let dir = crate::ogit_checkout::root().join("SGO/ogit/verbs"); let mut checked = 0usize; for entry in std::fs::read_dir(&dir).expect("read sgo/verbs/") { let entry = entry.expect("entry"); diff --git a/docs/OGIT-DOMAIN-LIFT-CATALOGUE.md b/docs/OGIT-DOMAIN-LIFT-CATALOGUE.md index 891327d9..bc4b8bb7 100644 --- a/docs/OGIT-DOMAIN-LIFT-CATALOGUE.md +++ b/docs/OGIT-DOMAIN-LIFT-CATALOGUE.md @@ -171,7 +171,7 @@ arago/almato coordination." | Path in OGIT | Files | Purpose | |---|--:|---| -| `SGO/` | 508 TTLs | Upper ontology — `core/`, `ogit/`, `sgo/`. **`SGO/sgo/verbs/` is the 176-verb canonical AST predicate vocabulary** lifted by `ogar-from-schema::sgo` | +| `SGO/` | 508 TTLs | Upper ontology — `core/`, `ogit/`, `sgo/`. **`SGO/ogit/verbs/` (formerly `SGO/sgo/verbs/`) is the 176-verb canonical AST predicate vocabulary** lifted by `ogar-from-schema::sgo` | | `SDF/` | 7 JSON | Standard Data Format config samples (MARS/Automation) — instance configs, not schema | | `ogit.ttl` | 1 TTL | Root ontology declaring `ogit:Entity`, `ogit:Verb`, `ogit:Attribute` | diff --git a/vocab/exports/ogit/README.md b/vocab/exports/ogit/README.md index 1f4208bf..b76a3a6c 100644 --- a/vocab/exports/ogit/README.md +++ b/vocab/exports/ogit/README.md @@ -1,7 +1,7 @@ # `vocab/exports/ogit/` — OGAR's staging tier for OGIT-shaped TTL Produced-but-not-yet-promoted content, in the upstream OGIT layout -(`NTO//{entities,attributes,verbs}/`, `SGO/sgo/verbs/`). A +(`NTO//{entities,attributes,verbs}/`, `SGO/ogit/verbs/`). A producer stages a digest here; once reviewed (round-trip + bijection tests, drift check, human read), it is **promoted** to the AdaWorldAPI/OGIT fork. From 427a317c3a0e9b67de73a0cf1c06c7cb9de88d7f Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 28 Oct 2026 03:03:44 +0000 Subject: [PATCH 2/3] Keep the SGO/sgo paths; OGIT's SGO move is reverted AdaWorldAPI/OGIT#11 no longer moves SGO/sgo and SGO/core. The validator's directory check reads the canonical path, and a checkout named OGIT (or ogit, as this repository's CI checks it out) already satisfies it, so the move was not needed. This restores the paths e88c46d changed. What stays is the re-measured ONLY_IN_THE_TABLES list: OGIT#11 still declares the prefixes FiscalJurisdiction.ttl and the NTO/PTF entities lacked, and still gives the three Healthcare Assessment subclasses their own files. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01XAqKMPWTwovjYJEUMuGPb4 --- crates/ogar-action-handler/src/ogit.rs | 2 +- crates/ogar-action-handler/tests/ogit_tables.rs | 8 ++++---- crates/ogar-action-handler/tests/ontology_cache.rs | 6 +++--- crates/ogar-from-schema/src/sgo.rs | 12 ++++++------ docs/OGIT-DOMAIN-LIFT-CATALOGUE.md | 2 +- vocab/exports/ogit/README.md | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) diff --git a/crates/ogar-action-handler/src/ogit.rs b/crates/ogar-action-handler/src/ogit.rs index 30c951f6..770a9307 100644 --- a/crates/ogar-action-handler/src/ogit.rs +++ b/crates/ogar-action-handler/src/ogit.rs @@ -640,7 +640,7 @@ mod tests { Some(Kind::Entity) ); assert_eq!( - kind_of(Path::new("SGO/ogit/verbs/dependsOn.ttl")), + kind_of(Path::new("SGO/sgo/verbs/dependsOn.ttl")), Some(Kind::Verb) ); assert_eq!( diff --git a/crates/ogar-action-handler/tests/ogit_tables.rs b/crates/ogar-action-handler/tests/ogit_tables.rs index a2eef4db..664e9643 100644 --- a/crates/ogar-action-handler/tests/ogit_tables.rs +++ b/crates/ogar-action-handler/tests/ogit_tables.rs @@ -27,9 +27,9 @@ const KNOWN_REJECTED: [&str; 6] = [ "NTO/CustomerSupport/", "NTO/Mobile/", "NTO/WorkOrder/verbs/", - "SGO/ogit/attributes/public.ttl", - "SGO/ogit/attributes/source.ttl", - "SGO/ogit/attributes/timeZone.ttl", + "SGO/sgo/attributes/public.ttl", + "SGO/sgo/attributes/source.ttl", + "SGO/sgo/attributes/timeZone.ttl", ]; fn strictly_increasing(what: &str, rows: &[T]) { @@ -149,7 +149,7 @@ fn type_attr_keeps_each_types_lists_in_order() { t.lane(Lane::TypeAttrFlag), ); for (curie, file) in [ - ("ogit:Person", "SGO/ogit/entities/Person.ttl"), + ("ogit:Person", "SGO/sgo/entities/Person.ttl"), ("ogit.MARS:Machine", "NTO/MARS/entities/Machine.ttl"), ( "ogit.Automation:KnowledgeItem", diff --git a/crates/ogar-action-handler/tests/ontology_cache.rs b/crates/ogar-action-handler/tests/ontology_cache.rs index 9f18f40a..7195c312 100644 --- a/crates/ogar-action-handler/tests/ontology_cache.rs +++ b/crates/ogar-action-handler/tests/ontology_cache.rs @@ -45,9 +45,9 @@ fn the_cache_holds_the_hiro_classes_and_skips_the_sgo_core() { // the checkout, so their absence is the loader's. If this fails, the cache // now holds the SGO core: update the `ogit` module docs. for (curie, file) in [ - ("ogit:Person", "SGO/ogit/entities/Person.ttl"), - ("ogit:dependsOn", "SGO/ogit/verbs/dependsOn.ttl"), - ("ogit:name", "SGO/ogit/attributes/name.ttl"), + ("ogit:Person", "SGO/sgo/entities/Person.ttl"), + ("ogit:dependsOn", "SGO/sgo/verbs/dependsOn.ttl"), + ("ogit:name", "SGO/sgo/attributes/name.ttl"), ] { assert!(root.join(file).is_file(), "{file}"); assert!(cache.row_for_uri(curie).is_none(), "{curie}"); diff --git a/crates/ogar-from-schema/src/sgo.rs b/crates/ogar-from-schema/src/sgo.rs index 24f18d7a..b8e0f578 100644 --- a/crates/ogar-from-schema/src/sgo.rs +++ b/crates/ogar-from-schema/src/sgo.rs @@ -4,7 +4,7 @@ //! the canonical entities (`ogit:Entity`, `ogit:Node`) and **the //! canonical verb vocabulary** (`ogit:dependsOn`, `ogit:contains`, //! `ogit:generates`, `ogit:relates`, `ogit:causes`, …), one verb TTL each -//! under OGIT's `SGO/ogit/verbs/`. +//! under OGIT's `SGO/sgo/verbs/`. //! //! **Why this matters for OGAR's AST.** Every NTO entity's //! `ogit:allowed ([ verb target ])` block references SGO verbs by @@ -23,8 +23,8 @@ //! //! # Out of v0 //! -//! - SGO entity TTLs (`SGO/ogit/core/entities/Node.ttl`, -//! `SGO/ogit/entities/Entity.ttl`) — these are upper-ontology and +//! - SGO entity TTLs (`SGO/core/entities/Node.ttl`, +//! `SGO/sgo/entities/Entity.ttl`) — these are upper-ontology and //! land in a sibling `sgo_entity` module when wired. //! - `rdfs:domain` / `rdfs:range` constraints on verbs (when OGIT //! declares them). Today's SGO verb TTLs are description-only; @@ -117,7 +117,7 @@ mod tests { use super::*; fn verb_ttl(name: &str) -> String { - crate::ogit_checkout::read(&format!("SGO/ogit/verbs/{name}.ttl")) + crate::ogit_checkout::read(&format!("SGO/sgo/verbs/{name}.ttl")) } #[test] @@ -148,13 +148,13 @@ mod tests { assert_eq!(once, twice, "verb round-trip lost a predicate"); } - /// Walk every verb TTL under `SGO/ogit/verbs/` and assert round-trip. + /// Walk every verb TTL under `SGO/sgo/verbs/` and assert round-trip. /// One of OGIT's strengths is that the verb vocabulary is small and /// stable; this test catches drift on any verb in the checkout the /// moment a predicate slips out of `VerbDecl`. #[test] fn all_sgo_verbs_roundtrip() { - let dir = crate::ogit_checkout::root().join("SGO/ogit/verbs"); + let dir = crate::ogit_checkout::root().join("SGO/sgo/verbs"); let mut checked = 0usize; for entry in std::fs::read_dir(&dir).expect("read sgo/verbs/") { let entry = entry.expect("entry"); diff --git a/docs/OGIT-DOMAIN-LIFT-CATALOGUE.md b/docs/OGIT-DOMAIN-LIFT-CATALOGUE.md index bc4b8bb7..891327d9 100644 --- a/docs/OGIT-DOMAIN-LIFT-CATALOGUE.md +++ b/docs/OGIT-DOMAIN-LIFT-CATALOGUE.md @@ -171,7 +171,7 @@ arago/almato coordination." | Path in OGIT | Files | Purpose | |---|--:|---| -| `SGO/` | 508 TTLs | Upper ontology — `core/`, `ogit/`, `sgo/`. **`SGO/ogit/verbs/` (formerly `SGO/sgo/verbs/`) is the 176-verb canonical AST predicate vocabulary** lifted by `ogar-from-schema::sgo` | +| `SGO/` | 508 TTLs | Upper ontology — `core/`, `ogit/`, `sgo/`. **`SGO/sgo/verbs/` is the 176-verb canonical AST predicate vocabulary** lifted by `ogar-from-schema::sgo` | | `SDF/` | 7 JSON | Standard Data Format config samples (MARS/Automation) — instance configs, not schema | | `ogit.ttl` | 1 TTL | Root ontology declaring `ogit:Entity`, `ogit:Verb`, `ogit:Attribute` | diff --git a/vocab/exports/ogit/README.md b/vocab/exports/ogit/README.md index b76a3a6c..1f4208bf 100644 --- a/vocab/exports/ogit/README.md +++ b/vocab/exports/ogit/README.md @@ -1,7 +1,7 @@ # `vocab/exports/ogit/` — OGAR's staging tier for OGIT-shaped TTL Produced-but-not-yet-promoted content, in the upstream OGIT layout -(`NTO//{entities,attributes,verbs}/`, `SGO/ogit/verbs/`). A +(`NTO//{entities,attributes,verbs}/`, `SGO/sgo/verbs/`). A producer stages a digest here; once reviewed (round-trip + bijection tests, drift check, human read), it is **promoted** to the AdaWorldAPI/OGIT fork. From c72d86a72463f22cf177af89a41a93a45c517574 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 28 Oct 2026 03:12:17 +0000 Subject: [PATCH 3/3] Lower the Accounting floor to 33 for AdaWorldAPI/OGIT#11 OGIT#11 removes three Accounting files that no entity referenced (two verbs and one attribute), so the domain's inventory floor drops from 36 to 33. The floor still fails if Accounting shrinks further. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01XAqKMPWTwovjYJEUMuGPb4 --- crates/ogar-from-schema/src/ttl_emit.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/ogar-from-schema/src/ttl_emit.rs b/crates/ogar-from-schema/src/ttl_emit.rs index 20616b97..e7f401a3 100644 --- a/crates/ogar-from-schema/src/ttl_emit.rs +++ b/crates/ogar-from-schema/src/ttl_emit.rs @@ -349,7 +349,9 @@ mod tests { fn nine_domains_lift_surface_round_trip() { for (domain, floor) in [ ("Transport", 27), - ("Accounting", 36), + // 33 since AdaWorldAPI/OGIT#11 removed three unreferenced + // Accounting files (two verbs, one attribute). + ("Accounting", 33), ("SalesDistribution", 23), ("Credit", 21), ("Cost", 5),