deerflow2/backend/packages/harness/deerflow
Maz Benoscar 30a5846219
fix(tools): make write_file append discoverable in model-facing schema (#2843)
* fix: make tool argument behavior discoverable

The write_file tool already supported append=false by default with append=true for end-of-file writes, but the parsed docstring did not describe append in the model-facing schema. This records the overwrite default and append path in the tool description, adds resilient schema regression coverage, and keeps backend sandbox docs aligned.

The regression now also checks that every public parameter in the existing tool schema test matrix has a description. Enabling docstring parsing on setup_agent and update_agent fills the two existing gaps with their existing Args docs instead of duplicating descriptions elsewhere.

Constraint: Issue #2831 asks for a small docstring/schema discoverability fix without changing runtime file-writing behavior
Rejected: Changing write_file defaults | would alter existing overwrite semantics and broaden the fix beyond schema discoverability
Rejected: Exact phrase assertions | too brittle for future docstring rewording while testing the same behavior
Confidence: high
Scope-risk: narrow
Directive: Keep model-facing tool parameters documented through parsed docstrings or equivalent schema descriptions
Tested: cd backend && uv run pytest tests/test_setup_agent_tool.py tests/test_update_agent_tool.py tests/test_tool_args_schema_no_pydantic_warning.py tests/test_sandbox_tools_security.py::test_str_replace_and_append_on_same_path_should_preserve_both_updates -q
Tested: cd backend && uv run ruff check packages/harness/deerflow/sandbox/tools.py packages/harness/deerflow/tools/builtins/setup_agent_tool.py packages/harness/deerflow/tools/builtins/update_agent_tool.py tests/test_tool_args_schema_no_pydantic_warning.py
Not-tested: Full backend test suite
Co-authored-by: OmX <omx@oh-my-codex.dev>

* Fix the lint error

---------

Co-authored-by: OmX <omx@oh-my-codex.dev>
Co-authored-by: Willem Jiang <willem.jiang@gmail.com>
2026-05-10 23:09:03 +08:00
..
agents fix(lint): remove duplicate is_dynamic_context_reminder definition (#2837) 2026-05-09 23:40:46 +08:00
community fix: Supplement list_running in RemoteSandboxBackend (#2716) 2026-05-05 18:53:10 +08:00
config enable token usage by default (#2841) 2026-05-10 22:00:57 +08:00
guardrails feat(guardrails): add pre-tool-call authorization middleware with pluggable providers (#1240) 2026-03-23 18:07:33 +08:00
mcp feat(mcp): support custom tool interceptors via extensions_config.json (#2451) 2026-04-25 09:18:13 +08:00
models feat: static system prompt with DynamicContextMiddleware for prefix-cache optimization (#2801) 2026-05-09 09:27:02 +08:00
persistence fix(scripts): preserve uv extras across make dev restarts (#2754) (#2767) 2026-05-10 22:28:29 +08:00
reflection refactor: split backend into harness (deerflow.*) and app (app.*) (#1131) 2026-03-14 22:55:52 +08:00
runtime fix: bucket subagent token usage into parent run totals (#2838) 2026-05-10 22:47:30 +08:00
sandbox fix(tools): make write_file append discoverable in model-facing schema (#2843) 2026-05-10 23:09:03 +08:00
skills fix(skills): enforce allowed-tools metadata (#2626) 2026-05-07 08:34:43 +08:00
subagents fix: bucket subagent token usage into parent run totals (#2838) 2026-05-10 22:47:30 +08:00
tools fix(tools): make write_file append discoverable in model-facing schema (#2843) 2026-05-10 23:09:03 +08:00
tracing feat(tracing): add optional Langfuse support (#1717) 2026-04-02 13:06:10 +08:00
uploads fix(uploads): add Windows support for safe symlink-protected uploads (#2794) 2026-05-09 18:21:54 +08:00
utils fix(gateway): return ISO 8601 timestamps from threads endpoints (#2599) 2026-05-02 15:16:16 +08:00
__init__.py refactor: split backend into harness (deerflow.*) and app (app.*) (#1131) 2026-03-14 22:55:52 +08:00
client.py feat: refine token usage display modes (#2329) 2026-05-04 09:56:16 +08:00