mirror of
https://github.com/DeusData/codebase-memory-mcp.git
synced 2026-11-04 08:13:37 +08:00
Round 6: CBMRegisteredFunc gains a `flags` bitfield (CBMFuncFlags) and a `decorator_qns` NULL-terminated list. py_register_def populates them from CBMDefinition.decorators by short-name match — so `@property`, `@functools.cache`, `@abc.abstractmethod`, `@typing.overload`, and `@final` all light up regardless of qualified vs bare reference. The flags aren't consumed by resolution yet (still on roadmap: emit distinct edge for @property attribute access vs method call); they are recorded so future overload selection / property modeling can use them without another schema change. The struct extension is at-tail and existing call sites that memset to zero stay correct; non-Python LSPs see flags=0 / decorator_qns=NULL and behave identically. Three new verification tests prove that generators, dataclasses, and @property already work end-to-end through the Round 4-5 infrastructure without further code changes: - Generator[Foo, ...] iterables in for-loop bind loop var to Foo via py_iterable_element_type's existing TEMPLATE handling. - @dataclass class Point: x: Foo (class-body annotated assignment) is picked up by Round 4's third-pass field registrar; p.x.method() resolves through the field type. - @property def thing(self) -> Foo: c.thing returns Foo because attribute access on NAMED routes through py_func_return_type which yields the getter's annotated return. All 2895 prior tests stay green; 3 new tests pass. Total 2898 / 0. Bench unchanged at 95% (the small bench fixture doesn't exercise the new patterns; will expand in Round 7).