detect_incremental() uses a single global manifest for all subdirectories — --update on one subfolder reports files from the last-graphed folder as deleted
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 72/100
Direzione di ricerca
Start in graphify/detect.py by tracing detect_incremental(root), load_manifest(), and save_manifest(), then inspect how the --update flow uses deleted_files. Verify that manifests are separated by subdirectory while preserving the existing root-level behavior, and that deleted_files only includes paths belonging to the current root. Confirm the resulting update report no longer includes unrelated folders.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Bug: detect_incremental() uses a single global manifest for all subdirectories — --update on one subfolder reports every file from the last-graphed folder as deleted
Version: graphifyy 0.3.28
What happened
Running the skill's --update flow on one subdirectory of a large repo (e.g. workflows/) after a previous full run had graphed a different subdirectory (e.g. experts/) causes deleted_files in the incremental-detect result to list hundreds of paths from that unrelated, previously-graphed folder.
Live case: --update on workflows/ (a workspace with ~15 top-level graphed subfolders, each run via /graphify <subfolder>) returned deleted_files containing 230+ paths under experts/rechts-kanzlei/... — none of which are under workflows/ and none of which were actually deleted. The last folder graphed before this run was experts/.
Root cause
In graphify/detect.py, the manifest path is a module-level constant:
_MANIFEST_PATH = "graphify-out/manifest.json"
load_manifest() / save_manifest() both default to this single flat path regardless of which root was passed to detect_incremental(root). Every /graphify <subfolder> --update run in a multi-subfolder workspace reads and writes the same manifest file, so the manifest only ever reflects whichever subfolder was graphed most recently. The comparison in detect_incremental():
current_files = {f for flist in full["files"].values() for f in flist}
deleted_files = [f for f in manifest if f not in current_files]
flags every manifest entry not under the current run's file set as deleted — including entries that were never under root to begin with.
Impact
If the caller (e.g. the skill's --update flow) prunes graph nodes whose source_file is in deleted_files, this can silently remove nodes belonging to an unrelated subfolder's graph, depending on which graph is currently loaded. In our case the prune step happened to target the just-loaded subfolder graph, which contained none of the flagged paths, so the visible symptom was only a wrong "N files deleted" count in the diff report — but the mechanism is a correctness bug regardless of the specific graph layout, and could delete real nodes in a different call pattern (e.g. running --update against the root graph, or against a subfolder whose graph overlaps the previously-graphed one).
Suggested fix
Scope the manifest path to root by default (e.g. graphify-out/<sanitized-root>/manifest.json, falling back to the existing flat path for the root-level . invocation to avoid a migration step for existing single-folder setups). Additionally, filter deleted_files to only include manifest entries that were ever under root, as defense in depth against a stale or manually merged manifest.
Happy to share a patch if useful — we worked around it locally by scoping _MANIFEST_PATH per-root and adding the under-root filter to deleted_files.
- 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
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di Graphify-Labs/graphify
-
test(elixir): add a defguardp regression testForse già presa @ClockZW l’ha presa 1 giorno fa. Apertagood first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
Graphify-Labs/graphify#4076 ·
I maintainer di solito rispondono entro 1 giorno
-
test(php): parametrize the language-construct test across all constructsForse già presa @xiehuanyi l’ha presa oggi. Apertagood first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
Graphify-Labs/graphify#4075 ·
I maintainer di solito rispondono entro 1 giorno
-
test(zig): assert a tagged-union nested-struct payload's fields are not mintedForse già presa @Jarvis-J-Jacob l’ha presa 1 giorno fa. Apertagood first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
Graphify-Labs/graphify#4074 ·
I maintainer di solito rispondono entro 1 giorno
-
test(rust): positive same-family cross-language base resolutionForse già presa @xiehuanyi l’ha presa oggi. Apertagood first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
Graphify-Labs/graphify#4073 ·
I maintainer di solito rispondono entro 1 giorno
-
fix(astro): port the U+2028 trailing-comment terminator from the Svelte maskerForse già presa @Sourya-Prabaharan l’ha presa 1 giorno fa. Apertagood first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 90/100
Graphify-Labs/graphify#4072 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di Graphify-Labs/graphify
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
QuantEcon/lecture-python-programming#642 ·
I maintainer di solito rispondono entro 1 giorno
-
area/config area/profiles comp/cli needs-decision P3 sweeper:risk-compatibility type/feature
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
NousResearch/hermes-agent#133697 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement needs-triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
core
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
vectorize-io/hindsight#5279 ·
I maintainer di solito rispondono entro 1 giorno