fix: clear stale deleted-export advisories on full builds, not just incremental - #2278
Merged
carlos-alm merged 1 commit intoAug 4, 2026
Conversation
…ncremental Impact: 1 functions changed, 3 affected
Contributor
Greptile SummaryThe PR brings full-build handling of deleted-export advisories into parity with incremental builds, preventing stale removed-export warnings after a deleted file reappears.
Confidence Score: 5/5The PR appears safe to merge, with the TypeScript and Rust full-build paths consistently clearing stale advisories and regression coverage exercising both engines. The cleanup targets currently existing full-build paths, safely handles empty and large path collections, and preserves advisories associated with files that remain deleted. Important Files Changed
Sequence DiagramsequenceDiagram
participant FS as Source files
participant Build as Full-build pipeline
participant DB as Graph database
participant Check as codegraph check
FS->>Build: Reappeared file is collected
Build->>DB: Purge graph data
Build->>DB: Clear stale advisories for parsed paths
Build->>DB: Insert freshly parsed graph
Check->>DB: Read current advisory state
DB-->>Check: No stale removed-export warning
Reviews (1): Last reviewed commit: "fix: clear stale deleted-export advisori..." | Re-trigger Greptile |
Contributor
Codegraph Impact Analysis1 functions changed → 3 callers affected across 2 files
|
carlos-alm
deleted the
fix/issue-2232-fullbuild-clear-deleted-export-advisories
branch
August 4, 2026 19:00
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
#1938 fixed
deleted_export_advisoriespersistence for the incremental rebuild path (handleIncrementalBuild/clearDeletedExportAdvisories), but the full-build path (handleFullBuild/ Rust'ssave_and_purge_changedfull-build branch) never called the equivalent clear, so a full rebuild after a delete-then-recreate cycle could leave stale advisory rows behind, causingcodegraph checkto report a false-positive removed-export warning that a full build should have cleared.This fix recovered from an orphaned worktree (found during
/housekeep) — the work was done, verified, and never turned into a PR. Independently re-verified before landing: confirmed not superseded by any later independent fix, confirmed clean merge onto currentorigin/main(zero conflicts), and re-ran the full relevant test suite (both engines) from a fresh branch.Verification
npx vitest run tests/integration/check.test.ts tests/integration/issue-1938-deleted-export-advisory-persistence.test.ts: 68/68 pass (wasm + native)cargo test --release(codegraph-core): 753/753 passnpm run lint: cleancodegraph diff-impact origin/main -T: 1 function changed (handleFullBuild), 3 transitive callers, 2 files — scoped as expectedCloses #2232