Skip to content

Commit 4586782

Browse files
committed
fix: address CodeRabbit findings on PR #426 (16/17; 1 explicitly skipped)
Group A — board + plan governance - INTEGRATION_PLANS.md: reconcile Stage-2 terminology with plan's TIER-2 scope - BP-1 plan: D-ODOO-BP-1f row — tree-sitter → Python stdlib ast (matches reality) - EXT-1 plan: Status line gets commit-range evidence (15b63ce..b54a743) Group B — Rust source fixes - grammar/role_keys.rs: debug_assert! → assert! (release-build safety) - extracted/*.rs: emitter now strips /home/user/ prefix → repo-relative paths; all 12 TIER-1 addons + l10n_de chart/kennzahlen regenerated - l8.rs: UOM_UUM typo → UOM_UOM (+ pairing.rs reference update) - extracted/coverage.rs: lane_of unwrap_or(0) → expect (fail loud on malformed l_doc) Group C — Python tooling - __init__.py: __version__: str type annotation - cli.py: mkdir(parents=True, exist_ok=True) before audit write in pair + ORM paths - data_extractors/csv_chart.py: explicit SKR03/SKR04 validation (no silent default) - data_extractors/gobd_company.py: verify_gobd_wiring inspects method body for country_code == 'DE' trigger (no longer false-positive on naked method existence) - data_extractors/xml_kennzahl.py: defusedxml drop-in for ET (XXE/billion-laughs hardening on Odoo-vendored XML). New runtime dep in pyproject.toml. - tests/test_smoke_uom.py: update fallback_rate call sites (drop total_methods arg) Group D — nitpicks - 2 plan files: add 'text' language tag on directory-tree fenced blocks (MD040) - audit/fallback_log.py: drop unused total_methods from fallback_rate signature SKIPPED with rationale (1/17): - l1.rs unit tests for ENTITIES contents: tests would echo static const data, not defend invariants. The cross-cutting properties (kind/confidence/l_doc) are already enforced by extracted::coverage::tests' aggregate gate. Tests: cargo test -p lance-graph-ontology --lib green (203 tests). Python smoke test: ALL TESTS PASS. https://claude.ai/code/session_017gZ6sPRXYPj5n7uJ7NBtRv
1 parent 147ac2f commit 4586782

28 files changed

Lines changed: 381 additions & 356 deletions

File tree

.claude/board/INTEGRATION_PLANS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## 2026-05-28 — odoo-source-extraction-v1 (TIER-1 Odoo source extraction → `OdooConfidence::Extracted` backing for `D-ODOO-BP-1b`; sub-plan unfolding `D-ODOO-BP-1f`)
22

3-
**Status:** SHIPPED (Stage 1 — EXT-1..6 complete); per-lane gate test in `extracted::coverage`; Stage 2 closes the 5 HR/stock_account gaps. Unfolds `D-ODOO-BP-1f` of `odoo-business-logic-blueprint-v1` into a tractable Stage 1 over 12 TIER-1 addons (`account`, `account_payment`, `l10n_de`, `product`, `stock`, `uom`, `base`, `analytic`, `purchase`, `sale`, `account_peppol`, `account_edi_ubl_cii`) of the 622 in `/home/user/odoo/addons/`. Validates and adds source-extracted backing to the L-doc-curated `OdooEntity` consts that Wave 1-3 just shipped (commits `9507b36`..`2aca3e3`).
3+
**Status:** SHIPPED (Stage 1 — EXT-1..6 complete); per-lane gate test in `extracted::coverage`; Stage 2 addresses TIER-2 addons (POS, HR, website, fleet, maintenance, non-DE l10n, payment providers); the 5 known L13/L14 gaps (4 hr.* + stock.valuation.layer) close via hr + stock_account extraction. Unfolds `D-ODOO-BP-1f` of `odoo-business-logic-blueprint-v1` into a tractable Stage 1 over 12 TIER-1 addons (`account`, `account_payment`, `l10n_de`, `product`, `stock`, `uom`, `base`, `analytic`, `purchase`, `sale`, `account_peppol`, `account_edi_ubl_cii`) of the 622 in `/home/user/odoo/addons/`. Validates and adds source-extracted backing to the L-doc-curated `OdooEntity` consts that Wave 1-3 just shipped (commits `9507b36`..`2aca3e3`).
44
**Confidence:** HIGH on the substrate decision (extraction is purely additive — cannot regress curated set). HIGH on the tooling substitution (Python stdlib `ast` replaces the absent `tree-sitter` — handles every ORM shape observed in inventory). MED on per-addon yield (~5–8K typed const declarations across TIER-1, ~2–3K condensed Rust LOC). LOW on regulation-IRI density per entity.
55
**Plan file:** `.claude/plans/odoo-source-extraction-v1.md`
66
**Predecessors:** `D-ODOO-BP-1a` (typed surface, pre-`9507b36`); `D-ODOO-BP-1b` Wave 1–3 (L1–L15 L-doc projection, shipped `9507b36`..`2aca3e3`); 2026-05-28 Odoo source inventory (622 addons, 3 141 ORM classes, 989 K Python LOC; 8/9 German concept anchors located; ELSTER absent — Enterprise-only).

.claude/plans/odoo-business-logic-blueprint-v1.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ downstream layer string-keys against `model_name`. There is no shared
4545
typed representation of "what an Odoo entity *is*" — its fields, methods,
4646
decorators, state machine, constraints. The user-named pipeline:
4747

48-
```
48+
```text
4949
Odoo source (exact = ground truth)
5050
→ typed Odoo entity DTOs ← THIS PLAN
5151
→ normalize: Odoo → OGIT → OWL → DOLCE → FIBU/FIBO inheritance chain
@@ -126,7 +126,7 @@ string-keyed lookups.
126126
| **D-ODOO-BP-1c** | Wire OGIT classifier to take `&OdooEntity` (replaces string-keyed `resolve_odoo`); uses field/method semantics for richer dispatch; covers 0x63/0x90 from PR #414 | `lance-graph-ontology` + `lance-graph-callcenter::family_table` | 250 | HIGH | Queued |
127127
| **D-ODOO-BP-1d** | Wire OWL hydrator to take `&OdooEntity`: relational fields → edges, computed fields → SHACL-equivalent constraints, decorators → axioms | `lance-graph-ontology` | 350 | MED | Queued |
128128
| **D-ODOO-BP-1e** | Wire DOLCE classifier + FIBU/FIBO alignment to take `&OdooEntity`; close out D-ODOO-SAV-2's `None`-class alignment for `stock.*` / `analytic.distribution.model` / `account.account.tag` over typed input | `lance-graph-ontology` | 200 | HIGH | Queued |
129-
| **D-ODOO-BP-1f** | Odoo source extraction tool: walk `/home/user/odoo`, parse Python AST for ORM classes via tree-sitter, emit candidate `OdooEntity` consts with `Confidence=Extracted`; merge into 1b's curated set as a follow-up validation pass | `tools/odoo-blueprint-extractor/` | 800 | MED | Queued |
129+
| **D-ODOO-BP-1f** | Odoo source extraction tool: walk `/home/user/odoo`, parse Python AST for ORM classes via Python stdlib ast module (unfolded into odoo-source-extraction-v1; Stage 1 shipped 2026-05-28), emit candidate `OdooEntity` consts with `Confidence=Extracted`; merge into 1b's curated set as a follow-up validation pass | `tools/odoo-blueprint-extractor/` | 800 | MED | Queued |
130130
| **D-ODOO-BP-1g** | Wire JITson → recipes: `jit::JitCompiler` compiles `Tactic` kernels parameterized by `(OdooEntity, AtomTouchMask)`; produces the DTO-ish NARS that lands in the shader-driver | `lance-graph-contract::jit` + `thinking-engine` | 400 | MED | Queued |
131131

132132
## Execution

.claude/plans/odoo-source-extraction-v1.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# odoo-source-extraction-v1 — TIER-1 Odoo source extraction → `OdooConfidence::Extracted` backing for `D-ODOO-BP-1b` (sub-plan of `D-ODOO-BP-1f`)
22

3-
> **Status:** SHIPPED (Stage 1 complete 2026-05-28; EXT-1..6 landed; 48/53 entities backed; 5 TIER-2 exemptions documented in `extracted/COVERAGE.md`). **Unfolds `D-ODOO-BP-1f`** from
3+
> **Status:** SHIPPED (Stage 1 complete 2026-05-28; EXT-1..6 landed; 48/53 entities backed; 5 TIER-2 exemptions documented in `extracted/COVERAGE.md`; commit range 15b63ce..b54a743; per-lane gate in extracted::coverage::tests passes 203 ontology tests). **Unfolds `D-ODOO-BP-1f`** from
44
> `odoo-business-logic-blueprint-v1.md` into a tractable Stage 1 over a
55
> TIER-1 subset (12 addons of the 622 in `/home/user/odoo/addons/`).
66
> Validates and backs the L-doc-curated `OdooEntity` consts that
@@ -114,7 +114,7 @@ Python 3 package. Single entrypoint `python -m odoo_blueprint_extractor
114114
crates/lance-graph-ontology/src/odoo_blueprint/extracted/`. Internal
115115
shape:
116116

117-
```
117+
```text
118118
parsers/
119119
classes.py — visits ClassDef; classifies as Model/Transient/Abstract by base
120120
fields.py — visits Assign rhs where Call.func.attr == 'Char'/'Many2one'/…;

crates/lance-graph-contract/src/grammar/role_keys.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ impl RoleKey {
9898
/// `I-VSA-IDENTITIES`: identity in the role-key catalogue, content in
9999
/// downstream registries.
100100
pub fn generate(label: &'static str, start: usize, end: usize) -> Self {
101-
debug_assert!(start <= end);
102-
debug_assert!(end <= VSA_DIMS);
101+
assert!(start <= end);
102+
assert!(end <= VSA_DIMS);
103103
let mut words = Box::new([0u64; VSA_WORDS]);
104104
let seed = fnv64(label);
105105
for dim in start..end {

0 commit comments

Comments
 (0)