Skip to content

fix(local): implement plantask backend delete#911

Open
claneo wants to merge 1 commit into
cloudwego:mainfrom
claneo:fix-local-plantask-backend
Open

fix(local): implement plantask backend delete#911
claneo wants to merge 1 commit into
cloudwego:mainfrom
claneo:fix-local-plantask-backend

Conversation

@claneo

@claneo claneo commented Jul 7, 2026

Copy link
Copy Markdown

What type of PR is this?

fix

Check the PR title.

  • This PR title match the format: <type>(optional scope): <description>
  • The description of this PR title is user-oriented and clear enough for others to understand.
  • Attach the PR updating the user documentation if the current PR requires user awareness at the usage level. User docs repo

(Optional) Translate the PR title into Chinese.

修复 local backend 未实现 plantask 后端删除能力的问题

(Optional) More detailed description for this PR(en: English/zh: Chinese).

en:

This PR makes adk/backend/local.Local implement plantask.Backend by adding the missing Delete(ctx, *plantask.DeleteRequest) method.

Local already implements filesystem.Backend, but plantask.Backend additionally requires Delete for task deletion and cleanup when all tasks are completed. Without this method, *local.Local cannot be used directly with the plantask middleware.

The implementation removes the target file via the local filesystem and returns contextual errors on failure. Tests now include compile-time interface assertions for both filesystem.Backend and plantask.Backend, plus delete success and missing-file error cases.

zh(optional):

本 PR 为 adk/backend/local.Local 补充缺失的 Delete(ctx, *plantask.DeleteRequest) 方法,使其实现 plantask.Backend

Local 已经实现了 filesystem.Backend,但 plantask.Backend 额外要求 Delete,用于任务删除以及所有任务完成后的清理。缺少该方法时,*local.Local 无法直接用于 plantask middleware。

本实现通过本地文件系统删除目标文件,并在失败时返回带路径上下文的错误。测试中新增了 filesystem.Backendplantask.Backend 的编译期接口断言,以及删除成功和文件不存在的错误场景。

(Optional) Which issue(s) this PR fixes:

Fixes #908

(optional) The PR that updates user documentation:

N/A

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

adk/backend/local: Local backend is not compatible with plantask.Backend

1 participant