Skip to content

Refresh workspace discovery between core API operations #236

Description

@LadyBluenotes

Problem

Process-global workspace caches retain roots, patterns, package directories, and workspace information without invalidation. Repeated public core API calls can miss workspace changes.

Evidence

Create a packages/* workspace with one member whose node_modules contains a skill dependency. Call listIntentSkills, add a second member with another skill dependency, and call listIntentSkills again in the same process: only the first skill appears. A fresh CLI process finds both.

Source: workspace caches.

Verified against main at 206e987 (@tanstack/intent 0.3.8), Node v24.12.0 on macOS arm64. Tests used installed dependencies and synthetic local fixtures.

Acceptance criteria

  • Repeated core operations observe added and removed workspace members and changed workspace patterns.
  • Any caching has an explicit operation/snapshot lifetime or tested refresh contract.
  • Direct loading and npm/workspace source-kind decisions remain consistent after workspace changes.
  • Regression tests compare repeated calls with a fresh discovery result.
  • Existing direct-load and list benchmarks are checked for material regression.

Scope and priority

Priority: Medium. Type: bug.

Follow-up bug fix; not a v0.4.0 blocker. This reproduction does not demonstrate a memory leak. Preserve useful per-operation filesystem caches; do not introduce a watcher or daemon.

Activity

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions