Skip to content

lineage: ambiguity warning missing on the mermaid route and the REPL; _find_node is dead code #584

Description

@padak

Follow-up to #568 / PR #579, which added an ambiguity warning when an unqualified table id resolves to several projects. The warning reaches kbagent lineage show and the POST /lineage/show + GET /lineage/walk REST routes, but three gaps were found during review and deliberately left out of that PR to keep it focused.

1. GET /lineage/mermaid silently drops the warnings

The route returns a rendered diagram, so there is no obvious slot for a warnings array — but that means a Web UI user viewing an ambiguous table gets exactly the silent one-project answer #568 is about. Options: surface it as a diagram annotation, add it to a response envelope, or document the route as diagram-only and point at /lineage/walk for the metadata.

2. The interactive lineage REPL does not surface them either

_emit_query_warnings is called from the lineage show command path only. The REPL builds its own output and therefore never prints the warning.

3. _find_node() is now dead code

PR #579 replaced it with _find_node_candidates(). The old function has no callers left in the tree. It should be removed — leaving it invites a future caller to bypass the ambiguity handling entirely, which is the bug #568 reported.

Why this is a separate issue

Each of these is a distinct surface with its own design question. #579 fixed the CLI and the JSON routes, which is what the reporter hit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions