You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
follow-up: deleting the file that attributes an entrypoint flag leaves the target stale forever #2425
Deferred from PR #2411 review (independent review pass, not a Greptile finding — surfaced while verifying the #2411 fix for cross-file entrypoint staleness).
Context:#2411 fixed a real bug where clearing a stale nodes.entrypoint flag was keyed on the file's current outgoing calls edges, which couldn't find a target declared in a different file once the guard call pointing to it was edited or removed from an existing file (the file itself still present, just no longer containing the guard). The fix — nodes.entrypoint_source_file, read back directly instead of re-derived from edges — correctly handles that case, and is covered by an incremental-rebuild integration test.
Residual gap:mark_entrypoint_targets (crates/codegraph-core/src/domain/graph/builder/pipeline.rs) / markEntrypointTargets (src/domain/graph/builder/stages/build-edges.ts) both iterate only file_symbols — the set of files actually reparsed this build. A file that is deleted outright (as opposed to edited) is never a member of file_symbols in either the pre-#2411 code or the #2411 fix, so find_stale/clear never runs for it. If a .py file containing a __main__ guard that calls a target in another file is deleted entirely, that target's nodes.entrypoint/nodes.entrypoint_source_file remain stuck at their prior values indefinitely, on an otherwise-healthy incremental build.
This is the same class of problem removal_reverse_deps (Rust, #1027) and removedFileNeighbors (TS, #1839) already solve for other cross-file effects of a full file deletion (capturing affected neighbors before the purge deletes the evidence) — it just was never extended to cover entrypoint_source_file. Pre-existing in the sense that the original #2392 code had the identical gap (it also only iterated file_symbols); #2411 doesn't regress it, but doesn't close it either.
Fix sketch: in whichever pipeline stage already captures removal_reverse_deps/removedFileNeighbors for a batch of removed files (before their nodes/edges are purged), also query SELECT file FROM nodes WHERE entrypoint_source_file IN (<removed files>) and clear those rows the same way mark_entrypoint_targets/markEntrypointTargets already does for edited files. Needs the equivalent change in both engines to preserve parity.
Fixed directly in PR #2411 (commit 5f78e11) after Greptile independently flagged the same gap during that PR's review — see the commit message and the PR discussion thread for details. Closing since this is no longer a deferred follow-up.
Activity
fix(roles): clear entrypoint attribution owned by a deleted file (#2411…
carlos-alm commentedon Aug 10, 2026
Fixed directly in PR #2411 (commit 5f78e11) after Greptile independently flagged the same gap during that PR's review — see the commit message and the PR discussion thread for details. Closing since this is no longer a deferred follow-up.
fix(roles): classify Python __main__ entrypoints as entry (#2392) (#2411
fix(roles): persist Python entrypoint evidence so attribution survive…