Skip to content

Conversation

@shuv1337
Copy link
Collaborator

@shuv1337 shuv1337 commented Nov 14, 2025

Note

Introduces config hot-reload with PATCH /config, diff-based targeted invalidation, JSONC-preserving persistence with locking/backups, and migrates subsystems to a named state registry; adds plugin path handling, tests, and specs.

  • Config & Persistence:
    • Add hot-reload flag and Config.Event.Updated; implement diff-based invalidation (config/invalidation.ts) targeting provider, mcp, lsp, plugin, tool-registry, permission, command/agent/format, theme/instructions.
    • New persistence pipeline (persist.ts): file locking, backups, atomic writes, JSONC-preserving incremental edits, global/project scopes, and diffs for publish; new error types.
    • Resolve plugin paths (scoped/npm/relative/absolute), discover plugin files from plugin/*, and add global config file resolver.
    • Load config via State.register("config"); add readFreshConfig.
  • API:
    • Enhance PATCH /config with scope param; return merged config; publish update events; enrich TUI toast messages; add spec (specs/config-spec.md).
  • State & Runtime:
    • Introduce State.register and State.invalidate (by name/key, wildcard); add Instance.invalidate and Instance.forEach; bootstrap subscribes to config updates.
    • Migrate modules to named state: agent, command, provider, lsp, mcp, permission, plugin, format, filewatcher, tool/registry, file cache refresh tweaks.
  • Other:
    • Improve agent permission merging.
    • Add comprehensive tests for hot reload, JSONC writes, plugin handling.

Written by Cursor Bugbot for commit 410fd58. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is being reviewed by Cursor Bugbot

Details

You are on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

fetching = false
})
}
refresh(cache)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Cache Corruption from Incomplete Updates

The refresh function passes the shared cache object directly to fetchEntries, which mutates it in-place by pushing files and directories. If fetchEntries fails partway through (e.g., due to file system errors), the cache is left in a partially-updated state, and subsequent code treats it as complete because the error is caught and fetching is set to false. The cache should be built in a temporary object and only assigned to cache on success.

Fix in Cursor Fix in Web

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link

Copilot AI commented Nov 14, 2025

@kcrommett I've opened a new pull request, #18, to work on those changes. Once the pull request is ready, I'll request review from you.

@shuv1337 shuv1337 merged commit 1b44fa0 into integration Nov 14, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants