Skip to content

fix(fs): avoid recursive semantic refresh on resource delete#2971

Open
fujiajie666 wants to merge 1 commit into
mainfrom
fix/resource_delete_bug
Open

fix(fs): avoid recursive semantic refresh on resource delete#2971
fujiajie666 wants to merge 1 commit into
mainfrom
fix/resource_delete_bug

Conversation

@fujiajie666

Copy link
Copy Markdown
Collaborator

Description

Deleting a resource folder enqueues a semantic refresh for the parent directory so
the parent's overview reflects the deleted child. However, _enqueue_delete_refresh()
created the SemanticMsg without overriding its default recursive=True.

That caused a delete under viking://resources to recursively re-process unrelated
sibling folders, creating thousands of unnecessary embedding tasks, API 429s, health
check timeouts, and token waste.

This PR makes delete refresh messages non-recursive, so only the parent directory is
refreshed while existing child/sibling abstracts are reused.

Related Issue

Fixes #2959

Type of Change

  • Bug fix (non-breaking change that fixes an issue)

Changes Made

  • fs_service.py: set recursive=False when enqueueing delete refresh SemanticMsg
  • tests: assert resource delete refresh messages are non-recursive

Testing

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have tested this on the following platforms:
    • macOS

Local verification:

uv run --extra test pytest -q tests/service/test_fs_service.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

[Bug]: Deleting a resource folder triggers full recursive refresh of entire resource tree

1 participant