Commit 7a74a6f
committed
feat(odoo_blueprint::extracted::pairing): D-ODOO-EXT-5 — curated-vs-extracted pairing table
Builds the cross-reference table that links every L-doc curated lane
entity (`l{1..15}::*`, `OdooConfidence::Curated`) to its source-extracted
counterpart (`extracted::*::EXT_*`, `OdooConfidence::Extracted`) when
both exist for the same `model_name`.
Outputs:
- `crates/lance-graph-ontology/src/odoo_blueprint/extracted/pairing.rs`
exposes `pub static CURATED_EXTRACTED_PAIRS: &[OdooEntityPairing]` —
48 pairings (53 curated model_names × 229 extracted in TIER-1).
- `/tmp/pairings.json` (out-of-tree) records field/method count deltas
per pairing for human review.
Scanner: stdlib `re` over the generated Rust source; lives in
`tools/odoo-blueprint-extractor/odoo_blueprint_extractor/pairing.py`
with a `pair` CLI subcommand (`python -m odoo_blueprint_extractor pair`).
Const selection rules (both sides):
- Curated: highest field+method count wins (handles indirect-ref files
like l3.rs that reference separate const slices); alphabetical const_name
on tie. This correctly picks l9.rs over l3.rs for `account.fiscal.position`
(17+11 vs 0+0 counted inline fields/methods).
- Extracted: most fields+methods wins (picks richest coverage when a
model appears in multiple addons, e.g. `uom.uom` in uom.rs preferred
over account.rs/product.rs/stock.rs appearances).
Side-effect: promoted 17 module-private (`const`) lane entities to
`pub const` in l3.rs, l5.rs, l7.rs, l13.rs so they're accessible
from `crate::odoo_blueprint::<lane>::<CONST>` paths. These consts
were only reachable via the `ENTITIES` slice before; making them pub
is additive (no tests change) and required for the pairing reference.
Most striking deltas (curated savant-relevant subset vs full ORM):
account.move: 24f/27m → 142f/352m (+118f/+325m)
account.move.line: 20f/14m → 87f/146m (+67f/+132m)
sale.order: 22f/13m → 65f/141m (+43f/+128m)
stock.move: 23f/14m → 74f/130m (+51f/+116m)
account.tax: 3f/0m → 36f/113m (+33f/+113m)
5 curated model_names have NO TIER-1 extracted backing (EXT-6 gap rows):
hr.contract.type, hr.department, hr.employee, hr.job, stock.valuation.layer
These are TIER-2 addons (hr, account_asset) — expected leakage.
Curated stays canonical on conflict (per BP-1 plan §"merge ordering");
extracted is the audit backing.
Tests: 2 new (`pairing_table_is_well_formed`, `pairing_table_has_expected_size`);
all 199 pre-existing ontology tests stay green (201 total).
Next: D-ODOO-EXT-6 (coverage report — uses this pairing table to
quantify lane-level extracted-backing).
Plan: `.claude/plans/odoo-source-extraction-v1.md`.
https://claude.ai/code/session_017gZ6sPRXYPj5n7uJ7NBtRv1 parent 1e0f477 commit 7a74a6f
8 files changed
Lines changed: 888 additions & 19 deletions
File tree
- crates/lance-graph-ontology/src/odoo_blueprint
- extracted
- tools/odoo-blueprint-extractor/odoo_blueprint_extractor
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
Lines changed: 410 additions & 0 deletions
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
186 | | - | |
| 186 | + | |
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
| |||
413 | 413 | | |
414 | 414 | | |
415 | 415 | | |
416 | | - | |
| 416 | + | |
417 | 417 | | |
418 | 418 | | |
419 | 419 | | |
| |||
599 | 599 | | |
600 | 600 | | |
601 | 601 | | |
602 | | - | |
| 602 | + | |
603 | 603 | | |
604 | 604 | | |
605 | 605 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| |||
464 | 464 | | |
465 | 465 | | |
466 | 466 | | |
467 | | - | |
| 467 | + | |
468 | 468 | | |
469 | 469 | | |
470 | 470 | | |
| |||
623 | 623 | | |
624 | 624 | | |
625 | 625 | | |
626 | | - | |
| 626 | + | |
627 | 627 | | |
628 | 628 | | |
629 | 629 | | |
| |||
894 | 894 | | |
895 | 895 | | |
896 | 896 | | |
897 | | - | |
| 897 | + | |
898 | 898 | | |
899 | 899 | | |
900 | 900 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
| 87 | + | |
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| |||
389 | 389 | | |
390 | 390 | | |
391 | 391 | | |
392 | | - | |
| 392 | + | |
393 | 393 | | |
394 | 394 | | |
395 | 395 | | |
| |||
550 | 550 | | |
551 | 551 | | |
552 | 552 | | |
553 | | - | |
| 553 | + | |
554 | 554 | | |
555 | 555 | | |
556 | 556 | | |
| |||
683 | 683 | | |
684 | 684 | | |
685 | 685 | | |
686 | | - | |
| 686 | + | |
687 | 687 | | |
688 | 688 | | |
689 | 689 | | |
| |||
892 | 892 | | |
893 | 893 | | |
894 | 894 | | |
895 | | - | |
| 895 | + | |
896 | 896 | | |
897 | 897 | | |
898 | 898 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
129 | 129 | | |
130 | 130 | | |
131 | 131 | | |
132 | | - | |
| 132 | + | |
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
| 173 | + | |
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
273 | | - | |
| 273 | + | |
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
| |||
352 | 352 | | |
353 | 353 | | |
354 | 354 | | |
355 | | - | |
| 355 | + | |
356 | 356 | | |
357 | 357 | | |
358 | 358 | | |
| |||
418 | 418 | | |
419 | 419 | | |
420 | 420 | | |
421 | | - | |
| 421 | + | |
422 | 422 | | |
423 | 423 | | |
424 | 424 | | |
| |||
Lines changed: 75 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
15 | 21 | | |
16 | 22 | | |
17 | 23 | | |
| |||
29 | 35 | | |
30 | 36 | | |
31 | 37 | | |
32 | | - | |
| 38 | + | |
33 | 39 | | |
34 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
35 | 65 | | |
36 | 66 | | |
37 | 67 | | |
| |||
81 | 111 | | |
82 | 112 | | |
83 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
84 | 153 | | |
85 | 154 | | |
86 | 155 | | |
| |||
126 | 195 | | |
127 | 196 | | |
128 | 197 | | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
129 | 203 | | |
130 | 204 | | |
131 | 205 | | |
| |||
0 commit comments