Skip to content

fix(adk): resolve path duplication, empty plan.md, and file escape in excel-agent#227

Open
lora-sys wants to merge 1 commit into
cloudwego:mainfrom
lora-sys:fix/excel-agent-paths-planmd-editfile
Open

fix(adk): resolve path duplication, empty plan.md, and file escape in excel-agent#227
lora-sys wants to merge 1 commit into
cloudwego:mainfrom
lora-sys:fix/excel-agent-paths-planmd-editfile

Conversation

@lora-sys
Copy link
Copy Markdown

@lora-sys lora-sys commented May 20, 2026

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.

(Optional) Translate the PR title into Chinese.

修复 integration-excel-agent 路径重复、plan.md 为空、文件逃逸问题

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

en:
Fixes #226

Three bugs in adk/multiagent/integration-excel-agent/:

  1. main.go:79,85 hardcodes adk/multiagent/integration-excel-agent/playground/..., crashes when running go run . from the example dir (path duplication).

  2. Planner/replanner prompts use "instruction" in few-shot examples, but JSON schema expects "desc". LLM follows example → Desc empty → plan.md steps blank. Added UnmarshalJSON fallback for defense in depth.

  3. edit_file tool writes to LLM-specified path directly without workdir prefix. python_runner handles this correctly; edit_file now does too.

Also fixes pre-existing gofumpt lint issues in 3 files triggered by the linter config.

zh(optional):
修复三个 bug:路径硬编码导致启动崩溃;prompt 示例字段名与 schema 不一致导致 plan.md 步骤描述为空;edit_file 工具不拼接 workdir 导致文件写到项目根目录。

Which issue(s) this PR fixes:

Fixes #226

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 20, 2026

CLA assistant check
All committers have signed the CLA.

@lora-sys lora-sys force-pushed the fix/excel-agent-paths-planmd-editfile branch from 89e5f4b to fc1f3f2 Compare May 20, 2026 05:58
… excel-agent

- main.go: fix playground path hardcoded to repo root, use relative 'playground/' instead
- generic/plan.go: add UnmarshalJSON fallback from 'instruction' to 'desc'
- agents/planner/planner.go: fix few-shot example key from 'instruction' to 'desc'
- agents/replanner/replanner.go: same prompt fix + guard against empty Steps slice
- tools/edit.go: prepend workdir to relative paths to prevent files escaping

Fixes cloudwego#226
@lora-sys lora-sys force-pushed the fix/excel-agent-paths-planmd-editfile branch from fc1f3f2 to c498f88 Compare May 20, 2026 06:00
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.

[Bug] integration-excel-agent: dir path duplication, empty plan.md, files escape workdir

2 participants