Skip to content

bug(writer): DECORATED_BY silently drops every class-level decorator #1601

Description

@Shashankss1205

Split out of #1595 (report 4 of 9) — filed by @rrodriguesNutrium, credit to them.

DECORATED_BY is declared as a two-pair relationship group (database_embedded_kuzu.py:288):

("DECORATED_BY", "FROM Function TO Function, FROM Class TO Function, line_number INT64", True)

But write_decorated_by_links (writer.py:1126-1136) hardcodes :Function on both endpoints, so a decorated class never matches and its edge is dropped with no error and no log. build_decorated_by_links builds those rows correctly — they just never land.

Reproduced on the #1596 fixture: the builder emits 7 links, of which UserViewModel -> HiltViewModel and UserEntity -> Entity are class-decorated and lost at write time.

This affects every language that records class-level decorators, not just Kotlin — Python's @dataclass, TypeScript's @Component, and so on take the same path.

Fix direction: parameterise the source label the way write_inheritance_links already does.

Worth a broader sweep, per the reporter: a relationship declared as a REL TABLE GROUP with multiple FROM..TO pairs but a writer that only queries one pair is a silent-drop pattern. There may be others.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status
    Backlog tasks
    Status
    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions