Skip to content

Class-attribute literal values are dropped; Odoo model identity/composition (_name/_inherit) unrepresentable (CLDK-004) #83

Description

@rahlk

Target: canonical schema v2 (epic #69), with the model-composition layer routed through design first — it is new contract surface. From the external v0.3.0/Odoo quality audit, finding CLDK-004 (severity Critical).

Audit evidence (Odoo, native export)

  • 1,235 _name and 2,663 _inherit class attributes exist as :PyAttribute nodes — with zero captured literal values (no value/initializer property).
  • Zero model-composition relationship types exist in the schema (nothing matching ODOO/MODEL/INHERIT).

So _name = 'account.account' is present as a node named _name whose defining string is unrecoverable from the graph, and Odoo's registry-based model composition (multiple classes contributing to one model via _inherit) has no representation at all.

Root cause — two independent gaps

  1. Class-attribute values are dropped at capture. PyClassAttribute (codeanalyzer/schema/py_schema.py:293-300) has no value/initializer field, and _class_attributes (symbol_table_builder.py:356-432) extracts only the name and a Jedi-inferred type, never the assignment's RHS. This is an asymmetry: PyVariableDeclaration (module/local variables) does keep initializer.
  2. No framework-semantics layer exists. The analyzer is fully framework-agnostic; the only inheritance edge is PY_EXTENDS over lexical base classes, which cannot express registry composition declared through _inherit strings.

Fix direction

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions