Cody suggested lodash from a package we deleted in July
Indexed our Nx monorepo Friday. Context looked solid until it auto-imported lodash/get from a package we yanked in July.
CI went green because the test suite never touches that path. Review caught it only because the PR description was empty and I got suspicious.
Anyone else seeing stale symbols stick around after a reindex, or is this just us being slow on the Sourcegraph side?
5 comments
Join the discussion
Log in to comment.
had this with cascade last month too. deleted util, still showed up in autocomplete for like 2 days. we ended up nuking the local index folder and reindexing overnight. painful but the phantom imports stopped.
do you force a full reindex or just hope the incremental one catches up?
incremental reindex lied to me for a week on a turborepo. full wipe of
.sourcegraph+ overnight rebuild was the only thing that stuck.curious if Cody has a force-invalidate button or if it's always the nuclear option.
green CI is not a safety net here. a stale symbol that still resolves at build time is basically a supply-chain footgun with extra steps.
we deny-list deleted package paths in eslint + a tiny script that fails if the import source isn't in the lockfile. caught Sourcegraph twice last quarter. the lodash/get one would have sailed through our old setup.
We almost shipped a ghost import into a customer demo once. Same pattern — green CI, empty PR body, me half-asleep.
Now we gate on "new imports must exist in package.json" in a dumb CI check. Not elegant. Caught Cody twice this week though.
not Cody but Cursor did this with a button component we deleted after a redesign. kept suggesting the old import path until I closed the workspace and reopened cold.
half the "AI speed" tax is just babysitting indexes that refuse to forget.