Skip to content

codegraph status stays silent when package.json alone adds or drops a framework #3007

Closed

Description

@inth3shadows

#2941 has a sync record the frameworks that came or went since the last full index, so that codegraph status recommends a re-index. But a sync detects frameworks again only when it extracts a file (filesToIndex.length === 0 ? undefined : refreshFrameworkDetection(...)). An edit to package.json alone therefore records nothing.

Repro (upstream main 01e0ac3)

  1. Create a project with package.json {"dependencies":{}} and src/server.js containing const express = require('express'); const app = express(); app.get('/hello', …).
  2. Run codegraph init. There are no routes, as expected, since Express isn't a dependency.
  3. Add "express": "^4.0.0" to package.json, then run codegraph sync and codegraph status --json.

Expected: frameworksChangedSinceIndex: { added: ['express'] } and reindexRecommended: true. A fresh index finds GET /hello.

Actual: frameworksChangedSinceIndex: null and reindexRecommended: false. /hello stays missing until a manual re-index.

SvelteKit behaves the same way: adding @sveltejs/kit leaves goto('/login') in an unchanged +layout.svelte unlinked.

A long-running process (the MCP server's watcher) doesn't pick up the framework either, for the same reason.

Activity

  1. colbymchenry commented on Oct 30, 2026

    @colbymchenry
    Owner

    Thanks for the report and the clear repro! codegraph status now recommends a re-index when a framework comes or goes through package.json alone, even with no source file changed, and --json shows it in frameworksChangedSinceIndex with reindexRecommended: true. The fix is #3072. It's on main and ships in the next release; an index built before the upgrade starts tracking this at its next full codegraph index.

  2. added a commit that references this issue on Oct 30, 2026
    5526e33
  3. added a commit that references this issue on Oct 30, 2026
    018c394
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions