Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/codegraph-core/src/graph/classifiers/roles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ pub(crate) fn do_classify_full(conn: &Connection) -> rusqlite::Result<RoleSummar
return Ok(summary);
}

// 2b. Program-entrypoint IDs (#2392) — set by `mark_entrypoint_targets`
// 2b. Program-entrypoint IDs (#2392) — set by `apply_entrypoint_attribution`
// from an extractor-flagged call site (Python's `__main__` guard and
// `__main__.py` module level). Mirrors the `entrypoint` column read by
// `buildClassifierInput` in features/structure.ts.
Expand Down
8 changes: 5 additions & 3 deletions tests/integration/issue-2392-python-entrypoints.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,11 @@ describe.each(ENGINES)(
// Greptile finding on this PR's own fix (#2425): deleting the guard's
// *file* is a different code path than editing it — the removed file
// is never a member of fileSymbols (the reparsed-files set
// markEntrypointTargets iterates), so only the detect-changes stage's
// pre-purge capture (clearEntrypointAttributionForRemovedFiles /
// clear_entrypoint_attribution_for_removed_files) can catch this.
// persistEntrypointCalls iterates), so its entrypoint_calls evidence
// row can only be cleared via the generic per-file purge
// (preparePurgeStmts's entrypointCalls statement, the same path every
// other per-file table uses for a deleted file) — projectEntrypointAttribution
// then re-derives the flag from whatever evidence remains, clearing it.
const dir = fs.mkdtempSync(path.join(os.tmpdir(), `cg-2425-stale-${engine}-`));
try {
const guardFile = path.join(dir, 'run.py');
Expand Down
Loading