Skip to content

Commit e7e6e11

Browse files
committed
feat(ar_shape): ERP AST test at EDGE level — OSB(Rails) + Odoo emit the same canonical concept-GRAPH
Operator "you were in the odoo vs rails based ERP AST test" (2026-06-19). The synergy work so far proved NAME-level convergence (class IRI → CanonicalConcept). This lands the deeper test: EDGE-level convergence — the concept GRAPH converges across a Rails-based ERP and Odoo, which is what makes it an AST not a label table. New surface in ar_shape.rs: - concept_of_token(token) -> Option<CanonicalConcept> — resolves a single relation token (Odoo comodel class name OR Rails relation leaf) to its concept by the same lexical hints the 11 class detectors use. Priority-ordered: *line*/tax/stock_move resolve before the bare document arms so ambiguous substrings classify correctly. Returns None for real-but-unpromoted targets (estimate, uom, analytic_account) — honest, not fabricated. - ConceptEdge type alias (CanonicalConcept, CanonicalConcept). - ConceptDetector type alias (clears the synergy_registry_one_shot type_complexity clippy warning). - concept_edges(triples, ns, is_rails) -> BTreeSet<ConceptEdge> — runs the per-curator OGIT codebook (translate_rails_to_ogit / translate_odoo_to_ogit), resolves BOTH endpoints of each canonical relation to concepts, returns the edge set (self-edges dropped). Convergence proven on real corpora (3 tests): - CommercialLineItem → CommercialDocument OSB: InvoiceLineItem.invoice (Rails declares_association, leaf "invoice"). Odoo: account_move_line.move_id → account.move (Odoo target). Different field name, different predicate, SAME edge. - CommercialLineItem → TaxPolicy OSB: InvoiceLineItem.{tax1,tax2} (two named FKs). Odoo: account_move_line.tax_ids → account.tax (one M2M). Different cardinality, SAME edge. - CommercialDocument → BillingParty OSB: Invoice belongs_to :client. Odoo: account_move → partner_id → res.partner. Convergence isn't limited to the line-item node. Tests: - concept_of_token_resolves_both_curator_vocabularies - osb_rails_and_odoo_commercial_line_item_share_concept_edges - osb_rails_and_odoo_commercial_document_both_link_billing_party Plus all 28 prior tests still green → 31/31 total. ar_shape clippy-clean (the pre-existing synergy detector-table type_complexity warning is resolved via the ConceptDetector alias). Why this is THE AST test: node-level convergence (SMOKE-1..4) shows two curators NAME the same concepts. Edge-level shows two curators STRUCTURE them identically — line item is a member of a document, document belongs to a party, line carries a tax. Strip Rails/Odoo syntax and the same business AST remains. This is doctrine §2 "labels are leaf detail; the SHAPE is what overlaps" proven at the relation level — the strongest cash-out yet of OGAR-is-the-compiler (the concept-graph IS the compiled output; the curators are interchangeable front-ends). EPIPHANIES E-OGAR-AR-SHAPE-SMOKE-5 prepended. Cross-refs: - E-OGAR-AR-SHAPE-SMOKE-3 (the OGIT canonical codebooks this builds on) - E-OGAR-AR-SHAPE-SMOKE-4 (the node-level sibling concepts) - docs/OGAR_AR_SHAPE_ENDGAME.md §2 correction 4 (labels-are-leaf-detail, now proven at edge level) - AdaWorldAPI/OGAR CODEBOOK (the concept-edges ARE the family-edge structure OGAR's canonical classes encode) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Xzyc27Nx3f8WC5KzwfWfjx
1 parent faae91c commit e7e6e11

2 files changed

Lines changed: 441 additions & 142 deletions

File tree

.claude/board/EPIPHANIES.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,22 @@ At the **crisp top split** a within-basin perturbation stays **95.7 % contained*
233233
**The three-axis close (a "surge" decomposes, and each axis owns one aspect):** WHERE it breaks = CHAODA anomaly (manifold repulsion, `ndarray::hpc::clam`); HOW MUCH = Weyl magnitude (probes A–D, [G] exact in code); HOW it spreads = **family-basin block-localized Weyl multi-hop, hop-local at the crisp tier** (this finding) + the ketchup yield as the seam gate. The family-basin layer (`E-BASIN-IS-A-NODE`) is the keystone that block-diagonalizes the Laplacian so per-basin Weyl chains seam-to-seam.
234234

235235
**Self-correction (process):** the probe's first verdict rubber-stamped a 0.044 within-vs-seam gap + a **vacuous Davis-Kahan bound (2199)** as "SUPPORTED" — the same confirmation-bias trap. Tightened the gate to per-tier within ≥ 0.70 AND within/seam ratio ≥ 1.30 AND Weyl, dropped the DK bound as evidence (it is uninformative when the eigengap is tiny). Under the honest gate only HEEL passes — which is the correct, nuanced result. Cross-refs: `E-OUTAGE-CASCADE-IS-NON-LOCAL` (the claim reinstated), `E-BASIN-IS-A-NODE` (the family-basin keystone), `perturbation-sim::{spectral_perturbation, hhtl_keys}`, probes A–E (the spectral foundation, real PyPSA), the "without family nodes" tier table.
236+
## 2026-06-19 — E-OGAR-AR-SHAPE-SMOKE-5 — the ERP AST test passes at EDGE level, not just node level: OSB (Rails) and Odoo emit the SAME canonical concept-GRAPH (`CommercialLineItem → CommercialDocument`, `→ TaxPolicy`; `CommercialDocument → BillingParty`) despite different class names, field names, AND predicate vocabularies
237+
238+
**Status:** FINDING (operator-directed "odoo vs rails based ERP AST test", 2026-06-19; 31/31 ar_shape tests green, ar_shape clippy-clean). The synergy work so far proved NAME-level convergence (a class IRI → a `CanonicalConcept`). This entry lands the deeper, real test: **EDGE-level convergence** — the canonical concept GRAPH (concept→concept relations) is the same across a Rails-based ERP and Odoo, which is what makes it an *AST*, not a label table.
239+
240+
**The test (`concept_edges` + 3 tests):** `concept_of_token(token) -> Option<CanonicalConcept>` resolves a single relation token — whether an Odoo comodel class name (`account_tax`, `account_move`, `res_partner`) OR a Rails relation leaf (`tax1`, `invoice`, `client`, `item`) — to its concept via the same lexical hints the 11 class detectors use, priority-ordered so `*line*`/`tax`/`stock_move` resolve before the bare document arms. `concept_edges(triples, ns, is_rails)` runs the per-curator OGIT codebook (`translate_rails_to_ogit` / `translate_odoo_to_ogit`), resolves BOTH endpoints of each canonical relation to concepts, and returns the `BTreeSet<(from, to)>` edge set (self-edges dropped).
241+
242+
**The convergence proven on real corpora:**
243+
- **`CommercialLineItem → CommercialDocument`** — OSB `InvoiceLineItem.invoice` (Rails `declares_association`, leaf "invoice") AND Odoo `account_move_line.move_id → account.move` (Odoo `target`). Different field name, different predicate, **same edge**.
244+
- **`CommercialLineItem → TaxPolicy`** — OSB `InvoiceLineItem.{tax1,tax2}` (two named FKs) AND Odoo `account_move_line.tax_ids → account.tax` (one M2M). Different cardinality, different field, **same edge**.
245+
- **`CommercialDocument → BillingParty`** — OSB `Invoice belongs_to :client` AND Odoo `account_move → partner_id → res.partner`. Proves the convergence isn't limited to the line-item node — it's the whole sub-graph.
246+
247+
**Why this is THE AST test (not the previous ones).** Node-level convergence (SMOKE-1..4) shows two curators NAME the same concepts. Edge-level convergence shows two curators STRUCTURE those concepts identically — the line item is a member of a document, the document belongs to a party, the line carries a tax. That structural sub-graph is curator-independent: strip the Rails/Odoo syntax (class names, field names, `declares_association` vs `target`) and the **same business AST remains**. This is doctrine §2 "labels are leaf detail; the SHAPE is what overlaps" proven at the relation level, not just the class level — the strongest cash-out yet of OGAR-is-the-compiler (the concept-graph IS the compiled output; the curators are interchangeable front-ends).
248+
249+
**Scope (carried).** The detectors stay lexical (token ends-with/contains hints); `concept_of_token` returns `None` for real-but-unpromoted relation targets (`estimate`, `uom`, `analytic_account`) — honest, not fabricated. The edge set is the intersection of what BOTH curators emit; single-curator edges are visible per-curator but the *shared* sub-graph is the AST. Next deepening (deferred): edge *cardinality/direction* convergence (M2O vs O2M vs M2M), and wiring `concept_edges` into `synergy_registry_one_shot` so the one-shot table carries edges, not just nodes.
250+
251+
**Cross-refs:** `crates/lance-graph-ontology/src/ar_shape.rs` (`concept_of_token` + `concept_edges` + `ConceptEdge`/`ConceptDetector` aliases + 3 tests); `E-OGAR-AR-SHAPE-SMOKE-3` (the OGIT canonical codebooks this builds on); `E-OGAR-AR-SHAPE-SMOKE-4` (the node-level sibling concepts); `docs/OGAR_AR_SHAPE_ENDGAME.md` §2 correction 4 (labels-are-leaf-detail, now proven at edge level); `AdaWorldAPI/OGAR` CODEBOOK (the concept-edges are the family-edge structure OGAR's canonical classes already encode — e.g. `commercial_line_item` family-edges to `commercial_document` + `tax_policy`).
236252

237253
---
238254

0 commit comments

Comments
 (0)