Skip to content

[Feature]: Stable way for external tools to supply community labels #3808

Open

Description

@190ibrahim

Problem or use case

I name communities with an external tool and hand the names to graphify through .graphify_labels.json. It works: cluster-only picks them up and the report, graph.json and graph.html all use them.

The catch is that cluster-only only keeps a saved label if .graphify_labels.json.sig matches graphify.cluster.community_member_sigs. I had to copy that function byte for byte. If it ever changes, every external label quietly turns back into a hub name, with no error.

Proposed solution

Either of these would do:

  1. Treat the labels file and its .sig as a supported format: document it and add a test that pins community_member_sigs.
  2. Add graphify label --from names.json, which takes a {cid: name} map and writes the .sig itself, so outside tools never have to touch the hash.

Alternatives considered

Adding another LLM backend doesn't help. The open labeling bugs (#3671, #3747) come from free-text generation itself.

Area

Graph building or querying

Additional context

My tool is jev-graphify. It doesn't generate names. It builds candidates from the graph (hub, classes, files, common words) and has TypeSafe Jev pick one, so there are no empty or cut-off names. It uses no LLM key.

On a ROS 2 repo (5,025 nodes, 247 communities) it named 237 communities in about 9 seconds for $0.02, and cluster-only kept all of them. So far it has only been tested on that one codebase.

Happy to open a PR for either option if you're open to it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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