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).
Context
--exclude-hubs(shipped in v0.8.11 via #919) works great as acluster-onlyflag. On our TS/React graph (2091 nodes),cluster-only --exclude-hubs 99.5dramatically 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.pyknowsexclude_hubs,watch.pydoesn't). So an exclude-hubs clustering is overwritten on the next commit, and each flip-flop renumbers communities and invalidates labels (.graphify_labels.jsonis keyed by community number).Proposal
Persist clustering parameters chosen at
cluster-only/build time (e.g. anexclude_hubs_percentilefield inmanifest.jsonor a smallgraphify-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 bywatch.pywould 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).