Skip to content

Feature request: let the git-hook/watch rebuild honor a persisted clustering config (exclude-hubs) #1800

Description

@jerp86

Context

--exclude-hubs (shipped in v0.8.11 via #919) works great as a cluster-only flag. On our TS/React graph (2091 nodes), cluster-only --exclude-hubs 99.5 dramatically improves community↔subsystem alignment: core/style/ consolidates from 10 communities (53% top-share) to 4 (85%), core/layout/ top-share 15%→43%, core/dsl/ 17%→43% — reproducing the pattern reported in #919.

Problem

The flag cannot be adopted as the graph's official clustering when the post-commit/post-checkout hooks are installed: the hook rebuild path (watch.py) re-clusters with defaults and has no way to pick the setting up (no flag, no env var — checked v0.9.12: cli.py knows exclude_hubs, watch.py doesn't). So an exclude-hubs clustering is overwritten on the next commit, and each flip-flop renumbers communities and invalidates labels (.graphify_labels.json is keyed by community number).

Proposal

Persist clustering parameters chosen at cluster-only/build time (e.g. an exclude_hubs_percentile field in manifest.json or a small graphify-out/.graphify_cluster.json) and have the watch/hook rebuild reuse them, so hooks preserve rather than revert the operator's clustering choice. An env var (e.g. GRAPHIFY_EXCLUDE_HUBS) read by watch.py would also work as a minimal version.

Environment

graphify 0.9.12, macOS, hooks installed via graphify hook install.

Workaround we're using meanwhile: keep the official graph on default clustering and run exclude-hubs analyses on a copy (cluster-only --graph <copy> — the #1747 fix in 0.9.12 makes this clean, outputs land beside the copy).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions