Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[Bug]: graphify tree ignores the repo tag on merged graphs: no per-repo roots, and identical relative paths from different repos collapse together

Aperta Adatta ai principianti
#4,524 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@AromalBiju1 ci sta già lavorando.

Dal 17/10/2026.

  • #4525 di @AromalBiju1 — aperta
  • #4541 di @omsenjalia — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
76/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python

Direzione di ricerca

Inizia da tree_html.py, in build_tree, che attualmente ignora l’attributo repo dei nodi uniti; poi leggi i test dell’albero in tests/test_tree_html.py. Riproduci il problema con due repo che condividono src/engine.py e verifica se i loro nodi vengono accorpati in un unico nodo file. Il lavoro è completato quando l’albero mostra radici repo separate e mantiene la gerarchia di directory e file di ciascun repo, anche con --root.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug
Pre-flight checks
  • I have checked the Troubleshooting section in the README
What happened?

On a graph produced by graphify merge-graphs, graphify tree does not use the repo attribute that merge-graphs sets on every node. As a result:

  1. There are no per-repo roots. The root is the common prefix of the repo-relative source_file values, which is empty when the repos differ, so the viewer title is "/".
  2. Files that share a repo-relative path in different repos (e.g. src/engine.py in both) collapse into ONE file node with all of their symbols interleaved.

Expected: each repo tag is a top-level root with its own directory/file hierarchy built from that repo's relative paths. This would also fix --root on merged graphs, since each repo subtree would be anchored by its tag rather than an absolute path.

Steps to reproduce
1. Create two graph.json files (repo-a, repo-b) whose nodes have source_file "src/engine.py".
2. graphify merge-graphs repo-a/graphify-out/graph.json repo-b/graphify-out/graph.json --out world/graphify-out/graph.json
3. graphify tree --graph world/graphify-out/graph.json --output WORLD_TREE.html
4. Or inspect directly: python3 -c "import json; from graphify.tree_html import build_tree; print(build_tree(json.load(open('world/graphify-out/graph.json'))))"

Merged nodes do carry `repo: "repo-a"` / `"repo-b"` and `local_id`, so the data needed to group by repo is present. tree_html.py never reads `repo`.
Error output or graph output
build_tree output (name, total_count), both repos sharing src/engine.py:

engine.py (8)
  src (8)
    engine.py (8)
      Cls (1) x4
      fn (1) x4

Symbols from repo-a and repo-b are mixed under one file node. Viewer title: "/".
Graphify version

0.9.92

Operating System

Linux

Python Version

3.13

Installation Method

uv tool install (recommended)

Additional Environment Details

No provider environment variables set. Reproduced on a fresh shallow clone of main at the 0.9.92 release commit.Also reproduced with a fresh uv venv; same result.”

Additional context

Suggested fix: in build_tree (tree_html.py), if nodes carry repo, group by it first and build each repo's subtree independently under a root named after the tag. A test in tests/test_tree_html.py with two repos sharing a relative path would cover it.

Related to #4522 (merged-graph tree rendering), but a different cause: here source_file is intact and the repo tag is simply unused by tree.

Lingua principale
Python
Stelle
124k
Fork
11.9k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Graphify-Labs/graphify

Tutte le issue di Graphify-Labs/graphify

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.