Skip to content

feat(od-ontology): pull namespace inheritance + richer DOLCE classifier from hydrators#15

Merged
AdaWorldAPI merged 1 commit into
mainfrom
claude/odoo-pull-hydrator-inheritance-and-richer-classifier
Jun 22, 2026
Merged

feat(od-ontology): pull namespace inheritance + richer DOLCE classifier from hydrators#15
AdaWorldAPI merged 1 commit into
mainfrom
claude/odoo-pull-hydrator-inheritance-and-richer-classifier

Conversation

@AdaWorldAPI

Copy link
Copy Markdown
Owner

What

Phase-2 continued (per REPATRIATION-FRAME.md — frame #12, schema #13,
alignment table #14). Pulled the Layer-1 hydrator content from
lance_graph_ontology::hydrators::{odoo, dolce_odoo} into odoo-rs's
alignment module — three concrete things land:

1. The literal "Odoo inheriting classes" declaration

pub const ODOO_BUNDLE_ID:           OntologyBundleId = OntologyBundleId { graph: 0x0002, version: 1 };
pub const ODOO_INHERITS_FROM_FIBOFND_V1: OntologyBundleId = OntologyBundleId { graph: 0x0007, version: 1 };
pub const ODOO_NAMESPACE_IRI:       &str = "https://ada.world/onto/odoo#";

This IS the namespace-level statement that "Odoo's classes inherit from FIBO
Foundations" — the literal pattern your original complaint named ("instead of
inheriting classes"). The per-class owl:equivalentClass rows in ODOO_SEED
are the instances of this inheritance; these constants are the
declaration.

2. The cascade edge whitelist (compiler-AST symbol-table predicates)

pub const ODOO_EDGE_WHITELIST: &[&str] = &[
    "http://www.w3.org/2000/01/rdf-schema#subClassOf",      // facet subsumption (LOAD-BEARING)
    "http://www.w3.org/2002/07/owl#equivalentClass",        // Layer-2 alignment (LOAD-BEARING)
    "http://www.w3.org/2000/01/rdf-schema#subPropertyOf",   // field-level subsumption
    "http://www.w3.org/2002/07/owl#equivalentProperty",     // field-level alignment
];

Per the compiler-AST frame (#13): these ARE the AST-edge types the
symbol-table follows during transitive resolution. rdfs:subClassOf carries
Odoo's own facet subsumption; owl:equivalentClass is the route into FIBO /
schema.org / QUDT slots (the ODOO_SEED rows resolve through this).

3. The richer DOLCE classifier (merged from TWO disagreeing lance-graph classifiers)

Category PR #14 (alignment.rs) Hydrator (this PR) Merged here
Perdurant suffixes 8 (.move, .move.line, …) 12 (adds .message, .activity, .attendance, .transition, .event, .log, .history, .transaction, .scrap) 15 (union)
Quality suffixes uom.* only .tag, .type, .group, .category, .tax uom.* + .tag, .type, .groups, .group, .category
Abstract suffixes .tax, fiscal.position, reconcile.model, payment.term, .pricelist* .template, .config, .policy, .rule, .formula Both lists merged + .settings
Endurant special-cases implicit via product.* product.template only product.template AND account.account.template
Default Unknown Endurant Unknown (surfaces gaps; consumer decides)

Plus IRI handling — accepts bare names, odoo: prefix, or full
https://ada.world/onto/odoo# IRI.

Two-classifier disagreement (deliberate reconciliations)

lance-graph hosts two disagreeing DOLCE classifiers; the doc table on
dolce_odoo records every reconciliation choice with rationale, including
.tax (kept Abstract; the hydrator says Quality — Phase-3 OGAR-side decides),
hr.* (kept Unknown — the alignment seed and the hydrator disagree, surfacing
the gap rather than picking one), and the default (kept Unknown — hiding gaps
behind an Endurant fallback obscures the surface).

Real findings surfaced via cross-validation

Two silent bugs in the hydrator the cross-validation caught:

  1. .config rule had a misleading comment claiming to match *.config.settings
    but it doesn't — res.config.settings ends with .settings, not .config.
    Added .settings to the Abstract list to catch the real Odoo shape.
  2. .group rule similarly claimed to match res.groups (plural — the
    canonical Odoo class) but didn't. Added .groups to the Quality list.

The hydrator's own tests didn't surface either bug because they don't test
the actual class names the comments claim to match.

Tests

150+ test results green across the suite: 39 lib + 27 alignment-pin (was
14 in #14 → 13 new pins) + 10 corpus-pin + 13 typed-lift + 10 ogar-parallel +
9 ogar-convergence + 7 bin + others. clippy on my new code clean. fmt-clean.

11 new pins in tests/alignment_pin.rs:

  • prefixed-IRI handling (3 forms: bare / odoo: / full namespace)
  • strip_odoo_prefix roundtrip
  • new Perdurant suffix rules (7 assertions)
  • new Quality suffix rules (4 assertions)
  • new Abstract suffix rules (2 assertions)
  • Endurant special-cases (product.template, account.account.template)
  • .tax disagreement marker (documented Abstract choice)
  • namespace IRI / bundle ID / FIBO Foundations inheritance
  • edge whitelist (2 load-bearing + 2 property variants)
  • TTL sources list

Frame status

Builds on the consistent across-PR governance:

Remaining Phase 2: the odoo_blueprint/{l1..l15}.rs 14K-LOC pull (bounded per
file). Phase 3 (push empowerments to OGAR): the OwlPivot shape, the
suffix-classifier algorithm, the family_default_style → StyleCluster
inheritance, and resolving the documented disagreements (especially .tax).

…er from hydrators

Phase-2 continued (per REPATRIATION-FRAME.md): pulled the Layer-1 hydrator
content from `lance_graph_ontology::hydrators::{odoo, dolce_odoo}` — namespace
inheritance + cascade edge whitelist + richer DOLCE classifier.

THE namespace-level "Odoo inheriting classes" declaration:
- `ODOO_BUNDLE_ID` (0x0002, v1) inherits from `ODOO_INHERITS_FROM_FIBOFND_V1`
  (FIBO Foundations, 0x0007, v1). Per-class equivalentClass rows in ODOO_SEED
  are the instances; these constants are the literal declaration.
- `ODOO_NAMESPACE_IRI = "https://ada.world/onto/odoo#"`.
- `ODOO_EDGE_WHITELIST` — the four cascade RDF predicates (rdfs:subClassOf,
  owl:equivalentClass, rdfs:subPropertyOf, owl:equivalentProperty). Per the
  compiler-AST frame: these ARE the AST-edge types the symbol-table follows.
- `ODOO_TTL_SOURCES` — informational list of the three TTL files the upstream
  harvest produces.

Richer DOLCE classifier (merged from two disagreeing lance-graph classifiers):
- Pulled the 12-suffix PERDURANT list (was 8): added .message, .activity,
  .attendance, .transition, .event, .log, .history, .transaction, .scrap.
- Added a separate QUALITY suffix list: .tag, .type, .groups, .group, .category
  (was just uom.*).
- Added richer ABSTRACT: .template, .settings, .config, .policy, .rule, .formula
  (on top of existing .tax, fiscal.position, reconcile.model, payment.term,
  .pricelist*).
- Endurant special-cases (product.template, account.account.template) preserved
  to maintain ODOO_SEED agreement.
- Accepts prefixed IRIs (`odoo:` or full `https://ada.world/onto/odoo#`).

Documented "two-classifier disagreement" table — the two lance-graph
classifiers disagree on:
- `.tax` (alignment.rs Abstract, hydrator Quality) → kept Abstract here
- `.tag` / `.type` / `.group` / `.category` (alignment.rs sweeps to Endurant
  via fallback, hydrator Quality) → kept Quality here
- `.template` (alignment.rs Endurant via product.*, hydrator Abstract w/
  product.template special-case) → kept Abstract w/ TWO special-cases
- `hr.*` (alignment.rs Unknown, hydrator Endurant by default) → kept Unknown
- Default (alignment.rs Unknown, hydrator Endurant) → kept Unknown
- Phase-3 OGAR-side will canonically resolve.

REAL findings surfaced while writing the cross-validation:
1. The hydrator's .config rule had a misleading comment claiming to match
   `*.config.settings` but did not — `res.config.settings` ends with
   `.settings`, not `.config`. Added .settings to the Abstract list to catch
   the real Odoo settings shape.
2. The hydrator's .group rule similarly claimed to match `res.groups` (plural)
   but did not. Added .groups (plural) to the Quality list.
   Both hydrator bugs were silent because the hydrator's own tests don't
   check `res.groups` or `res.config.settings`.

11 new pins in tests/alignment_pin.rs: prefixed-IRI handling, strip_odoo_prefix
roundtrip, new Perdurant/Quality/Abstract suffix rules, Endurant special-cases,
the .tax disagreement marker, namespace IRI / bundle ID / FIBO inheritance,
edge whitelist (two load-bearing + two property variants), TTL sources list.

Additive only — lance-graph hydrators untouched (still the duplicate to be
subtracted in a later phase). 150+ test results across the suite pass:
39 lib + 27 alignment-pin + 10 corpus-pin + 13 typed-lift + 10 ogar-parallel +
9 ogar-convergence + 7 bin + others. clippy on my code clean; fmt-clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@AdaWorldAPI AdaWorldAPI merged commit 9e0d448 into main Jun 22, 2026
AdaWorldAPI pushed a commit that referenced this pull request Jul 7, 2026
All five lenses reported; 3-meta synthesis consolidated:
R1 HOLD->RESOLVED (5b45170) · R2 CATCH-LATENT x2 (queued) · R3 TARGETS-CORE
+ triple.rs VIOLATION (Q1, THE next refactor) · R4 3 OPPORTUNITY / 3
WORTH-EXPLORING / 0 DROP · R5 OVERCLAIMED -> core gap RESOLVED same-hour
(real 55-file account addon compiled + verbatim account_move.py fused).

One reviewer premise corrected by synthesis: L6 SPOG IS ruled (operator
2026-07-06); what is missing is the lance-graph ledger paperwork + the
attribute->byte-position assignor, not the ruling.

Queue Q1-Q9 with sizes + owners recorded in docs/COUNCIL-5+3-2026-07-07.md:
triple.rs upstream migration, group_functions EmittedBy arm (smallest
highest-leverage ruff diff), ledger appends x3 repos, od-posting
re-architecture off SurrealQL vocabulary, mint relocation + odoo_actions
authority table, guard-classifier convergence, 5.1%-tail ownership,
carrier asks (#11/#15/#17 + stored verify).
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.

2 participants