Skip to content

fix: 清理 agent-compose sandbox 存储映射并扩容配额 - #67

Merged
kingfs merged 5 commits into
chaitin:mainfrom
qinhn525:fix/plugin-storage-quota-cleanup
Sep 1, 2026
Merged

fix: 清理 agent-compose sandbox 存储映射并扩容配额#67
kingfs merged 5 commits into
chaitin:mainfrom
qinhn525:fix/plugin-storage-quota-cleanup

Conversation

@qinhn525

@qinhn525 qinhn525 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

变更说明

  • 将两个 agent-compose 插件清理 sandbox 映射的方式从写入空值改为 storage.delete(),真正释放持久化记录。
  • remove_on_completion 执行前清理同一会话、项目和 Agent 的历史映射;复用请求未返回 sandbox ID 时同步清理失效映射。
  • 将 Workflow 与 Strategy 插件的持久化存储配额从 1 MiB 调整为 10 MiB。
  • 补充回归测试、架构说明和更新日志。

设计与兼容性

  • 不改变工具参数、输出结构、插件身份或版本号。
  • 没有 conversation_id 时仍不读写持久化存储。
  • StorageInvocationError 继续按原有策略降级,不阻断 agent-compose 主流程。
  • 旧版本已写入的空值记录不会随升级自动回收,仍需部署维护者通过受支持的 Dify/Plugin Daemon 运维方式清理。

验证

  • cd plugins/agent_compose_strategy && task build:lint、31 项测试、清单校验及打包通过,覆盖率 86.16%。
  • cd plugins/agent_compose_workflow && task build:lint、27 项测试、清单校验及打包通过,覆盖率 84.75%。
  • git diff --check origin/main...HEAD:通过。
  • 仓库根目录 task check:本地未跟踪的 docs/specs/test.md 含私网 IP,被仓库安全检查拦截;该文件不在本 PR 中,需由干净检出环境的 CI 复核。

风险与回滚

  • 风险主要在较旧的 Plugin Daemon 可能不支持 storage delete;SDK 异常会被捕获并降级,不会掩盖主流程结果。
  • 配额调整需插件更新后生效,不涉及数据迁移。
  • 如需回滚,直接回退本 PR 即可;已删除的失效映射不会恢复,后续请求会创建新的 sandbox。

@kingfs
kingfs merged commit f0e96fd into chaitin:main Sep 1, 2026
10 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.

2 participants